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_sms_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_sms_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_sms_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_sms_SetServerDisconnectHandler | ( | taf_sms_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_sms_SetNonExitServerDisconnectHandler | ( | taf_sms_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_sms_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.
taf_sms_MsgListRef_t taf_sms_CreateRxMsgList | ( | void | ) |
Creates a message list for accessing messages.
void taf_sms_DeleteList | ( | taf_sms_MsgListRef_t | msgListRef | ) |
Deletes a message list.
[in] | msgListRef | Message list reference. |
taf_sms_RxMsgHandlerRef_t taf_sms_AddRxMsgHandler | ( | taf_sms_RxMsgHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_sms_RxMsg'
Event for handler usage.
[in] | handlerPtr | Handler for receiving messages. |
[in] | contextPtr |
void taf_sms_RemoveRxMsgHandler | ( | taf_sms_RxMsgHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_sms_RxMsg'
[in] | handlerRef |
taf_sms_FullStorageEventHandlerRef_t taf_sms_AddFullStorageEventHandler | ( | taf_sms_FullStorageHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_sms_FullStorageEvent'
Event for information on full storage notifications.
[in] | handlerPtr | Handler for full storage indications. |
[in] | contextPtr |
void taf_sms_RemoveFullStorageEventHandler | ( | taf_sms_FullStorageEventHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_sms_FullStorageEvent'
[in] | handlerRef |
taf_sms_MsgRef_t taf_sms_GetFirst | ( | taf_sms_MsgListRef_t | msgListRef | ) |
Gets the first message in the given list.
[in] | msgListRef | Message list reference. |
taf_sms_MsgRef_t taf_sms_GetNext | ( | taf_sms_MsgListRef_t | msgListRef | ) |
Gets the next message in the list.
[in] | msgListRef | Message list reference. |
taf_sms_SendStatus_t taf_sms_GetSendStatus | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's send status.
[in] | msgRef | Message reference. |
taf_sms_ReadStatus_t taf_sms_GetReadStatus | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's read status.
[in] | msgRef | Message reference. |
taf_sms_LockStatus_t taf_sms_GetLockStatus | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's lock status.
[in] | msgRef | Message reference. |
taf_sms_MsgRef_t taf_sms_Create | ( | void | ) |
Creates a new message to send.
le_result_t taf_sms_SetDestination | ( | taf_sms_MsgRef_t | msgRef, |
const char *LE_NONNULL | dest | ||
) |
Sets the message's destination phone number.
[in] | msgRef | Message reference. |
[in] | dest | Destination number. |
le_result_t taf_sms_SetText | ( | taf_sms_MsgRef_t | msgRef, |
const char *LE_NONNULL | text | ||
) |
Sets the message's text.
[in] | msgRef | Message reference. |
[in] | text | Text message. |
le_result_t taf_sms_SetBinary | ( | taf_sms_MsgRef_t | msgRef, |
const uint8_t * | binPtr, | ||
size_t | binSize | ||
) |
Sets the message's binary content.
[in] | msgRef | Message reference. |
[in] | binPtr | Binary data. |
[in] | binSize |
le_result_t taf_sms_SetUCS2 | ( | taf_sms_MsgRef_t | msgRef, |
const uint16_t * | ucs2Ptr, | ||
size_t | ucs2Size | ||
) |
Sets the message's UCS2 content.
[in] | msgRef | Message reference. |
[in] | ucs2Ptr | UCS2 message. |
[in] | ucs2Size |
le_result_t taf_sms_SetPDU | ( | taf_sms_MsgRef_t | msgRef, |
const uint8_t * | pduPtr, | ||
size_t | pduSize | ||
) |
Sets the message's PDU format.
[in] | msgRef | Message reference. |
[in] | pduPtr | Message in PDU format. |
[in] | pduSize |
le_result_t taf_sms_SetCallback | ( | taf_sms_MsgRef_t | msgRef, |
taf_sms_CallbackResultFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Sets the message's callback function.
[in] | msgRef | Message reference. |
[in] | handlerPtr | Handler for sending message. |
[in] | contextPtr |
le_result_t taf_sms_SetPhoneId | ( | taf_sms_MsgRef_t | msgRef, |
uint8_t | phoneId | ||
) |
Sets the phone ID function for the message; phone ID must be 1 or 2 (for DSDA use case).
[in] | msgRef | Message reference. |
[in] | phoneId | Phone ID. |
void taf_sms_Delete | ( | taf_sms_MsgRef_t | msgRef | ) |
Deletes a message from the message list, if there is no message list reference, it deletes the message from storage.
[in] | msgRef | Message reference. |
le_result_t taf_sms_GetPhoneId | ( | taf_sms_MsgRef_t | msgRef, |
uint8_t * | phoneIdPtr | ||
) |
Gets the message's phone ID (only for the messages stored in the SIM or created by the client).
[in] | msgRef | Message reference. |
[out] | phoneIdPtr | Pointer to the stored phone ID. |
le_result_t taf_sms_GetSenderTel | ( | taf_sms_MsgRef_t | msgRef, |
char * | tel, | ||
size_t | telSize | ||
) |
Gets the message sender's phone number.
[in] | msgRef | Message reference. |
[out] | tel | Buffer to store sender's number. |
[in] | telSize |
le_result_t taf_sms_GetText | ( | taf_sms_MsgRef_t | msgRef, |
char * | text, | ||
size_t | textSize | ||
) |
Gets the message's text.
[in] | msgRef | Message reference. |
[out] | text | Buffer to store message text. |
[in] | textSize |
le_result_t taf_sms_GetBinary | ( | taf_sms_MsgRef_t | msgRef, |
uint8_t * | binPtr, | ||
size_t * | binSizePtr | ||
) |
Gets the message's binary data.
[in] | msgRef | Message reference. |
[out] | binPtr | Buffer to store binary data. |
[in,out] | binSizePtr |
le_result_t taf_sms_GetUCS2 | ( | taf_sms_MsgRef_t | msgRef, |
uint16_t * | ucs2Ptr, | ||
size_t * | ucs2SizePtr | ||
) |
Gets the message's UCS2 encoding.
[in] | msgRef | Message reference. |
[out] | ucs2Ptr | Buffer to store UCS2 characters. |
[in,out] | ucs2SizePtr |
le_result_t taf_sms_GetPDU | ( | taf_sms_MsgRef_t | msgRef, |
uint8_t * | pduPtr, | ||
size_t * | pduSizePtr | ||
) |
Gets the message's PDU data.
[in] | msgRef | Message reference. |
[out] | pduPtr | Buffer to store PDU data. |
[in,out] | pduSizePtr |
size_t taf_sms_GetPDULen | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's PDU length.
[in] | msgRef | Message reference. |
taf_sms_Type_t taf_sms_GetType | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's type.
[in] | msgRef | Message reference. |
taf_sms_Format_t taf_sms_GetFormat | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's format.
[in] | msgRef | Message reference. |
size_t taf_sms_GetUserdataLen | ( | taf_sms_MsgRef_t | msgRef | ) |
Gets the message's text length.
[in] | msgRef | Message reference. |
le_result_t taf_sms_Send | ( | taf_sms_MsgRef_t | msgRef | ) |
Send the message.
[in] | msgRef | Message reference. |
le_result_t taf_sms_DeleteFromStorage | ( | taf_sms_MsgRef_t | msgRef | ) |
Deletes a message from storage.
[in] | msgRef | Message reference. |
le_result_t taf_sms_DeleteAllFromStorage | ( | taf_sms_Storage_t | storage | ) |
Deletes all messages from storage.
[in] | storage |
void taf_sms_MarkRead | ( | taf_sms_MsgRef_t | msgRef | ) |
Marks a message's status as read.
[in] | msgRef | Message reference. |
void taf_sms_MarkUnread | ( | taf_sms_MsgRef_t | msgRef | ) |
Marks a message's status as unread.
[in] | msgRef | Message reference. |
le_result_t taf_sms_LockFromStorage | ( | taf_sms_MsgRef_t | msgRef | ) |
Marks a message's lock status as locked; the message cannot be deleted from storage.
[in] | msgRef | Message reference. |
le_result_t taf_sms_UnlockFromStorage | ( | taf_sms_MsgRef_t | msgRef | ) |
Marks a message's lock status as unlocked; the message can be deleted from storage.
[in] | msgRef | Message reference. |
le_result_t taf_sms_EncryptFromStorage | ( | taf_sms_MsgRef_t | msgRef | ) |
Encrypts a message which is stored in HLOS.
[in] | msgRef | Message reference. |
le_result_t taf_sms_GetSmsCenterAddress | ( | uint8_t | phoneId, |
char * | addr, | ||
size_t | addrSize | ||
) |
Gets the SMS center address for the specified phone ID.
[in] | phoneId | Phone ID. |
[out] | addr | Buffer to store SMS center address. |
[in] | addrSize |
le_result_t taf_sms_SetSmsCenterAddress | ( | uint8_t | phoneId, |
const char *LE_NONNULL | addr | ||
) |
Sets the SMS center address for the specified phone ID.
[in] | phoneId | Phone ID. |
[in] | addr | SMS center address. |
le_result_t taf_sms_SetPreferredStorage | ( | taf_sms_Storage_t | prefStorage | ) |
Sets the preferred SMS storage place.
[in] | prefStorage | Preferred storage type. |
le_result_t taf_sms_GetPreferredStorage | ( | taf_sms_Storage_t * | prefStoragePtr | ) |
Gets the preferred SMS storage place.
[out] | prefStoragePtr | Preferred storage type. |
le_result_t taf_sms_SendPduMsg | ( | const uint8_t * | dataPtrPtr, |
size_t | dataPtrSize, | ||
uint32_t | timeout | ||
) |
Sends a PDU message.
[in] | dataPtrPtr | Message in PDU format. |
[in] | dataPtrSize | |
[in] | timeout | Timeout value message sent. |
le_result_t taf_sms_SendPduMsgEx | ( | uint8_t | phoneId, |
const uint8_t * | dataPtrPtr, | ||
size_t | dataPtrSize, | ||
uint32_t | timeout | ||
) |
Sends a PDU message with phone ID.
[in] | phoneId | Phone ID. |
[in] | dataPtrPtr | Message in PDU format. |
[in] | dataPtrSize | |
[in] | timeout | Timeout value message sent. |
le_result_t taf_sms_ActivateCellBroadcast | ( | uint8_t | phoneId | ) |
Activates cell broadcast for the specified phone ID.
[in] | phoneId | Phone ID. |
le_result_t taf_sms_DeactivateCellBroadcast | ( | uint8_t | phoneId | ) |
Deactivates cell broadcast for the specified phone ID.
[in] | phoneId | Phone ID. |
le_result_t taf_sms_AddCellBroadcastIds | ( | uint8_t | phoneId, |
uint16_t | fromId, | ||
uint16_t | toId | ||
) |
Adds cell broadcast message range of identifier for the specified phone ID.
[in] | phoneId | Phone ID. |
[in] | fromId | Starting point of the filter. |
[in] | toId | Ending point of the filter. |
le_result_t taf_sms_RemoveCellBroadcastIds | ( | uint8_t | phoneId, |
uint16_t | fromId, | ||
uint16_t | toId | ||
) |
Removes cell broadcast range of message identifiers for the specified phone ID.
[in] | phoneId | Phone ID. |
[in] | fromId | Starting point of the range. |
[in] | toId | Ending point of the range. |
|
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.