tizen 2.3 release
[framework/telephony/libslp-tapi.git] / include / ITapiModem.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 /**
22  * @file ITapiModem.h
23  */
24
25 /**
26  * @internal
27  * @addtogroup CAPI_TELEPHONY_SERVICE_MODEM
28  * @{
29  */
30
31 #ifndef _ITAPI_MODEM_H_
32 #define _ITAPI_MODEM_H_
33
34 #include <tapi_common.h>
35 #include <TelPower.h>
36 #include <TelMisc.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43  * @brief Turns the modem on/off.
44  * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
45  *
46  *          <b> Prospective Clients: </b> External Apps. \n
47  *
48  * @since_tizen 2.3
49  * @privlevel platform
50  * @privilege %http://tizen.org/privilege/telephony.admin
51  *
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
56  *
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).
60  */
61 int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
62
63 /**
64  * @brief Switches the flight mode on/off.
65  *
66  * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
67  *
68  *          <b> Prospective Clients: </b> External Apps.
69  *
70  * @since_tizen 2.3
71  * @privlevel platform
72  * @privilege %http://tizen.org/privilege/telephony.admin
73  *
74  * @param[in] handle The handle from tel_init()
75  *
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
79
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).
83  */
84 int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
85
86 /**
87  * @brief Gets the flight mode
88  *
89  * @since_tizen 2.3
90  * @privlevel public
91  * @privilege %http://tizen.org/privilege/telephony
92  *
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
96  */
97 int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
98
99 /**
100  * @brief Gets ME version information.
101  *
102  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
103  *
104  *          <b> Prospective Clients: </b> External Apps.\n
105  *
106  * @since_tizen 2.3
107  * @privlevel public
108  * @privilege %http://tizen.org/privilege/telephony
109  *
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
113  *
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).
117  */
118 int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
119
120 /**
121  * @brief Gets the Misc ME version.
122  *
123  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
124  *
125  *          <b> Prospective Clients: </b> External Apps.\n
126  *
127  * @since_tizen 2.3
128  * @privlevel public
129  * @privilege %http://tizen.org/privilege/telephony
130  *
131  * @param[in] handle The handle from tel_init()
132  *
133  * @return The return type ( TelMiscVersionInformation * ) \n
134  *         The Misc Version Information.
135  */
136 TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
137
138 /**
139  * @brief Gets the ME ESN/MEID for each phone type.
140  *
141  * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
142  *
143  *          <b> Prospective Clients: </b> External Apps. \n
144  *
145  * @since_tizen 2.3
146  * @privlevel public
147  * @privilege %http://tizen.org/privilege/telephony
148  *
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
152  *
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).
156  */
157 int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
158
159 /**
160  * @brief Gets the Misc ME Serial Number.
161  *
162  * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
163  *
164  *          <b> Prospective Clients: </b> Embedded call application. \n
165  *
166  * @since_tizen 2.3
167  * @privlevel public
168  * @privilege %http://tizen.org/privilege/telephony
169  *
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.
173  *
174  * @param[in] handle The handle from tel_init()
175  *
176  * @return The return Type (char*) \n
177  *         The Serial Number string.
178  */
179 TelMiscSNInformation *tel_get_misc_me_sn_sync(TapiHandle *handle);
180
181 /**
182  * @brief Gets the Misc ME IMEI.
183  *
184  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
185  *
186  *          <b> Prospective Clients: </b> External Apps.
187  *
188  * @since_tizen 2.3
189  * @privlevel public
190  * @privilege %http://tizen.org/privilege/telephony
191  *
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
195  *
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).
199  */
200 int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
201
202 /**
203  * @brief Gets the Misc ME IMEI.
204  *
205  * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
206  *
207  *          <b> Prospective Clients: </b> Embedded call application.
208  *
209  * @since_tizen 2.3
210  * @privlevel public
211  * @privilege %http://tizen.org/privilege/telephony
212  *
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.
216  *
217  * @param[in] handle The handle from tel_init()
218  *
219  * @return The return type (char*) \n
220  *         The IMEI string.
221  */
222 char *tel_get_misc_me_imei_sync(TapiHandle *handle);
223
224 /**
225  * @brief Checks the modem power status.
226  *
227  * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
228  *
229  *          <b> Prospective Clients: </b> Embedded call application.
230  *
231  * @since_tizen 2.3
232  * @privlevel public
233  * @privilege %http://tizen.org/privilege/telephony
234  *
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.
238  *
239  * @param[in] handle The handle from tel_init()
240  * @param[out] result The result of checking the modem power status
241  *
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).
245  */
246 int tel_check_modem_power_status(TapiHandle *handle, int *result);
247
248 #ifdef __cplusplus
249 }
250 #endif
251
252 #endif  /* _ITAPI_MODEM_H_ */
253
254 /**
255  * @}
256  */