All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pa_sms.h File Reference
#include "legato.h"
#include "interfaces.h"

Go to the source code of this file.

Data Structures

struct  pa_sms_SmsDeliver_t
 
struct  pa_sms_SmsSubmit_t
 
struct  pa_sms_Pdu_t
 
struct  pa_sms_Message_t
 

Typedefs

typedef void(* pa_sms_NewMsgHdlrFunc_t )(uint32_t *msgRef)
 

Enumerations

enum  pa_sms_MsgType_t { PA_SMS_SMS_DELIVER = 0, PA_SMS_SMS_SUBMIT = 1, PA_SMS_SMS_STATUS_REPORT = 2, PA_SMS_PDU = 3 }
 

Functions

le_result_t pa_sms_SetNewMsgHandler (pa_sms_NewMsgHdlrFunc_t msgHandler)
 
le_result_t pa_sms_ClearNewMsgHandler (void)
 
int32_t pa_sms_SendPduMsg (uint32_t length, const uint8_t *dataPtr)
 
le_result_t pa_sms_RdPDUMsgFromMem (uint32_t index, pa_sms_Pdu_t *msgPtr)
 
le_result_t pa_sms_ListMsgFromMem (le_sms_Status_t status, uint32_t *numPtr, uint32_t *idxPtr)
 
le_result_t pa_sms_DelMsgFromMem (uint32_t index)
 
le_result_t pa_sms_DelAllMsg (void)
 
le_result_t pa_sms_ChangeMessageStatus (uint32_t index, le_sms_Status_t status)
 
le_result_t pa_sms_GetSmsc (char *smscPtr, size_t len)
 
le_result_t pa_sms_SetSmsc (const char *smscPtr)
 

Detailed Description

Legato Modem SMS Platform Adapter API include file.

Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.

Typedef Documentation

typedef void(* pa_sms_NewMsgHdlrFunc_t)(uint32_t *msgRef)

Prototype for handler functions used to report that a new message has been received.

Parameters
msgRefThe message reference in message storage.

Enumeration Type Documentation

Message Type Indicator. It is used for the message service configuration.

Enumerator
PA_SMS_SMS_DELIVER 

SMS-DELIVER (in the direction Service Center to Mobile station).

PA_SMS_SMS_SUBMIT 

SMS-SUBMIT (in the direction Mobile station to Service Center).

PA_SMS_SMS_STATUS_REPORT 

SMS-STATUS-REPORT.

PA_SMS_PDU 

PDU message.

Function Documentation

le_result_t pa_sms_ChangeMessageStatus ( uint32_t  index,
le_sms_Status_t  status 
)

This function changes the message status.

Returns
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[in]indexIndex of the message to be deleted.
[in]statusThe status of message in memory.
le_result_t pa_sms_ClearNewMsgHandler ( void  )

This function must be called to unregister the handler for a new message reception handling.

Returns
LE_NOT_POSSIBLE The function failed to unregister the handler.
LE_OK The function succeeded.
le_result_t pa_sms_DelAllMsg ( void  )

This function deletes all Messages from preferred message storage.

Returns
LE_NOT_POSSIBLE The function failed to delete all Messages from preferred message storage.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
le_result_t pa_sms_DelMsgFromMem ( uint32_t  index)

This function deletes one specific Message from preferred message storage.

Returns
LE_NOT_POSSIBLE The function failed to delete one specific Message from preferred message storage.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[in]indexIndex of the message to be deleted.
le_result_t pa_sms_GetSmsc ( char *  smscPtr,
size_t  len 
)

This function must be called to get the SMS center.

Returns
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[out]smscPtrThe Short message service center string.
[in]lenThe length of SMSC string.
le_result_t pa_sms_ListMsgFromMem ( le_sms_Status_t  status,
uint32_t *  numPtr,
uint32_t *  idxPtr 
)

This function gets the indexes of messages stored in the preferred memory for a specific status.

Returns
LE_NOT_POSSIBLE The function failed to get the indexes of messages stored in the preferred memory.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[in]statusThe status of message in memory.
[out]numPtrThe number of indexes retrieved.
[out]idxPtrThe pointer to an array of indexes. The array is filled with 'num' index values.
le_result_t pa_sms_RdPDUMsgFromMem ( uint32_t  index,
pa_sms_Pdu_t msgPtr 
)

This function gets the message from the preferred message storage.

Returns
LE_NOT_POSSIBLE The function failed to get the message from the preferred message storage.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[in]indexThe place of storage in memory.
[out]msgPtrThe message.
int32_t pa_sms_SendPduMsg ( uint32_t  length,
const uint8_t *  dataPtr 
)

This function sends a message in PDU mode.

Returns
LE_NOT_POSSIBLE The function failed to send a message in PDU mode.
LE_TIMEOUT No response was received from the Modem.
a positive value The function succeeded. The value represents the message reference.
Parameters
[in]lengthThe length of the TP data unit in bytes.
[in]dataPtrThe message.
le_result_t pa_sms_SetNewMsgHandler ( pa_sms_NewMsgHdlrFunc_t  msgHandler)

This function must be called to register a handler for a new message reception handling.

Returns
LE_NOT_POSSIBLE The function failed to register a new handler.
LE_OK The function succeeded.
Parameters
[in]msgHandlerThe handler function to handle a new message reception.
le_result_t pa_sms_SetSmsc ( const char *  smscPtr)

This function must be called to set the SMS center.

Returns
LE_NOT_POSSIBLE The function failed.
LE_TIMEOUT No response was received from the Modem.
LE_OK The function succeeded.
Parameters
[in]smscPtrThe Short message service center.