Go to the source code of this file.
Legato SMS Services include file.
Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.
typedef struct le_sms_msg_List* le_sms_msg_ListRef_t |
Opaque type for SMS Message Listing.
typedef struct le_sms_Msg* le_sms_msg_Ref_t |
Declare a reference type for referring to SMS Message objects.
typedef void(* le_sms_msg_RxMessageHandlerFunc_t)(le_sms_msg_Ref_t msgRef, void *contextPtr) |
Prototype for handler functions used to report that a new message has been received.
msgRef | Message reference. |
contextPtr | Whatever context information that the event handler may require. |
typedef struct le_sms_msg_RxMessageHandler* le_sms_msg_RxMessageHandlerRef_t |
Reference type for New Message Handler references.
le_sms_msg_RxMessageHandlerRef_t le_sms_msg_AddRxMessageHandler | ( | le_sms_msg_RxMessageHandlerFunc_t | handlerFuncPtr, |
void * | contextPtr | ||
) |
Register an handler function for SMS message reception.
[in] | handlerFuncPtr | handler function for message. |
contextPtr | reception. [IN] Handler's context. |
le_sms_msg_Ref_t le_sms_msg_Create | ( | void | ) |
Create an SMS Message data structure.
Create an object's reference of the list of received messages saved in the SMS message storage area.
void le_sms_msg_Delete | ( | le_sms_msg_Ref_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.
[in] | msgRef | Reference to the message object. |
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.
[in] | msgRef | Message to delete. |
void le_sms_msg_DeleteList | ( | le_sms_msg_ListRef_t | msgListRef | ) |
Delete the list of the Messages retrieved from the message storage.
[in] | msgListRef | Messages list. |
le_result_t le_sms_msg_GetBinary | ( | le_sms_msg_Ref_t | msgRef, |
uint8_t * | binPtr, | ||
size_t * | lenPtr | ||
) |
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.
[in] | msgRef | Reference to the message object. |
[out] | binPtr | Binary message. |
[in,out] | lenPtr | Length of the binary message in bytes. |
le_sms_msg_Ref_t le_sms_msg_GetFirst | ( | le_sms_msg_ListRef_t | msgListRef | ) |
Get the first Message object reference in the list of messages retrieved with le_sms_msg_CreateRxMsgList().
[in] | msgListRef | Messages list. |
Get the message format (text or PDU).
[in] | msgRef | Reference to the message object. |
le_sms_msg_Ref_t le_sms_msg_GetNext | ( | le_sms_msg_ListRef_t | msgListRef | ) |
Get the next Message object reference in the list of messages retrieved with le_sms_msg_CreateRxMsgList().
[in] | msgListRef | Messages list. |
le_result_t le_sms_msg_GetPDU | ( | le_sms_msg_Ref_t | msgRef, |
uint8_t * | pduPtr, | ||
size_t * | lenPtr | ||
) |
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.
[in] | msgRef | Reference to the message object. |
[out] | pduPtr | PDU message. |
[in,out] | lenPtr | Length of the PDU message in bytes. |
size_t le_sms_msg_GetPDULen | ( | le_sms_msg_Ref_t | msgRef | ) |
Get the message Length value.
[in] | msgRef | Reference to the message object. |
le_result_t le_sms_msg_GetSenderTel | ( | le_sms_msg_Ref_t | msgRef, |
char * | telPtr, | ||
size_t | len | ||
) |
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'.
[in] | msgRef | Reference to the message object. |
[out] | telPtr | Telephone number string. |
[in] | len | Telephone number stringlength. |
Read the Message status (Received Read, Received Unread, Stored Sent, Stored Unsent).
[in] | msgRef | Reference to the message object. |
le_result_t le_sms_msg_GetText | ( | le_sms_msg_Ref_t | msgRef, |
char * | textPtr, | ||
size_t | len | ||
) |
Get the text Message.
Output parameter is updated with the text string. 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'.
[in] | msgRef | Reference to the message object. |
[out] | textPtr | SMS text. |
[in] | len | The maximum length of the text message. |
le_result_t le_sms_msg_GetTimeStamp | ( | le_sms_msg_Ref_t | msgRef, |
char * | timestampPtr, | ||
size_t | len | ||
) |
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'.
[in] | msgRef | Reference to the message object. |
[out] | timestampPtr | Message time stamp (in text mode). string format: "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone) |
[in] | len | Timestamp string length. |
size_t le_sms_msg_GetUserdataLen | ( | le_sms_msg_Ref_t | msgRef | ) |
Get the message Length value.
[in] | msgRef | Reference to the message object. |
void le_sms_msg_MarkRead | ( | le_sms_msg_Ref_t | msgRef | ) |
Mark a message as 'read'.
[in] | msgRef | Reference to the message object. |
void le_sms_msg_MarkUnread | ( | le_sms_msg_Ref_t | msgRef | ) |
Mark a message as 'unread'.
[in] | msgRef | Reference to the message object. |
void le_sms_msg_RemoveRxMessageHandler | ( | le_sms_msg_RxMessageHandlerRef_t | handlerRef | ) |
Unregister a handler function
[in] | handlerRef | Handler reference. |
le_result_t le_sms_msg_Send | ( | le_sms_msg_Ref_t | msgRef | ) |
Send an SMS message.
Verifies first if the parameters are valid, then it checks the modem state can support message sending.
[in] | msgRef | Message(s) to send. |
le_result_t le_sms_msg_SetBinary | ( | le_sms_msg_Ref_t | msg, |
const uint8_t * | binPtr, | ||
size_t | len | ||
) |
Set the binary message content.
[in] | msg | Pointer to the message data structure. |
[in] | binPtr | Binary data. |
[in] | len | Length of the data in bytes. |
le_result_t le_sms_msg_SetDestination | ( | le_sms_msg_Ref_t | msgRef, |
const char * | destPtr | ||
) |
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.
[in] | msgRef | Reference to the message object. |
[in] | destPtr | Telephone number string. |
le_result_t le_sms_msg_SetPDU | ( | le_sms_msg_Ref_t | msgRef, |
const uint8_t * | pduPtr, | ||
size_t | len | ||
) |
Set the PDU message content.
[in] | msgRef | Reference to the message object. |
[in] | pduPtr | PDU message. |
[in] | len | Length of the data in bytes. |
le_result_t le_sms_msg_SetText | ( | le_sms_msg_Ref_t | msgRef, |
const char * | textPtr | ||
) |
This function must be called to set the Text Message content.
[in] | msgRef | Reference to the message object. |
[in] | textPtr | SMS text. |