Tizen Native API
4.0
|
The Telephony provides call, modem, network, and SIM information.
#include <telephony.h>
The Telephony provides call, modem, network, and SIM information.
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 Element.
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. | |
int | telephony_get_state (telephony_state_e *state) |
Acquires the telephony state value. | |
int | telephony_set_state_changed_cb (telephony_state_changed_cb callback, void *user_data) |
Sets a callback function to be invoked when the telephony state changes. | |
int | telephony_unset_state_changed_cb (telephony_state_changed_cb callback) |
Unsets a telephony state callback function. | |
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 void(* | telephony_state_changed_cb )(telephony_state_e state, void *user_data) |
Called for the telephony state changes. |
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 void(* telephony_state_changed_cb)(telephony_state_e state, void *user_data) |
Called for the telephony state changes.
enum telephony_error_e |
Enumeration for Telephony error.
enum telephony_noti_e |
Enumeration for Telephony notification.
TELEPHONY_NOTI_SIM_STATUS |
Notification to be invoked when the SIM card state changes. |
TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE |
Notification to be invoked when the SIM call forwarding indicator state changes. |
TELEPHONY_NOTI_NETWORK_SERVICE_STATE |
Notification to be invoked when the network service state changes. |
TELEPHONY_NOTI_NETWORK_CELLID |
Notification to be invoked when the cell ID changes. |
TELEPHONY_NOTI_NETWORK_ROAMING_STATUS |
Notification to be invoked when the roaming status changes. |
TELEPHONY_NOTI_NETWORK_SIGNALSTRENGTH_LEVEL |
Notification to be invoked when the signal strength changes. |
TELEPHONY_NOTI_NETWORK_NETWORK_NAME |
Notification to be invoked when the network name changes. |
TELEPHONY_NOTI_NETWORK_PS_TYPE |
Notification to be invoked when the ps type changes. |
TELEPHONY_NOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION |
Notification to be invoked when the default data subscription changes. |
TELEPHONY_NOTI_NETWORK_DEFAULT_SUBSCRIPTION |
Notification to be invoked when the default subscription changes. |
TELEPHONY_NOTI_NETWORK_LAC |
Notification to be invoked when the LAC (Location Area Code) changes. |
TELEPHONY_NOTI_NETWORK_TAC |
Notification to be invoked when the TAC (Tracking Area Code) changes. |
TELEPHONY_NOTI_NETWORK_SYSTEM_ID |
Notification to be invoked when the system ID changes. |
TELEPHONY_NOTI_NETWORK_NETWORK_ID |
Notification to be invoked when the network ID changes. |
TELEPHONY_NOTI_NETWORK_BS_ID |
Notification to be invoked when the base station ID changes. |
TELEPHONY_NOTI_NETWORK_BS_LATITUDE |
Notification to be invoked when the base station latitude changes. |
TELEPHONY_NOTI_NETWORK_BS_LONGITUDE |
Notification to be invoked when the base station longitude changes. |
TELEPHONY_NOTI_VOICE_CALL_STATE |
Notification to be invoked when the voice call state changes. |
TELEPHONY_NOTI_VIDEO_CALL_STATE |
Notification to be invoked when the video call state changes. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_IDLE |
Notification to be invoked when a voice call is in idle status. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_ACTIVE |
Notification to be invoked when a voice call is in active status. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_HELD |
Notification to be invoked when a voice call is in held status. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_DIALING |
Notification to be invoked when a voice call is in dialing status. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_ALERTING |
Notification to be invoked when a voice call is in alerting status. |
TELEPHONY_NOTI_VOICE_CALL_STATUS_INCOMING |
Notification to be invoked when a voice call is in incoming status. |
TELEPHONY_NOTI_VIDEO_CALL_STATUS_IDLE |
Notification to be invoked when a video call is in idle status. |
TELEPHONY_NOTI_VIDEO_CALL_STATUS_ACTIVE |
Notification to be invoked when a video call is in active status. |
TELEPHONY_NOTI_VIDEO_CALL_STATUS_DIALING |
Notification to be invoked when a video call is in dialing status. |
TELEPHONY_NOTI_VIDEO_CALL_STATUS_ALERTING |
Notification to be invoked when a video call is in alerting status. |
TELEPHONY_NOTI_VIDEO_CALL_STATUS_INCOMING |
Notification to be invoked when a video call is in incoming status. |
TELEPHONY_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION |
Notification to be invoked when the preferred voice subscription changes. |
TELEPHONY_NOTI_MODEM_POWER_STATUS |
Notification to be invoked when the modem power status changes. |
enum telephony_state_e |
int telephony_deinit | ( | telephony_handle_list_s * | list | ) |
Deinitializes the telephony handle list.
[in] | list | The handle list to be deinitialized |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_get_state | ( | telephony_state_e * | state | ) |
Acquires the telephony state value.
[out] | state | The state value of telephony |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_init | ( | telephony_handle_list_s * | list | ) |
Acquires the list of available handles to use the telephony API.
[out] | list | The list contains the number of available handles and array of handles |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_OUT_OF_MEMORY | Out of memory |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
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.
[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 |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_set_state_changed_cb | ( | telephony_state_changed_cb | callback, |
void * | user_data | ||
) |
Sets a callback function to be invoked when the telephony state changes.
[in] | callback | The callback to be invoked when the telephony state changes |
[in] | user_data | The user data passed to the callback function |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_unset_noti_cb | ( | telephony_h | handle, |
telephony_noti_e | noti_id | ||
) |
Unsets a callback function.
[in] | handle | The handle to use the telephony API |
[in] | noti_id | The notification ID to unset a callback |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_unset_state_changed_cb | ( | telephony_state_changed_cb | callback | ) |
Unsets a telephony state callback function.
[in] | callback | The callback to unset when the telephony state changes |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |