Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
Data Structures | |
struct | _ClientThreadData_t |
Macros | |
#define | LOCK_INIT le_mutex_Lock(le_ifgen_InitMutexRef); |
Locks the mutex. More... | |
#define | UNLOCK_INIT le_mutex_Unlock(le_ifgen_InitMutexRef); |
Unlocks the mutex. More... | |
Variables | |
static le_mem_PoolRef_t | _ClientThreadDataPool |
static pthread_key_t | _ThreadDataKey |
static bool | CommonDataInitialized = false |
le_mutex_Ref_t | le_ifgen_InitMutexRef |
#define LOCK_INIT le_mutex_Lock(le_ifgen_InitMutexRef); |
Locks the mutex.
#define UNLOCK_INIT le_mutex_Unlock(le_ifgen_InitMutexRef); |
Unlocks the mutex.
LE_MEM_DEFINE_STATIC_POOL | ( | taf_dcs_ClientThreadData | , |
LE_CDATA_COMPONENT_COUNT | , | ||
sizeof(_ClientThreadData_t) | |||
) |
Static pool for client threads.
|
static |
Initialize thread specific data, and connect to the service for the current thread.
|
static |
Get a pointer to the client thread data for the current thread.
If the current thread does not have client data, then NULL is returned
__attribute__ | ( | (unused) | ) |
Return the sessionRef for the current thread.
If the current thread does not have a session ref, then this is a fatal error.
|
static |
Destructor function for client thread objects.
|
static |
Init data that is common across all threads.
|
static |
Connect to the service, using either blocking or non-blocking calls.
This function implements the details of the public ConnectService functions.
void taf_dcs_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see apiFilesC_client.
This function is created automatically.
le_result_t taf_dcs_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see apiFilesC_client.
This function is created automatically.
|
static |
void taf_dcs_SetServerDisconnectHandler | ( | taf_dcs_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
|
static |
void taf_dcs_SetNonExitServerDisconnectHandler | ( | taf_dcs_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected without exiting.
When a server connection is lost, call this handler without exit.
void taf_dcs_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see apiFilesC_client.
This function is created automatically.
le_result_t taf_dcs_StartSession | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Starts a synchronous data cellular session for the given profile reference.
[in] | profileRef | The profile reference. |
void taf_dcs_StartSessionAsync | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_AsyncSessionHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Starts (asynchronously) a cellular data session for the given profile reference.
[in] | profileRef | The profile reference. |
[in] | handlerPtr | The handler. |
[in] | contextPtr |
le_result_t taf_dcs_StopSession | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Stops (synchronously) a cellular data session for the given profile reference.
[in] | profileRef | The profile reference. |
void taf_dcs_StopSessionAsync | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_AsyncSessionHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Stops (asynchronously) a cellular data session for the given profile reference.
[in] | profileRef | The profile reference. |
[in] | handlerPtr | The handler. |
[in] | contextPtr |
le_result_t taf_dcs_GetInterfaceName | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | ifName, | ||
size_t | ifNameSize | ||
) |
Gets a connected data call interface name.
[in] | profileRef | The profile reference. |
[out] | ifName | The interface name. |
[in] | ifNameSize |
taf_dcs_SessionStateHandlerRef_t taf_dcs_AddSessionStateHandler | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_SessionStateHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_dcs_SessionState'
The data call session event.
[in] | profileRef | The profile reference. |
[in] | handlerPtr | The event handler reference. |
[in] | contextPtr |
void taf_dcs_RemoveSessionStateHandler | ( | taf_dcs_SessionStateHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_dcs_SessionState'
[in] | handlerRef |
taf_dcs_RoamingStatusHandlerRef_t taf_dcs_AddRoamingStatusHandler | ( | taf_dcs_RoamingStatusHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_dcs_RoamingStatus'
Event to report roaming status.
[in] | handlerPtr | Handler for roaming status. |
[in] | contextPtr |
void taf_dcs_RemoveRoamingStatusHandler | ( | taf_dcs_RoamingStatusHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_dcs_RoamingStatus'
[in] | handlerRef |
le_result_t taf_dcs_GetRoamingStatus | ( | uint8_t | phoneId, |
bool * | isRoamingPtr, | ||
taf_dcs_RoamingType_t * | typePtr | ||
) |
Gets the roaming status.
[in] | phoneId | The phone ID. |
[out] | isRoamingPtr | True means that roaming is on; False means that |
[out] | typePtr | The roaming type. Valid only if roaming is on. |
le_result_t taf_dcs_GetIPv4Address | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | ipAddr, | ||
size_t | ipAddrSize | ||
) |
Gets the connected data session IPv4 address.
[in] | profileRef | The profile reference. |
[out] | ipAddr | The IPv4 address. |
[in] | ipAddrSize |
le_result_t taf_dcs_GetIPv4GatewayAddress | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | gatewayAddr, | ||
size_t | gatewayAddrSize | ||
) |
Gets the connected data session IPv4 gateway address.
[in] | profileRef | The profile reference. |
[out] | gatewayAddr | The IPv4 gateway address. |
[in] | gatewayAddrSize |
le_result_t taf_dcs_GetIPv4DNSAddresses | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | dns1AddrStr, | ||
size_t | dns1AddrStrSize, | ||
char * | dns2AddrStr, | ||
size_t | dns2AddrStrSize | ||
) |
Gets the connected data session primary and secondary DNS IPv4 addresses.
[in] | profileRef | The profile reference. |
[out] | dns1AddrStr | The IPv4 primary DNS address. |
[in] | dns1AddrStrSize | |
[out] | dns2AddrStr | The IPv4 secondary DNS address. |
[in] | dns2AddrStrSize |
le_result_t taf_dcs_GetIPv6Address | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | ipAddr, | ||
size_t | ipAddrSize | ||
) |
Gets the connected data session IPv6 address.
[in] | profileRef | The profile reference. |
[out] | ipAddr | The IPv6 address. |
[in] | ipAddrSize |
le_result_t taf_dcs_GetIPv6GatewayAddress | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | gatewayAddr, | ||
size_t | gatewayAddrSize | ||
) |
Gets the connected data session IPv6 gateway address.
[in] | profileRef | The profile reference. |
[out] | gatewayAddr | The IPv6 gateway address. |
[in] | gatewayAddrSize |
le_result_t taf_dcs_GetIPv6DNSAddresses | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | dns1AddrStr, | ||
size_t | dns1AddrStrSize, | ||
char * | dns2AddrStr, | ||
size_t | dns2AddrStrSize | ||
) |
Gets the connected data session primary and secondary DNS IPv6 addresses.
[in] | profileRef | The profile reference. |
[out] | dns1AddrStr | The IPv6 primary DNS address. |
[in] | dns1AddrStrSize | |
[out] | dns2AddrStr | The IPv6 secondary DNS address. |
[in] | dns2AddrStrSize |
le_result_t taf_dcs_GetSessionState | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_ConState_t * | connectionStatePtr | ||
) |
Gets the data session's current state.
[in] | profileRef | The profile reference. |
[out] | connectionStatePtr | The connection state. |
bool taf_dcs_IsIPv4 | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Checks if the data session is IPv4.
[in] | profileRef | The profile reference. |
bool taf_dcs_IsIPv6 | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Checks if the data session is IPv6.
[in] | profileRef | The profile reference. |
le_result_t taf_dcs_GetDataBearerTechnology | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_DataBearerTechnology_t * | dlDataBearerTechPtrPtr, | ||
taf_dcs_DataBearerTechnology_t * | ulDataBearerTechPtrPtr | ||
) |
Gets the connected data session data bearer technology.
[in] | profileRef | The profile reference. |
[out] | dlDataBearerTechPtrPtr | The downlink data bearer technology. |
[out] | ulDataBearerTechPtrPtr | The uplink data bearer technology. |
le_result_t taf_dcs_GetProfileList | ( | taf_dcs_ProfileInfo_t * | profileListPtr, |
size_t * | profileListSizePtr | ||
) |
Gets the data profile list.
[out] | profileListPtr | The profile list information. |
[in,out] | profileListSizePtr |
le_result_t taf_dcs_GetProfileListEx | ( | uint8_t | phoneId, |
taf_dcs_ProfileInfo_t * | profileListPtr, | ||
size_t * | profileListSizePtr | ||
) |
Gets the data profile list with the specified phone ID.
[in] | phoneId | The phone ID. |
[out] | profileListPtr | The profile list information. |
[in,out] | profileListSizePtr |
uint32_t taf_dcs_GetDefaultProfileIndex | ( | void | ) |
Gets the default profile index.
le_result_t taf_dcs_GetDefaultPhoneIdAndProfileId | ( | uint8_t * | phoneIdPtr, |
uint32_t * | profileIdPtr | ||
) |
Gets the default phone ID and profile index.
[out] | phoneIdPtr | The phone ID. |
[out] | profileIdPtr | The profile index. |
le_result_t taf_dcs_SetDefaultProfileIndex | ( | uint32_t | profileId | ) |
Sets the default profile index corresponding to the specified profile index.
[in] | profileId | The profile index. |
le_result_t taf_dcs_SetDefaultProfileIndexEx | ( | uint8_t | phoneId, |
uint32_t | profileId | ||
) |
Sets the default profile corresponding to the specified phone ID and profile index.
[in] | phoneId | The phone ID. |
[in] | profileId | The profile index. |
taf_dcs_ProfileRef_t taf_dcs_GetProfile | ( | uint32_t | profileId | ) |
Gets the profile reference for the given profile index.
[in] | profileId | The profile index. |
taf_dcs_ProfileRef_t taf_dcs_GetProfileEx | ( | uint8_t | phoneId, |
uint32_t | profileId | ||
) |
Gets the profile reference for the given phone ID and profile index.
[in] | phoneId | The phone ID. |
[in] | profileId | The profile index. |
uint32_t taf_dcs_GetProfileIndex | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Gets the profile index for the given profile reference.
[in] | profileRef | The profile reference. |
le_result_t taf_dcs_GetPhoneId | ( | taf_dcs_ProfileRef_t | profileRef, |
uint8_t * | phoneIdPtr | ||
) |
Gets the phone ID for the given profile reference.
[in] | profileRef | The profile reference. |
[out] | phoneIdPtr | The phone ID. |
le_result_t taf_dcs_SetAPN | ( | taf_dcs_ProfileRef_t | profileRef, |
const char *LE_NONNULL | apnName | ||
) |
Sets the data profile APN name.
[in] | profileRef | The profile reference. |
[in] | apnName | The APN name. |
le_result_t taf_dcs_GetAPN | ( | taf_dcs_ProfileRef_t | profileRef, |
char * | apnName, | ||
size_t | apnNameSize | ||
) |
Gets the data profile APN name.
[in] | profileRef | The profile reference. |
[out] | apnName | The APN name. |
[in] | apnNameSize |
le_result_t taf_dcs_GetApnTypes | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_ApnType_t * | apnTypePtr | ||
) |
Gets the data profile APN types.
[in] | profileRef | The profile reference. |
[out] | apnTypePtr | The APN type. |
le_result_t taf_dcs_SetPDP | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_Pdp_t | pdp | ||
) |
Sets the data profile PDP type.
[in] | profileRef | The profile reference. |
[in] | pdp | The PDP type. |
taf_dcs_Pdp_t taf_dcs_GetPDP | ( | taf_dcs_ProfileRef_t | profileRef | ) |
Gets the data profile PDP type.
[in] | profileRef | The profile reference. |
le_result_t taf_dcs_SetAuthentication | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_Auth_t | auth, | ||
const char *LE_NONNULL | userName, | ||
const char *LE_NONNULL | password | ||
) |
Set the data profile authentication type and username/password.
[in] | profileRef | The profile reference. |
[in] | auth | The authentication type. |
[in] | userName | The username. |
[in] | password | The password. |
le_result_t taf_dcs_GetAuthentication | ( | taf_dcs_ProfileRef_t | profileRef, |
taf_dcs_Auth_t * | authPtr, | ||
char * | userName, | ||
size_t | userNameSize, | ||
char * | password, | ||
size_t | passwordSize | ||
) |
Gets the data profile authentication type and username/password.
[in] | profileRef | The profile reference. |
[out] | authPtr | The authentication type. |
[out] | userName | The username. |
[in] | userNameSize | |
[out] | password | The password. |
[in] | passwordSize |
le_result_t taf_dcs_GetProfileIdByInterfaceName | ( | const char *LE_NONNULL | ifName, |
uint32_t * | profileIdPtr | ||
) |
Gets the data profile index by the interface name.
[in] | ifName | The interface name. |
[out] | profileIdPtr | The profile index. |
le_result_t taf_dcs_GetPhoneIdByInterfaceName | ( | const char *LE_NONNULL | ifName, |
uint8_t * | phoneIdPtr | ||
) |
Gets the phone ID by the interface name.
[in] | ifName | The interface name. |
[out] | phoneIdPtr | The phone ID. |
|
static |
The memory pool for client thread objects
|
static |
Key under which the pointer to the Thread Object (_ClientThreadData_t) will be kept in thread-local storage. This allows a thread to quickly get a pointer to its own Thread Object.
|
static |
This global flag is shared by all client threads, and is used to indicate whether the common data has been initialized.
le_mutex_Ref_t le_ifgen_InitMutexRef |
Mutex and associated macros for use with the above CommonDataInitialized.