le_sms_interface.h File Reference
Go to the source code of this file.
Macros | |
#define | LE_SMS_TIMESTAMP_MAX_LEN 20 |
#define | LE_SMS_TIMESTAMP_MAX_BYTES 21 |
#define | LE_SMS_TEXT_MAX_LEN 160 |
#define | LE_SMS_TEXT_MAX_BYTES 161 |
#define | LE_SMS_BINARY_MAX_BYTES 140 |
#define | LE_SMS_UCS2_MAX_BYTES 140 |
#define | LE_SMS_UCS2_MAX_CHARS 70 |
#define | LE_SMS_PDU_MAX_PAYLOAD 140 |
#define | LE_SMS_PDU_MAX_BYTES 176 |
Typedefs | |
typedef void(* | le_sms_DisconnectHandler_t) (void *) |
typedef struct le_sms_Msg * | le_sms_MsgRef_t |
typedef struct le_sms_MsgList * | le_sms_MsgListRef_t |
typedef struct le_sms_RxMessageHandler * | le_sms_RxMessageHandlerRef_t |
typedef struct le_sms_FullStorageEventHandler * | le_sms_FullStorageEventHandlerRef_t |
typedef void(* | le_sms_CallbackResultFunc_t) (le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr) |
typedef void(* | le_sms_RxMessageHandlerFunc_t) (le_sms_MsgRef_t msgRef, void *contextPtr) |
typedef void(* | le_sms_FullStorageHandlerFunc_t) (le_sms_Storage_t storage, void *contextPtr) |
Detailed Description
Legato SMS include file.
Copyright (C) Sierra Wireless Inc.
Macro Definition Documentation
#define LE_SMS_BINARY_MAX_BYTES 140 |
The raw binary message can be up to 140 bytes long.
#define LE_SMS_PDU_MAX_BYTES 176 |
The PDU message can be up to 36 (header) + 140 (payload) bytes long.
#define LE_SMS_PDU_MAX_PAYLOAD 140 |
The PDU payload bytes long.
#define LE_SMS_TEXT_MAX_BYTES 161 |
Test message string length (including the null-terminator).
#define LE_SMS_TEXT_MAX_LEN 160 |
The text message can be up to 160 characters long. One extra byte is added for the null character.
#define LE_SMS_TIMESTAMP_MAX_BYTES 21 |
Time stamp string length (including the null-terminator).
#define LE_SMS_TIMESTAMP_MAX_LEN 20 |
Time stamp string length. The string format is "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone). One extra byte is added for the null character.
#define LE_SMS_UCS2_MAX_BYTES 140 |
The UCS2 message can be up to 140 bytes long (70 characters).
#define LE_SMS_UCS2_MAX_CHARS 70 |
The UCS2 message can be up to 70 characters (140 bytes long).
Typedef Documentation
typedef void(* le_sms_CallbackResultFunc_t) (le_sms_MsgRef_t msgRef,le_sms_Status_t status,void *contextPtr) |
Handler for Sending result.
typedef void(* le_sms_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
typedef struct le_sms_FullStorageEventHandler* le_sms_FullStorageEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_sms_FullStorageEvent'
typedef void(* le_sms_FullStorageHandlerFunc_t) (le_sms_Storage_t storage,void *contextPtr) |
Handler for full storage indication.
typedef struct le_sms_MsgList* le_sms_MsgListRef_t |
Opaque type for SMS Message Listing.
typedef struct le_sms_Msg* le_sms_MsgRef_t |
Declare a reference type for referring to SMS Message objects.
typedef void(* le_sms_RxMessageHandlerFunc_t) (le_sms_MsgRef_t msgRef,void *contextPtr) |
Handler for New Message.
typedef struct le_sms_RxMessageHandler* le_sms_RxMessageHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_sms_RxMessage'
Enumeration Type Documentation
CDMA Cell broadcast Service Categories.
3GPP2 Message Error code when the message sending has failed.
enum le_sms_ErrorCode_t |
Message Error code when the message sending has failed.
enum le_sms_Format_t |
enum le_sms_Languages_t |
CDMA Cell broadcast message languages.
enum le_sms_Status_t |
Message Status.
enum le_sms_Storage_t |
enum le_sms_Type_t |
Function Documentation
le_result_t le_sms_ActivateCdmaCellBroadcast | ( | void | ) |
Activate CDMA Cell Broadcast message notification
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
le_result_t le_sms_ActivateCellBroadcast | ( | void | ) |
Activate Cell Broadcast message notification
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
le_result_t le_sms_AddCdmaCellBroadcastServices | ( | le_sms_CdmaServiceCat_t | serviceCat, |
le_sms_Languages_t | language | ||
) |
Add CDMA Cell Broadcast category services.
- Returns
- LE_FAULT Function failed.
- LE_BAD_PARAMETER Parameter is invalid.
- LE_OK Function succeeded.
- Parameters
-
[in] serviceCat Service category assignment. Reference to 3GPP2 C.R1001-D v1.0 Section 9.3.1 Standard Service Category Assignments. [in] language Language Indicator. Reference to 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator Value Assignments
le_result_t le_sms_AddCellBroadcastIds | ( | uint16_t | fromId, |
uint16_t | toId | ||
) |
Add Cell Broadcast message Identifiers range.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] fromId Starting point of the range of cell broadcast message identifier. [in] toId Ending point of the range of cell broadcast message identifier.
le_sms_FullStorageEventHandlerRef_t le_sms_AddFullStorageEventHandler | ( | le_sms_FullStorageHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_sms_FullStorageEvent'
This event provides information on full storage indication.
- Parameters
-
[in] handlerPtr [in] contextPtr
le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler | ( | le_sms_RxMessageHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_sms_RxMessage'
This event provides information on new received messages.
- Parameters
-
[in] handlerPtr [in] contextPtr
le_result_t le_sms_ClearCdmaCellBroadcastServices | ( | void | ) |
Clear CDMA Cell Broadcast category services.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
le_result_t le_sms_ClearCellBroadcastIds | ( | void | ) |
Clear Cell Broadcast message Identifiers.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
void le_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 Client-specific Functions.
This function is created automatically.
le_sms_MsgRef_t le_sms_Create | ( | void | ) |
Create an SMS Message data structure.
- Returns
- Reference to the new Message object.
- Note
- On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
le_sms_MsgListRef_t le_sms_CreateRxMsgList | ( | void | ) |
Create an object's reference of the list of received messages saved in the SMS message storage area.
- Returns
- Reference to the List object. Null pointer if no messages have been retrieved.
le_result_t le_sms_DeactivateCdmaCellBroadcast | ( | void | ) |
Deactivate CDMA Cell Broadcast message notification
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
le_result_t le_sms_DeactivateCellBroadcast | ( | void | ) |
Deactivate Cell Broadcast message notification
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
void le_sms_Delete | ( | le_sms_MsgRef_t | msgRef | ) |
Delete a Message data structure.
It deletes the Message data structure and all the allocated memory is freed. If several users own the Message object (e.g., several handler functions registered for SMS message reception), the Message object will only be deleted if one User owns the Message object.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_DeleteFromStorage | ( | le_sms_MsgRef_t | msgRef | ) |
Delete an SMS message from the storage area.
Verifies first if the parameter is valid, then it checks the modem state can support message deleting.
- Returns
- LE_FAULT Function failed to perform the deletion.
- LE_NO_MEMORY The message is not present in storage area.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
void le_sms_DeleteList | ( | le_sms_MsgListRef_t | msgListRef | ) |
Delete the list of the Messages retrieved from the message storage.
- Note
- On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
- Parameters
-
[in] msgListRef Messages list.
le_result_t le_sms_DisableStatusReport | ( | void | ) |
Disable SMS Status Report for outgoing messages.
- Returns
- LE_OK Function succeeded.
- LE_FAULT Function failed.
void le_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 Client-specific Functions.
This function is created automatically.
le_result_t le_sms_EnableStatusReport | ( | void | ) |
Enable SMS Status Report for outgoing messages.
- Returns
- LE_OK Function succeeded.
- LE_FAULT Function failed.
le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode | ( | le_sms_MsgRef_t | msgRef | ) |
Get the error code when a 3GPP2 message sending has Failed.
- Returns
- The error code
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- It is only applicable for 3GPP2 message sending failure, otherwise LE_SMS_ERROR_3GPP2_MAX is returned.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_GetBinary | ( | le_sms_MsgRef_t | msgRef, |
uint8_t * | binPtr, | ||
size_t * | binSizePtr | ||
) |
Get the binary Message.
Output parameters are updated with the binary message content and the length of the raw binary message in bytes. If the binary data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is returned and 'raw' is filled until 'len' bytes.
- Returns
- LE_FORMAT_ERROR Message is not in binary format
- LE_OVERFLOW Message length exceed the maximum length.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] binPtr Binary message. [in,out] binSizePtr
le_result_t le_sms_GetCellBroadcastId | ( | le_sms_MsgRef_t | msgRef, |
uint16_t * | messageIdPtr | ||
) |
Get the Cell Broadcast Message Identifier.
- Returns
- LE_FAULT Message is not a cell broadcast type.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] messageIdPtr Cell Broadcast Message Identifier.
le_result_t le_sms_GetCellBroadcastSerialNumber | ( | le_sms_MsgRef_t | msgRef, |
uint16_t * | serialNumberPtr | ||
) |
Get the Cell Broadcast Message Serial Number.
- Returns
- LE_FAULT Message is not a cell broadcast type.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] serialNumberPtr Cell Broadcast Serial Number.
le_result_t le_sms_GetCount | ( | le_sms_Type_t | messageType, |
int32_t * | messageCountPtr | ||
) |
Get the number of messages successfully received or sent since last counter reset.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER A parameter is invalid.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] messageType Message type [out] messageCountPtr Number of messages
void le_sms_GetErrorCode | ( | le_sms_MsgRef_t | msgRef, |
le_sms_ErrorCode_t * | rpCausePtr, | ||
le_sms_ErrorCode_t * | tpCausePtr | ||
) |
Get the Radio Protocol and the Transfer Protocol error code when a 3GPP message sending has failed.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- It is only applicable for 3GPP message sending failure, otherwise LE_SMS_ERROR_3GPP_MAX is returned.
- Parameters
-
[in] msgRef Reference to the message object. [out] rpCausePtr Radio Protocol cause code. [out] tpCausePtr Transfer Protocol cause code.
le_sms_MsgRef_t le_sms_GetFirst | ( | le_sms_MsgListRef_t | msgListRef | ) |
Get the first Message object reference in the list of messages retrieved with le_sms_CreateRxMsgList().
- Returns
- NULL No message found.
- Msg Message object reference.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgListRef Messages list.
le_sms_Format_t le_sms_GetFormat | ( | le_sms_MsgRef_t | msgRef | ) |
Get the message format.
- Returns
- Message format.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_sms_MsgRef_t le_sms_GetNext | ( | le_sms_MsgListRef_t | msgListRef | ) |
Get the next Message object reference in the list of messages retrieved with le_sms_CreateRxMsgList().
- Returns
- NULL No message found.
- Msg Message object reference.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgListRef Messages list.
le_result_t le_sms_GetPDU | ( | le_sms_MsgRef_t | msgRef, |
uint8_t * | pduPtr, | ||
size_t * | pduSizePtr | ||
) |
Get the PDU message.
Output parameters are updated with the PDU message content and the length of the PDU message in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is returned and 'pdu' is filled until 'len' bytes.
- Returns
- LE_FORMAT_ERROR Unable to encode the message in PDU (only for outgoing messages).
- LE_OVERFLOW Message length exceed the maximum length.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] pduPtr PDU message. [in,out] pduSizePtr
size_t le_sms_GetPDULen | ( | le_sms_MsgRef_t | msgRef | ) |
Get the message Length value.
- Returns
- Length of the data in bytes of the PDU message.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
int32_t le_sms_GetPlatformSpecificErrorCode | ( | le_sms_MsgRef_t | msgRef | ) |
Called to get the platform specific error code.
- Returns
- The platform specific error code.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_GetPreferredStorage | ( | le_sms_Storage_t * | prefStoragePtr | ) |
Get the preferred SMS storage for incoming messages.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[out] prefStoragePtr storage parameter.
le_result_t le_sms_GetSenderTel | ( | le_sms_MsgRef_t | msgRef, |
char * | tel, | ||
size_t | telSize | ||
) |
Get the Sender Telephone number.
Output parameter is updated with the Telephone number. If the Telephone number string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
- Returns
- LE_NOT_PERMITTED Message is not a received message.
- LE_OVERFLOW Telephone number length exceed the maximum length.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] tel Telephone number string. [in] telSize
le_result_t le_sms_GetSmsCenterAddress | ( | char * | tel, |
size_t | telSize | ||
) |
Get the SMS center address.
Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
- Returns
- LE_FAULT Service is not available.
- LE_OVERFLOW Telephone number length exceed the maximum length.
- LE_OK Function succeeded.
- Parameters
-
[out] tel SMS center address number string. [in] telSize
le_sms_Status_t le_sms_GetStatus | ( | le_sms_MsgRef_t | msgRef | ) |
Read the Message status (Received Read, Received Unread, Stored Sent, Stored Unsent).
- Returns
- Status of the message.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Messages list.
le_result_t le_sms_GetText | ( | le_sms_MsgRef_t | msgRef, |
char * | text, | ||
size_t | textSize | ||
) |
Get the text Message.
Output parameter is updated with the text string encoded in ASCII format. If the text string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'text'.
- Returns
- LE_OVERFLOW Message length exceed the maximum length.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] text SMS text. [in] textSize
le_result_t le_sms_GetTimeStamp | ( | le_sms_MsgRef_t | msgRef, |
char * | timestamp, | ||
size_t | timestampSize | ||
) |
Get the Service Center Time Stamp string.
Output parameter is updated with the Time Stamp string. If the Time Stamp string exceeds the value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'timestamp'.
- Returns
- LE_NOT_PERMITTED Message is not a received message.
- LE_OVERFLOW Timestamp number length exceed the maximum length.
- LE_OK Function succeeded.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [out] timestamp Message time stamp (in text mode). string format: "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone) The time zone indicates the difference, expressed in quarters of an hours between the local time and GMT. [in] timestampSize
le_result_t le_sms_GetTpDt | ( | le_sms_MsgRef_t | msgRef, |
char * | dt, | ||
size_t | dtSize | ||
) |
Get TP-Discharge-Time of SMS Status Report. TP-Discharge-Time is defined in 3GPP TS 23.040 section 9.2.3.13.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER A parameter is invalid.
- LE_OVERFLOW The Discharge Time length exceeds the length of the provided buffer.
- LE_FAULT Function failed.
- Parameters
-
[in] msgRef Reference to the message object. [out] dt 3GPP TS 23.040 TP-Discharge-Time. [in] dtSize
le_result_t le_sms_GetTpMr | ( | le_sms_MsgRef_t | msgRef, |
uint8_t * | tpMrPtr | ||
) |
Get TP-Message-Reference of SMS Status Report. TP-Message-Reference is defined in 3GPP TS 23.040 section 9.2.3.6.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER Parameter is invalid.
- LE_FAULT Function failed.
- Parameters
-
[in] msgRef Reference to the message object. [out] tpMrPtr 3GPP TS 23.040 TP-Message-Reference.
le_result_t le_sms_GetTpRa | ( | le_sms_MsgRef_t | msgRef, |
uint8_t * | toraPtr, | ||
char * | ra, | ||
size_t | raSize | ||
) |
Get TP-Recipient-Address of SMS Status Report. TP-Recipient-Address is defined in 3GPP TS 23.040 section 9.2.3.14. TP-Recipient-Address Type-of-Address is defined in 3GPP TS 24.011 section 8.2.5.2.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER A parameter is invalid.
- LE_OVERFLOW The Recipient Address length exceeds the length of the provided buffer.
- LE_FAULT Function failed.
- Parameters
-
[in] msgRef Reference to the message object. [out] toraPtr 3GPP TS 24.011 TP-Recipient-Address Type-of-Address. [out] ra 3GPP TS 23.040 TP-Recipient-Address. [in] raSize
le_result_t le_sms_GetTpScTs | ( | le_sms_MsgRef_t | msgRef, |
char * | scts, | ||
size_t | sctsSize | ||
) |
Get TP-Service-Centre-Time-Stamp of SMS Status Report. TP-Service-Centre-Time-Stamp is defined in 3GPP TS 23.040 section 9.2.3.11.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER A parameter is invalid.
- LE_OVERFLOW The SC Timestamp length exceeds the length of the provided buffer.
- LE_FAULT Function failed.
- Parameters
-
[in] msgRef Reference to the message object. [out] scts 3GPP TS 23.040 TP-Service-Centre-Time-Stamp. [in] sctsSize
le_result_t le_sms_GetTpSt | ( | le_sms_MsgRef_t | msgRef, |
uint8_t * | stPtr | ||
) |
Get TP-Status of SMS Status Report. TP-Status is defined in 3GPP TS 23.040 section 9.2.3.15.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER A parameter is invalid.
- LE_FAULT Function failed.
- Parameters
-
[in] msgRef Reference to the message object. [out] stPtr 3GPP TS 23.040 TP-Status.
le_sms_Type_t le_sms_GetType | ( | le_sms_MsgRef_t | msgRef | ) |
Get the message type.
- Returns
- Message type.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_GetUCS2 | ( | le_sms_MsgRef_t | msgRef, |
uint16_t * | ucs2Ptr, | ||
size_t * | ucs2SizePtr | ||
) |
Get the UCS2 Message (16-bit format).
Output parameters are updated with the UCS2 message content and the number of characters. If the UCS2 data exceed the value of the length input parameter, a LE_OVERFLOW error code is returned and 'ucs2Ptr' is filled until of the number of chars specified.
- Returns
- LE_FORMAT_ERROR Message is not in binary format
- LE_OVERFLOW Message length exceed the maximum length.
- LE_OK Function succeeded.
- Parameters
-
[in] msgRef Reference to the message object. [out] ucs2Ptr UCS2 message. [in,out] ucs2SizePtr
size_t le_sms_GetUserdataLen | ( | le_sms_MsgRef_t | msgRef | ) |
Get the message Length value.
- Returns
- Number of characters for text and UCS2 messages, or the length of the data in bytes for raw binary messages.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_IsStatusReportEnabled | ( | bool * | enabledPtr | ) |
Get SMS Status Report activation state.
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER Parameter is invalid.
- LE_FAULT Function failed.
- Parameters
-
[out] enabledPtr True when SMS Status Report is enabled, false otherwise.
void le_sms_MarkRead | ( | le_sms_MsgRef_t | msgRef | ) |
Mark a message as 'read'.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Messages list.
void le_sms_MarkUnread | ( | le_sms_MsgRef_t | msgRef | ) |
Mark a message as 'unread'.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Messages list.
le_result_t le_sms_RemoveCdmaCellBroadcastServices | ( | le_sms_CdmaServiceCat_t | serviceCat, |
le_sms_Languages_t | language | ||
) |
Remove CDMA Cell Broadcast category services.
- Returns
- LE_FAULT Function failed.
- LE_BAD_PARAMETER Parameter is invalid.
- LE_OK Function succeeded.
- Parameters
-
[in] serviceCat Service category assignment. Reference to 3GPP2 C.R1001-D v1.0 Section 9.3.1 Standard Service Category Assignments. [in] language Language Indicator. Reference to 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator Value Assignments
le_result_t le_sms_RemoveCellBroadcastIds | ( | uint16_t | fromId, |
uint16_t | toId | ||
) |
Remove Cell Broadcast message Identifiers range.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] fromId Starting point of the range of cell broadcast message identifier. [in] toId Ending point of the range of cell broadcast message identifier.
void le_sms_RemoveFullStorageEventHandler | ( | le_sms_FullStorageEventHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_sms_FullStorageEvent'
- Parameters
-
[in] handlerRef
void le_sms_RemoveRxMessageHandler | ( | le_sms_RxMessageHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_sms_RxMessage'
- Parameters
-
[in] handlerRef
void le_sms_ResetCount | ( | void | ) |
Reset the count of messages successfully received and sent.
le_result_t le_sms_Send | ( | le_sms_MsgRef_t | msgRef | ) |
Send an SMS message.
Verifies first if the parameters are valid, then it checks the modem state can support message sending.
- Returns
- LE_FORMAT_ERROR Message content is invalid.
- LE_FAULT Function failed to send the message.
- LE_OK Function succeeded.
- LE_TIMEOUT Timeout before the complete sending.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object.
le_result_t le_sms_SendAsync | ( | le_sms_MsgRef_t | msgRef, |
le_sms_CallbackResultFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Send an asynchronous SMS message.
Verifies first if the parameters are valid, then it checks the modem state can support message sending.
- Returns
- LE_FORMAT_ERROR Message content is invalid.
- LE_FAULT Function failed to send the message.
- LE_OK Function succeeded.
- LE_TIMEOUT Timeout before the complete sending.
- Note
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] handlerPtr CallBack for sending result. [in] contextPtr
le_sms_MsgRef_t le_sms_SendPdu | ( | const uint8_t * | pduPtr, |
size_t | pduSize, | ||
le_sms_CallbackResultFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Create and asynchronously send a PDU message.
- Returns
- le_sms_Msg Reference to the new Message object pooled.
- NULL Not possible to pool a new message.
- Parameters
-
[in] pduPtr PDU message. [in] pduSize [in] handlerPtr CallBack for sending result. [in] contextPtr
le_sms_MsgRef_t le_sms_SendText | ( | const char *LE_NONNULL | destStr, |
const char *LE_NONNULL | textStr, | ||
le_sms_CallbackResultFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Create and asynchronously send a text message.
- Returns
- le_sms_Msg Reference to the new Message object pooled.
- NULL Not possible to pool a new message.
- Note
- If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
- If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the function will not return.
- Parameters
-
[in] destStr Telephone number string. [in] textStr SMS text. [in] handlerPtr CallBack for sending result. [in] contextPtr
le_result_t le_sms_SetBinary | ( | le_sms_MsgRef_t | msgRef, |
const uint8_t * | binPtr, | ||
size_t | binSize | ||
) |
Set the binary message content.
- Returns
- LE_NOT_PERMITTED Message is Read-Only.
- LE_BAD_PARAMETER Length of the data is equal to zero.
- LE_OK Function succeeded.
- Note
- If length of the data is too long (max LE_SMS_BINARY_MAX_BYTES bytes), it is a fatal error, the function will not return.
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] binPtr Binary data. [in] binSize
le_result_t le_sms_SetDestination | ( | le_sms_MsgRef_t | msgRef, |
const char *LE_NONNULL | dest | ||
) |
Set the Telephone destination number.
Telephone number is defined in ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
- Returns
- LE_NOT_PERMITTED Message is Read-Only.
- LE_BAD_PARAMETER Telephone destination number length is equal to zero.
- LE_OK Function succeeded.
- Note
- If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] dest Telephone number string.
le_result_t le_sms_SetPDU | ( | le_sms_MsgRef_t | msgRef, |
const uint8_t * | pduPtr, | ||
size_t | pduSize | ||
) |
Set the PDU message content.
- Returns
- LE_NOT_PERMITTED Message is Read-Only.
- LE_BAD_PARAMETER Length of the data is equal to zero.
- LE_OK Function succeeded.
- Note
- If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error, the function will not return.
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] pduPtr PDU message. [in] pduSize
le_result_t le_sms_SetPreferredStorage | ( | le_sms_Storage_t | prefStorage | ) |
Set the preferred SMS storage for incoming messages.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] prefStorage storage parameter.
void le_sms_SetServerDisconnectHandler | ( | le_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.
le_result_t le_sms_SetSmsCenterAddress | ( | const char *LE_NONNULL | tel | ) |
Set the SMS center address.
SMS center address number is defined in ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
- Returns
- LE_FAULT Service is not available..
- LE_OK Function succeeded.
- Note
- If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
- Parameters
-
[in] tel SMS center address number string.
le_result_t le_sms_SetText | ( | le_sms_MsgRef_t | msgRef, |
const char *LE_NONNULL | text | ||
) |
This function must be called to set the Text Message content.
- Returns
- LE_NOT_PERMITTED Message is Read-Only.
- LE_BAD_PARAMETER Text message length is equal to zero.
- LE_OK Function succeeded.
- Note
- Text Message is encoded in ASCII format (ISO8859-15) and characters have to exist in the GSM 23.038 7 bit alphabet.
- If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the function will not return.
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] text SMS text.
le_result_t le_sms_SetTimeout | ( | le_sms_MsgRef_t | msgRef, |
uint32_t | timeout | ||
) |
Set the timeout to send a SMS Message.
- Returns
- LE_FAULT Message is not in UNSENT state or is Read-Only.
- LE_OK Function succeeded.
- Note
- On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
- Parameters
-
[in] msgRef Reference to the message object. [in] timeout Timeout in seconds.
le_result_t le_sms_SetUCS2 | ( | le_sms_MsgRef_t | msgRef, |
const uint16_t * | ucs2Ptr, | ||
size_t | ucs2Size | ||
) |
Set the UCS2 message content (16-bit format).
- Returns
- LE_NOT_PERMITTED Message is Read-Only.
- LE_BAD_PARAMETER Length of the data is equal to zero.
- LE_OK Function succeeded.
- Note
- If length of the data is too long (max LE_SMS_UCS2_MAX_CHARS), it is a fatal error, the function will not return.
- If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] msgRef Reference to the message object. [in] ucs2Ptr UCS2 message. [in] ucs2Size
void le_sms_StartCount | ( | void | ) |
Start to count the messages successfully received and sent.
void le_sms_StopCount | ( | void | ) |
Stop to count the messages successfully received and sent.
le_result_t le_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 Client-specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.