4 * Copyright (c) 2014 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.
27 * @addtogroup CAPI_TELEPHONY_SERVICE_MODEM
31 #ifndef _ITAPI_MODEM_H_
32 #define _ITAPI_MODEM_H_
34 #include <tapi_common.h>
43 * @brief Turns the modem on/off.
44 * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
46 * <b> Prospective Clients: </b> External Apps. \n
50 * @privilege %http://tizen.org/privilege/telephony.admin
52 * @param[in] handle The handle from tel_init()
53 * @param[in] cmd The index value, which is the power command #tapi_power_phone_cmd_t
54 * @param[in] callback To register a callback function for result
55 * @param[in] user_data The user data for user specification
57 * @return The return type (int) \n
58 * #TAPI_API_SUCCESS indicates that the operation is completed successfully,
59 * else it provides an error code (Refer #TapiResult_t).
61 int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
64 * @brief Switches the flight mode on/off.
66 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
68 * <b> Prospective Clients: </b> External Apps.
72 * @privilege %http://tizen.org/privilege/telephony.admin
74 * @param[in] handle The handle from tel_init()
76 * @param[in] mode The mode value, which is the flight flag #tapi_power_flight_mode_type_t
77 * @param[in] callback To register a callback function for result
78 * @param[in] user_data The user data for user specification
80 * @return The return type (int) \n
81 * #TAPI_API_SUCCESS indicates that the operation is completed successfully, \n
82 * else it provides an error code (Refer #TapiResult_t).
84 int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
87 * @brief Gets the flight mode
91 * @privilege %http://tizen.org/privilege/telephony
93 * @param[in] handle The handle from tel_init()
94 * @param[in] callback To register a callback function for result
95 * @param[in] user_data The user data for user specification
97 int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
100 * @brief Gets ME version information.
102 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
104 * <b> Prospective Clients: </b> External Apps.\n
108 * @privilege %http://tizen.org/privilege/telephony
110 * @param[in] handle The handle from tel_init()
111 * @param[in] callback To register a callback function for result
112 * @param[in] user_data The user data for user specification
114 * @return The return type (int) \n
115 * Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
116 * Negative integer : It provides an error code (Refer #TapiResult_t).
118 int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
121 * @brief Gets the Misc ME version.
123 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
125 * <b> Prospective Clients: </b> External Apps.\n
129 * @privilege %http://tizen.org/privilege/telephony
131 * @param[in] handle The handle from tel_init()
133 * @return The return type ( TelMiscVersionInformation * ) \n
134 * The Misc Version Information.
136 TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
139 * @brief Gets the ME ESN/MEID for each phone type.
141 * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
143 * <b> Prospective Clients: </b> External Apps. \n
147 * @privilege %http://tizen.org/privilege/telephony
149 * @param[in] handle The handle from tel_init()
150 * @param[in] callback To register a callback function for result
151 * @param[in] user_data The user data for user specification
153 * @return The return type (int) \n
154 * Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
155 * Negative integer : It provides an error code (Refer #TapiResult_t).
157 int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
160 * @brief Gets the Misc ME Serial Number.
162 * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
164 * <b> Prospective Clients: </b> Embedded call application. \n
168 * @privilege %http://tizen.org/privilege/telephony
170 * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
171 * However it just means that the API request has been transfered to the CP successfully.
172 * The actual operation result is delivered in the corresponding event asynchronously.
174 * @param[in] handle The handle from tel_init()
176 * @return The return Type (char*) \n
177 * The Serial Number string.
179 TelMiscSNInformation *tel_get_misc_me_sn_sync(TapiHandle *handle);
182 * @brief Gets the Misc ME IMEI.
184 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
186 * <b> Prospective Clients: </b> External Apps.
190 * @privilege %http://tizen.org/privilege/telephony
192 * @param[in] handle The handle from tel_init()
193 * @param[in] callback To register a callback function for result
194 * @param[in] user_data The user data for user specification
196 * @return The return type (int) \n
197 * Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
198 * Negative integer : It provides an error code (Refer #TapiResult_t).
200 int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
203 * @brief Gets the Misc ME IMEI.
205 * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
207 * <b> Prospective Clients: </b> Embedded call application.
211 * @privilege %http://tizen.org/privilege/telephony
213 * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
214 * However it just means that the API request has been transfered to the CP successfully.
215 * The actual operation result is delivered in the corresponding event asynchronously.
217 * @param[in] handle The handle from tel_init()
219 * @return The return type (char*) \n
222 char *tel_get_misc_me_imei_sync(TapiHandle *handle);
225 * @brief Checks the modem power status.
227 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
229 * <b> Prospective Clients: </b> Embedded call application.
233 * @privilege %http://tizen.org/privilege/telephony
235 * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
236 * However it just means that the API request has been transfered to the CP successfully.
237 * The actual operation result is delivered in the corresponding event asynchronously.
239 * @param[in] handle The handle from tel_init()
240 * @param[out] result The result of checking the modem power status
242 * @return The return type (int) \n
243 * @c 0 indicates that the operation is completed successfully, \n
244 * else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t).
246 int tel_check_modem_power_status(TapiHandle *handle, int *result);
252 #endif /* _ITAPI_MODEM_H_ */