Tizen Native API
|
The Telephony provides call, modem, network, and SIM information.
Required Header
#include <telephony.h>
Overview
The Telephony provides call, modem, network, and SIM information.
Related Features
This API is related with the following feature:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature List.
Functions | |
int | telephony_set_noti_cb (telephony_h handle, telephony_noti_e noti_id, telephony_noti_cb cb, void *user_data) |
Sets a callback function to be invoked when the telephony state changes. | |
int | telephony_unset_noti_cb (telephony_h handle, telephony_noti_e noti_id) |
Unsets a callback function. | |
int | telephony_init (telephony_handle_list_s *list) |
Acquires the list of available handles to use the telephony API. | |
int | telephony_deinit (telephony_handle_list_s *list) |
Deinitializes the telephony handle list. | |
Typedefs | |
typedef struct telephony_data * | telephony_h |
The Telephony API handle. | |
typedef void(* | telephony_noti_cb )(telephony_h handle, telephony_noti_e noti_id, void *data, void *user_data) |
Called when the telephony state changes. |
Typedef Documentation
typedef struct telephony_data* telephony_h |
The Telephony API handle.
- Since :
- 2.3.1
typedef void(* telephony_noti_cb)(telephony_h handle, telephony_noti_e noti_id, void *data, void *user_data) |
Called when the telephony state changes.
- Since :
- 2.3.1
Enumeration Type Documentation
enum telephony_error_e |
Enumeration for Telephony error.
- Since :
- 2.3.1
- Enumerator:
enum telephony_noti_e |
Enumeration for Telephony notification.
- Since :
- 2.3.1
- Enumerator:
Function Documentation
int telephony_deinit | ( | telephony_handle_list_s * | list | ) |
Deinitializes the telephony handle list.
- Since :
- 2.3.1
- Parameters:
-
[in] list The handle list to be deinitialized
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_ERROR_NONE Successful TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter TELEPHONY_ERROR_NOT_SUPPORTED Not supported TELEPHONY_ERROR_OPERATION_FAILED Operation failed
- See also:
- telephony_init()
int telephony_init | ( | telephony_handle_list_s * | list | ) |
Acquires the list of available handles to use the telephony API.
- Since :
- 2.3.1
- Remarks:
- You will get two handles in case of dual SIM device.
In this case, handle[0] is mean Primary SIM and handle[1] is mean Secondary SIM.
- Parameters:
-
[out] list The list contains the number of available handles and array of handles
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_ERROR_NONE Successful TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter TELEPHONY_ERROR_NOT_SUPPORTED Not supported TELEPHONY_ERROR_OPERATION_FAILED Operation failed
- See also:
- telephony_deinit()
int telephony_set_noti_cb | ( | telephony_h | handle, |
telephony_noti_e | noti_id, | ||
telephony_noti_cb | cb, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the telephony state changes.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle to use the telephony API [in] noti_id The notification ID to set the callback [in] cb The callback to be invoked when the telephony state changes [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_ERROR_NONE Successful TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter TELEPHONY_ERROR_PERMISSION_DENIED Permission denied TELEPHONY_ERROR_NOT_SUPPORTED Not supported TELEPHONY_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- telephony_noti_cb() will be invoked.
- See also:
- telephony_unset_noti_cb()
int telephony_unset_noti_cb | ( | telephony_h | handle, |
telephony_noti_e | noti_id | ||
) |
Unsets a callback function.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle to use the telephony API [in] noti_id The notification ID to unset a callback
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_ERROR_NONE Successful TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter TELEPHONY_ERROR_PERMISSION_DENIED Permission denied TELEPHONY_ERROR_NOT_SUPPORTED Not supported TELEPHONY_ERROR_OPERATION_FAILED Operation failed
- See also:
- telephony_set_noti_cb()