Tizen Native API
9.0
|
The Call API provides functions to check the state of voice and video calls.
Required Header
#include <telephony.h>
Overview
The Telephony Call API allows you to get the voice and videos call states. You can use this information about call related actions.
Related Features
This API is related with the following feature:
- http://tizen.org/feature/network.telephony
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_call_get_preferred_voice_subscription (telephony_h handle, telephony_call_preferred_voice_subs_e *call_sub) |
Gets the current value for the preferred voice call subscription. This function is used to retrieve the current value for the preferred voice call subscription. It requires the handle obtained from the telephony_init() function as an argument and returns the currently set preferred call subscription value in the form of telephony_call_preferred_voice_subs_e. | |
int | telephony_call_get_call_list (telephony_h handle, unsigned int *count, telephony_call_h **call_list) |
Gets the list of the current call. | |
int | telephony_call_release_call_list (unsigned int count, telephony_call_h **call_list) |
Releases the list allocated from telephony_call_get_call_list(). | |
int | telephony_call_get_handle_id (telephony_call_h call_handle, unsigned int *handle_id) |
Gets the call handle ID. | |
int | telephony_call_get_number (telephony_call_h call_handle, char **number) |
Gets the call number. | |
int | telephony_call_get_type (telephony_call_h call_handle, telephony_call_type_e *type) |
Gets the call type. | |
int | telephony_call_get_status (telephony_call_h call_handle, telephony_call_status_e *status) |
Gets the call status. | |
int | telephony_call_get_direction (telephony_call_h call_handle, telephony_call_direction_e *direction) |
Gets whether the call is MO(Mobile Originated) call or MT(Mobile Terminated). | |
int | telephony_call_get_conference_status (telephony_call_h call_handle, bool *conference_status) |
Gets whether the call is conference call or not. | |
Typedefs | |
typedef struct telephony_call_info_s * | telephony_call_h |
The call handle. |
Typedef Documentation
typedef struct telephony_call_info_s* telephony_call_h |
The call handle.
- Since :
- 2.4
Enumeration Type Documentation
Enumeration for the preferred voice call subscription.
- Since :
- 2.4
Enumeration for the call status.
- Since :
- 2.4
Function Documentation
int telephony_call_get_call_list | ( | telephony_h | handle, |
unsigned int * | count, | ||
telephony_call_h ** | call_list | ||
) |
Gets the list of the current call.
This function is used to retrieve the list of active calls in progress. It takes the telephony handle as input and returns the number of existing calls along with their details. By calling this API, you can get an overview of all ongoing calls associated with your application's telephony session. However, it should be noted that the returned call list needs to be released by calling the 'telephony_call_release_call_list' function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
call_list
using telephony_call_release_call_list().
- Parameters:
-
[in] handle The handle from telephony_init() [out] count Count of the existing calls [out] call_list List of call information for existing calls
- 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
int telephony_call_get_conference_status | ( | telephony_call_h | call_handle, |
bool * | conference_status | ||
) |
Gets whether the call is conference call or not.
This function checks if a call is part of a conference call or a single individual call based on the provided call handle. By fetching the required call handle using the 'telephony_call_get_call_list' API, you can determine the nature of the call and adjust your application's functionality accordingly.
- Since :
- 2.4
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] conference_status The value whether the call is conference call or not (true: Conference call, false: Single call)
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_direction | ( | telephony_call_h | call_handle, |
telephony_call_direction_e * | direction | ||
) |
Gets whether the call is MO(Mobile Originated) call or MT(Mobile Terminated).
- Since :
- 2.4
This function determines whether a call originated from the mobile device (MO) or was received by the mobile device (MT), based on the provided call handle.
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] direction The direction of the call (telephony_call_direction_e)
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_handle_id | ( | telephony_call_h | call_handle, |
unsigned int * | handle_id | ||
) |
Gets the call handle ID.
This function retrieves the unique identifier (ID) associated with a given call handle. By utilizing this API, you can access specific attributes or perform actions related to a particular call within your application's telephony session.
- Since :
- 2.4
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] handle_id The ID of the call handle
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_number | ( | telephony_call_h | call_handle, |
char ** | number | ||
) |
Gets the call number.
- Since :
- 2.4
This function retrieves the phone number associated with a specified call handle. By providing the call handle obtained from the 'telephony_call_get_call_list' API as input, you can obtain the corresponding call number.
- Remarks:
- You must release
number
using free() on success case.
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] number The number of the call
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_preferred_voice_subscription | ( | telephony_h | handle, |
telephony_call_preferred_voice_subs_e * | call_sub | ||
) |
Gets the current value for the preferred voice call subscription. This function is used to retrieve the current value for the preferred voice call subscription. It requires the handle obtained from the telephony_init() function as an argument and returns the currently set preferred call subscription value in the form of telephony_call_preferred_voice_subs_e.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle from telephony_init() [out] call_sub The currently set preferred call subscription value. (telephony_call_preferred_voice_subs_e)
- 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
int telephony_call_get_status | ( | telephony_call_h | call_handle, |
telephony_call_status_e * | status | ||
) |
Gets the call status.
This function retrieves the current status of a call based on its handle. Understanding the call status enables you to implement accurate response mechanisms tailored to each situation.
- Since :
- 2.4
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] status The status of the call (telephony_call_status_e)
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_type | ( | telephony_call_h | call_handle, |
telephony_call_type_e * | type | ||
) |
Gets the call type.
This function retrieves the type of a specified call based on its handle. Knowing the call type allows you to provide appropriate handling mechanisms according to different scenarios.
- Since :
- 2.4
- Parameters:
-
[in] call_handle The handle from telephony_call_get_call_list() [out] type The type of the call (telephony_call_type_e)
- 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
- Precondition:
- The call handle should be obtained from telephony_call_get_call_list().
- Postcondition:
- The call list should be released by using telephony_call_release_call_list().
int telephony_call_release_call_list | ( | unsigned int | count, |
telephony_call_h ** | call_list | ||
) |
Releases the list allocated from telephony_call_get_call_list().
This function releases the memory occupied by the call list obtained through the 'telephony_call_get_call_list' API. By invoking this API, you ensure that the resources consumed by the call list are freed up, allowing them to be reused elsewhere within your application or system. Remember that before releasing the call list, it is crucial to validate its validity using the 'telephony_call_validate_call_list' function.
- Since :
- 2.4
- Parameters:
-
[in] count The count of the calls from telephony_call_get_call_list() [in] call_list The handle from telephony_call_get_call_list()
- 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
- Precondition:
- The call list should be validated from telephony_call_get_call_list().