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.
22 * @file ITapiNetwork.h
27 * @addtogroup CAPI_TELEPHONY_SERVICE_NETWORK
31 #ifndef _ITAPI_NETWORK_H_
32 #define _ITAPI_NETWORK_H_
34 #include <tapi_common.h>
35 #include <TelNetwork.h>
43 * @brief Requests the lower layers to select the network automatically.
45 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
47 * <b> Prospective Clients: </b> External Apps.\n
49 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
50 * However it just means that the API request has been transferred to the CP successfully.
51 * The actual operation result is delivered in the corresponding event asynchronously.
55 * @privilege %http://tizen.org/privilege/telephony.admin
57 * @param[in] handle The handle from tel_init()
59 * @param[in] callback To register a callback function for result
61 * @param[in] user_data The user data for user specification
63 * @return The return type (int)\n
64 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
65 * Refer #TapiResult_t for failure and an error code.
67 * @pre Initialize the Dbus connection with #tel_init.
69 int tel_select_network_automatic(TapiHandle *handle, tapi_response_cb callback, void *user_data);
72 * @brief Requests the lower layers to select the network (PLMN) which has been selected by the user from the Network List displayed to the user.
74 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
76 * <b> Prospective Clients: </b> External Apps.\n
78 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
79 * However it just means that the API request has been transferred to the CP successfully.
80 * The actual operation result is delivered in the corresponding event asynchronously.
84 * @privilege %http://tizen.org/privilege/telephony.admin
86 * @param[in] handle The handle from tel_init()
88 * @param[in] plmn The user selected PLMN
90 * @param[in] act The user selected Access Technology
92 * @param[in] callback To register a callback function for result
94 * @param[in] user_data The user data for user specification
96 * @return The return type (int)\n
97 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
98 * Refer #TapiResult_t for failure and an error code.
100 * @pre Initialize the Dbus connection with #tel_init.
102 int tel_select_network_manual(TapiHandle *handle, const char *plmn, int act, tapi_response_cb callback, void *user_data);
105 * @brief Sends a request to do manual search for the available networks and provides the Network List to the User/Application.
107 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
109 * <b> Prospective Clients: </b> External Apps.\n
111 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
112 * However it just means that the API request has been transferred to the CP successfully.
113 * The actual operation result is delivered in the corresponding event asynchronously.
116 * @privlevel platform
117 * @privilege %http://tizen.org/privilege/telephony.admin
119 * @param[in] handle The handle from tel_init()
121 * @param[in] callback To register a callback function for result
123 * @param[in] user_data The user data for user specification
125 * @return The return type (int)\n
126 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
127 * Refer #TapiResult_t for failure and an error code.
129 * @pre Initialize the Dbus connection with #tel_init.
131 * @post In the available network list, the user can select one of the networks successfully.
133 int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data);
136 * @brief Gets the present network selection mode i.e. automatic or manual.
138 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
140 * <b> Prospective Clients: </b> External Apps.\n
142 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
143 * However it just means that the API request has been transferred to the CP successfully.
144 * The actual operation result is delivered in the corresponding event asynchronously.
148 * @privilege %http://tizen.org/privilege/telephony
150 * @param[in] handle The handle from tel_init()
152 * @param[in] callback To register a callback function for the result
154 * @param[in] user_data The user data for user specification
156 * @return The return type (int)\n
157 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
158 * Refer #TapiResult_t for failure and an error code.
160 * @pre Initialize the Dbus connection with #tel_init.
162 int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data);
165 * @brief Sets the network preferred PLMN.
167 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
169 * <b> Prospective Clients: </b> External Apps. \n
171 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
172 * However it just means that the API request has been transferred to the CP successfully.
173 * The actual operation result is delivered in the corresponding event asynchronously.
176 * @privlevel platform
177 * @privilege %http://tizen.org/privilege/telephony.admin
179 * @param[in] handle The handle from tel_init()
181 * @param[in] operation The operation to be done on the preferred PLMN
183 * @param[in] info The PLMN Info
185 * @param[in] callback To register a callback function for result
187 * @param[in] user_data The user data for user specification
189 * @return The return type (int)\n
190 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
191 * Refer #TapiResult_t for failure and an error code.
193 * @pre Initialize the Dbus connection with #tel_init.
195 int tel_set_network_preferred_plmn(TapiHandle *handle, TelNetworkPreferredPlmnOp_t operation,
196 TelNetworkPreferredPlmnInfo_t *info, tapi_response_cb callback, void *user_data);
199 * @brief Gets the preferred PLMN list.
201 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
203 * <b> Prospective Clients: </b> External Apps. \n
205 * This function makes a Dbus method call to the Telephony Server and returns an immediate value.
206 * However it just means that the API request has been transferred to the CP successfully.
207 * The actual operation result is delivered in the corresponding event asynchronously.
211 * @privilege %http://tizen.org/privilege/telephony
213 * @param[in] handle The handle from tel_init()
215 * @param[in] callback To register a callback function for result
217 * @param[in] user_data The user data for user specification
219 * @return The return type (int)\n
220 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
221 * Refer #TapiResult_t for failure and an error code.
223 * @pre Initialize the Dbus connection with #tel_init.
225 int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
228 * @brief Cancels the triggered manual network search.
230 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
232 * <b> Prospective Clients: </b> External Apps.
235 * @privlevel platform
236 * @privilege %http://tizen.org/privilege/telephony.admin
238 * @param[in] handle The handle from tel_init()
240 * @param[in] callback To register a callback function for result
242 * @param[in] user_data The user data for user specification
244 * @return The return type (int)\n
245 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
246 * Refer #TapiResult_t for failure and an error code.
248 int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data);
251 * @brief Gets network serving information.
253 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
255 * <b> Prospective Clients: </b> External Apps.
259 * @privilege %http://tizen.org/privilege/telephony
261 * @param[in] handle The handle from tel_init()
263 * @param[in] callback To register a callback function for result
265 * @param[in] user_data The user data for user specification
267 * @return The return type (int)\n
268 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
269 * Refer #TapiResult_t for failure and an error code.
271 int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data);
274 * @brief Sets the network mode.
276 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
278 * <b> Prospective Clients: </b> External Apps.
281 * @privlevel platform
282 * @privilege %http://tizen.org/privilege/telephony.admin
284 * @param[in] handle The handle from tel_init()
286 * @param[in] mode The network mode (GSM only or WCDMA only or Automatic)
288 * @param[in] callback To register a callback function for result
290 * @param[in] user_data The user data for user specification
292 * @return The return type (int)\n
293 * #TAPI_API_SUCCESS - indicates that the operation is completed successfully\n
294 * Refer #TapiResult_t for failure and an error code.
296 int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data);
299 * @brief Gets the network mode.
301 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
303 * <b> Prospective Clients: </b> External Apps.
307 * @privilege %http://tizen.org/privilege/telephony
309 * @param[in] handle The handle from tel_init()
311 * @param[in] callback To register a callback function for result
313 * @param[in] user_data The user data for user specification
315 * @return The return type (int)\n
316 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
317 * Refer #TapiResult_t for failure and an error code.
319 int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
322 * @brief Gets neighboring cell info.
324 * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
326 * <b> Prospective Clients: </b> External Apps.
330 * @privilege %http://tizen.org/privilege/telephony
332 * @param[in] handle The handle from tel_init()
334 * @param[in] callback To register a callback function for result
336 * @param[in] user_data The user data for user specification
338 * @return The return type (int)\n
339 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
340 * Refer #TapiResult_t for failure and an error code.
342 int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
345 * @brief Enters or exits the emergency callback mode.
347 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
349 * <b> Prospective Clients: </b> External Apps.
352 * @privlevel platform
353 * @privilege %http://tizen.org/privilege/telephony.admin
355 * @param[in] handle The handle from tel_init()
357 * @param[in] mode The emergency callback mode (Enter or Exit)
359 * @param[in] callback To register a callback function for result
361 * @param[in] user_data The user data for user specification
363 * @return The return type (int)\n
364 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
365 * Refer #TapiResult_t for failure and an error code.
367 int tel_set_network_emergency_callback_mode(TapiHandle *handle, TelNetworkEmergencyCallbackMode_t mode,
368 tapi_response_cb callback, void *user_data);
371 * @brief Sets the network roaming preference.
373 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
375 * <b> Prospective Clients: </b> External Apps.
378 * @privlevel platform
379 * @privilege %http://tizen.org/privilege/telephony.admin
381 * @param[in] handle The handle from tel_init()
383 * @param [in] roam_pref The network roaming preference (AUTOMATIC, HOME_ONLY, ROAM_ONLY)
385 * @param[in] callback To register a callback function for result
387 * @param[in] user_data The user data for user specification
389 * @return The return type (int)\n
390 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
391 * Refer #TapiResult_t for failure and an error code.
393 int tel_set_network_roaming_preference(TapiHandle *handle, TelNetworkPrefNetType_t roam_pref, tapi_response_cb callback, void *user_data);
396 * @brief Gets the network roaming preference.
398 * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
400 * <b> Prospective Clients: </b> External Apps.
404 * @privilege %http://tizen.org/privilege/telephony
406 * @param[in] handle The handle from tel_init()
408 * @param[in] callback To register a callback function for result
410 * @param[in] user_data The user data for user specification
412 * @return The return type (int)\n
413 * #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
414 * Refer #TapiResult_t for failure and an error code.
416 int tel_get_network_roaming_preference(TapiHandle *handle, tapi_response_cb callback, void *user_data);
419 * @brief Sets the Subscription (related to #TapiHandle) as 'default' Data Subscription.
422 * @privlevel platform
423 * @privilege %http://tizen.org/privilege/telephony.admin
425 * @param[in] handle The handle from tel_init()
427 * @param[in] callback To register a callback function for result
429 * @param[in] user_data The user data for user specification
433 * @return The return type (int)\n
434 * #TAPI_API_SUCCESS indicates that the operation has completed successfully\n
435 * Refer #TapiResult_t for failure and an error code.
437 * @par Prospective Clients: External Apps.
439 int tel_set_network_default_data_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data);
442 * @brief Gets the Subscription which is configured as 'default' Data Subscription.
446 * @privilege %http://tizen.org/privilege/telephony
448 * @param[in] handle The handle from tel_init()
450 * @param[out] The default subscription
451 * - 'default' Data Subscription.
452 * - Refer #TelNetworkDefaultDataSubs_t for Subscription details.
456 * @return The return type (int)\n
457 * #TAPI_API_SUCCESS indicates that the operation has completed successfully\n
458 * Refer #TapiResult_t for failure and an error code.
460 * @par Prospective Clients: External Apps.
462 int tel_get_network_default_data_subscription(TapiHandle *handle, TelNetworkDefaultDataSubs_t *default_subscription);
465 * @brief This function is called to set the Subscription (related to #TapiHandle) as 'default' Subscription for CS (Voice).
468 * @privlevel platform
469 * @privilege %http://tizen.org/privilege/telephony.admin
472 * - handle from tel_init().
474 * @param [in] callback
475 * - To register callback function for result.
477 * @param [in] user_data
478 * - user_data for user specification.
483 * @return Return Type (int) \n
484 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
485 * - Refer #TapiResult_t for failure and error code
487 * @par Prospective Clients:
490 int tel_set_network_default_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data);
493 * @brief This function is called to get the Subscription which is configured as 'default' Subscription for CS (Voice).
497 * @privilege %http://tizen.org/privilege/telephony
500 * - handle from tel_init().
502 * @param [out] default_subscription
503 * - 'default' Subscription for CS (Voice).
504 * - Refer #TelNetworkDefaultSubs_t for Subscription details
509 * @return Return Type (int) \n
510 * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
511 * - Refer #TapiResult_t for failure and error code
513 * @par Prospective Clients:
516 int tel_get_network_default_subscription(TapiHandle *handle, TelNetworkDefaultSubs_t *default_subscription);
522 #endif /* _ITAPI_NETWORK_H_ */