4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * @ingroup TelephonyAPI
24 * @addtogroup MODEM_TAPI POWER
27 * These APIs allow an application to accomplish the following services: @n
28 * - Process power command @n
29 * - Reset the phone power (on / off), @n
30 * - Process airplane mode @n
33 #ifndef _ITAPI_MODEM_H_
34 #define _ITAPI_MODEM_H_
36 #include <tapi_common.h>
37 #include <TelDefines.h>
48 * @brief This API is used to turn power off or on the modem.
50 * @par Sync (or) Async:
51 * This is a Synchronous API.
53 * @par Important Notes:
61 * - handle from tel_init()
64 * - This index value is the power command as #tapi_power_phone_cmd_t.
66 * @param [in] callback
67 * - To register callback function for result of this function.
69 * @param [in] user_data
70 * - user data for user specification
72 * @par Async Response Message:
82 * @return Return Type (int) \n
83 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
84 * - Otherwise it provides an error code (Refer #TapiResult_t)
86 * @par Prospective Clients:
91 int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
95 * @brief This API is used to enter or leave airplane mode
97 * @par Sync (or) Async:
98 * This is a Asynchronous API.
100 * @par Important Notes:
108 * - handle from tel_init()
111 * - This mode value is the flight flag #tapi_power_flight_mode_type_t.
113 * @param [in] callback
114 * - To register callback function for result of this function.
116 * @param [in] user_data
117 * - user data for user specification
119 * @par Async Response Message:
120 * The event associated is TAPI_EVENT_MODEM_FLIGHT_MODE_RESP and the event data is #tapi_power_flight_mode_resp_type_t.
121 * Asynchronous return status is always TAPI_API_SUCCESS.
129 * @return Return Type (int) \n
130 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
131 * - Otherwise it provides an error code (Refer #TapiResult_t)
133 * @par Prospective Clients:
138 int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
140 int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
144 * @brief This function is invoked to Get ME version information.
146 * @par Sync (or) Async:
147 * This is a synchronous API.
149 * @par Important Notes:
156 * - handle from tel_init()
158 * @param [in] callback
159 * - To register callback function for result of this function.
161 * @param [in] user_data
162 * - user data for user specification
164 * @par Async Response Message:
173 * @return Return Type (int) \n
174 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
175 * - Negative integer : it provides an error code (Refer #TapiResult_t)
177 * @par Prospective Clients:
181 int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
185 * @brief This function is to get misc me version
187 * @par Sync (or) Async:
188 * This is a Synchronous API.
190 * @par Important Notes:
197 * - handle from tel_init()
199 * @par Async Response Message:
208 * @return Return Type ( TelMiscVersionInformation * ) \n
209 * - Misc Version Information
211 * @par Prospective Clients:
217 TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
222 * @brief This function is invoked to Get ME IMEI/ESN/MEID for each phone type.
224 * @par Sync (or) Async:
225 * This is a synchronous API.
227 * @par Important Notes:
234 * - handle from tel_init()
236 * @param [in] callback
237 * - To register callback function for result of this function.
239 * @param [in] user_data
240 * - user data for user specification
242 * @par Async Response Message:
251 * @return Return Type (int) \n
252 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
253 * - Negative integer : it provides an error code (Refer #TapiResult_t)
255 * @par Prospective Clients:
259 int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
263 * @brief This function is to get misc me Sereal Number
265 * This function makes Dbus method call to Telephony Sever and returns immediate value.
266 * However it just means that the API request has been transfered to the CP successfully.
267 * The actual operation result is being delivered in the corresponding event asynchronously.
269 * @par Sync (TapiHandle *handle, or) Async:
270 * This is a Synchronous API.
272 * @par Important Notes:
279 * - handle from tel_init()
287 * @return Return Type (char*) \n
288 * - Sereal Number string
290 * @par Prospective Clients:
291 * Embedded call application
301 char *tel_get_misc_me_sn_sync(TapiHandle *handle);
305 * @brief This function is to get misc me imei
307 * @par Sync (or) Async:
308 * This is a Asynchronous API.
310 * @par Important Notes:
317 * - handle from tel_init()
319 * @param [in] callback
320 * - To register callback function for result of this function.
322 * @param [in] user_data
323 * - user data for user specification
325 * @par Async Response Message:
334 * @return Return Type (int) \n
335 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
336 * - Negative integer : it provides an error code (Refer #TapiResult_t)
338 * @par Prospective Clients:
343 int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
347 * @brief This function is to get misc me imei
349 * This function makes Dbus method call to Telephony Sever and returns immediate value.
350 * However it just means that the API request has been transfered to the CP successfully.
351 * The actual operation result is being delivered in the corresponding event asynchronously.
353 * @par Sync (TapiHandle *handle, or) Async:
354 * This is a Synchronous API.
356 * @par Important Notes:
363 * - handle from tel_init()
372 * @return Return Type (char*) \n
375 * @par Prospective Clients:
376 * Embedded call application
386 char *tel_get_misc_me_imei_sync(TapiHandle *handle);
390 * @brief This function is to check modem power status
392 * This function makes Dbus method call to Telephony Sever and returns immediate value.
393 * However it just means that the API request has been transfered to the CP successfully.
394 * The actual operation result is being delivered in the corresponding event asynchronously.
396 * @par Sync (TapiHandle *handle, or) Async:
397 * This is a Asynchronous API.
399 * @par Important Notes:
406 * - handle from tel_init()
408 * @param [out] result
409 * - result of checking modem power status.
411 * @par Async Response Message:
420 * @return Return Type (TapiHandle *handle, int) \n
421 * - 0 - indicating that the operation has completed successfully. \n
422 * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
424 * @par Prospective Clients:
425 * Embedded call application
435 int tel_check_modem_power_status(TapiHandle *handle, int *result);
439 * @brief This function is to control modem dun pin
441 * This function makes Dbus method call to Telephony Sever and returns immediate value.
442 * However it just means that the API request has been transfered to the CP successfully.
443 * The actual operation result is being delivered in the corresponding event asynchronously.
445 * @par Sync (TapiHandle *handle, or) Async:
446 * This is a Asynchronous API.
448 * @par Important Notes:
455 * - handle from tel_init()
457 * @param [in] pincontrol
458 * - pin control inforamation
460 * @param [in] callback
461 * - To register callback function for result of this function.
463 * @param [in] user_data
464 * - user data for user specification
466 * @par Async Response Message:
475 * @return Return Type (TapiHandle *handle, int) \n
476 * - 0 - indicating that the operation has completed successfully. \n
477 * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
479 * @par Prospective Clients:
480 * Embedded call application
490 int tel_control_modem_dun_pin_ctrl(TapiHandle *handle, tapi_ps_btdun_pincontrol *pincontrol, tapi_response_cb callback, void *user_data);
496 #endif /* _ITAPI_MODEM_H_ */