Tizen(Headless) Native API
6.5
|
The Connection Cellular Profile API provides functions for managing the cellular profile.
Required Header
#include <net_connection.h>
Overview
The Connection Cellular Profile API provides functions for managing the cellular profile. You can manage the cellular profile using the functions.
Related Features
This API is related with the following features:
- 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.
Enumeration Type Documentation
Enumeration for cellular pdn type.
- Since :
- 3.0
- Remarks:
- Use CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead of CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6.
Enumeration for cellular service type.
- Since :
- 2.3
- Enumerator:
Function Documentation
int connection_profile_get_cellular_apn | ( | connection_profile_h | profile, |
char ** | apn | ||
) |
Gets the APN (access point name).
- Since :
- 2.3
- Remarks:
- You must release apn using free().
- Parameters:
-
[in] profile The profile handle [out] apn The name of the APN
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OUT_OF_MEMORY Out of memory CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_cellular_auth_info | ( | connection_profile_h | profile, |
connection_cellular_auth_type_e * | type, | ||
char ** | user_name, | ||
char ** | password | ||
) |
Gets the authentication information.
- Since :
- 2.3
- Remarks:
- You must release user_name and password using free().
- Parameters:
-
[in] profile The profile handle [out] type The type of the authentication [out] user_name The user name [out] password The password
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OUT_OF_MEMORY Out of memory CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_cellular_home_url | ( | connection_profile_h | profile, |
char ** | home_url | ||
) |
Gets the home URL.
- Since :
- 2.3
- Remarks:
- You must release home_url using free().
- Parameters:
-
[in] profile The profile handle [out] home_url The home URL
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OUT_OF_MEMORY Out of memory CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_cellular_pdn_type | ( | connection_profile_h | profile, |
connection_cellular_pdn_type_e * | type | ||
) |
Gets the cellular pdn type.
- Since :
- 3.0
- Parameters:
-
[in] profile The profile handle [out] type The cellular pdn type
- Returns:
0
on success, otherwise negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_cellular_roam_pdn_type | ( | connection_profile_h | profile, |
connection_cellular_pdn_type_e * | type | ||
) |
Gets the cellular roam pdn type.
- Since :
- 3.0
- Parameters:
-
[in] profile The profile handle [out] type The cellular pdn type
- Returns:
0
on success, otherwise negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_cellular_service_type | ( | connection_profile_h | profile, |
connection_cellular_service_type_e * | type | ||
) |
Gets the service type.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [out] type The type of the cellular service
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_cellular_default | ( | connection_profile_h | profile, |
bool * | is_default | ||
) |
Checks whether the profile is default.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [out] is_default true
if the profile is default, otherwisefalse
if the profile is not default
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_cellular_editable | ( | connection_profile_h | profile, |
bool * | is_editable | ||
) |
Checks whether the profile is editable.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [out] is_editable true
if the profile is editable, otherwisefalse
if the profile is not editable
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_cellular_hidden | ( | connection_profile_h | profile, |
bool * | is_hidden | ||
) |
Checks whether the profile is hidden.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [out] is_hidden true
if the profile is in hidden, otherwisefalse
if the profile is not hidden
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_cellular_roaming | ( | connection_profile_h | profile, |
bool * | is_roaming | ||
) |
Checks whether the connection is in roaming state.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [out] is_roaming true
if the cellular is roaming, otherwisefalse
if it is not roaming
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_set_cellular_apn | ( | connection_profile_h | profile, |
const char * | apn | ||
) |
Sets the APN (Access Point Name).
- Since :
- 2.3
- Remarks:
- You must release apn using free().
- Parameters:
-
[in] profile The profile handle [in] apn The name of APN
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
- See also:
- connection_update_profile()
int connection_profile_set_cellular_auth_info | ( | connection_profile_h | profile, |
connection_cellular_auth_type_e | type, | ||
const char * | user_name, | ||
const char * | password | ||
) |
Sets the Authentication information.
- Since :
- 2.3
- Remarks:
- You must release user_name using free().
- Parameters:
-
[in] profile The profile handle [in] type The type of the authentication [in] user_name The user name [in] password The password
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
- See also:
- connection_update_profile()
int connection_profile_set_cellular_home_url | ( | connection_profile_h | profile, |
const char * | home_url | ||
) |
Sets the home URL.
- Since :
- 2.3
- Remarks:
- You must release home_url using free().
- Parameters:
-
[in] profile The profile handle [in] home_url The home URL
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
- See also:
- connection_update_profile()
int connection_profile_set_cellular_pdn_type | ( | connection_profile_h | profile, |
connection_cellular_pdn_type_e | type | ||
) |
Sets the cellular pdn type.
- Since :
- 3.0
- Parameters:
-
[in] profile The profile handle [in] type The cellular pdn type
- Returns:
0
on success, otherwise negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_set_cellular_roam_pdn_type | ( | connection_profile_h | profile, |
connection_cellular_pdn_type_e | type | ||
) |
Sets the cellular roam pdn type.
- Since :
- 3.0
- Parameters:
-
[in] profile The profile handle [in] type The cellular pdn type
- Returns:
0
on success, otherwise negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_set_cellular_service_type | ( | connection_profile_h | profile, |
connection_cellular_service_type_e | service_type | ||
) |
Sets the service type.
- Since :
- 2.3
- Parameters:
-
[in] profile The profile handle [in] service_type The type of cellular service
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_NOT_INITIALIZED Not initialized CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
- See also:
- connection_update_profile()