le_sms_interface.h
Go to the documentation of this file.
44 * APIs. It automatically allocates needed resources for the Message object, which is referenced by62 * - Binary content with le_sms_SetBinary(), total length is set with this API, maximum 140 bytes.65 * - UCS2 content (16-bit format) with le_sms_SetUCS2(), total length is set with this API, maximum76 * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve103 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error188 * identified with @c le_sms_MsgRef_t object. The API returns an error if the message is not found194 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.196 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms202 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast204 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,258 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.262 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).267 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers281 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()349 //--------------------------------------------------------------------------------------------------353 //--------------------------------------------------------------------------------------------------356 //--------------------------------------------------------------------------------------------------359 * Connect the current client thread to the service providing this API. Block until the service is362 * For each thread that wants to use this API, either ConnectService or TryConnectService must be363 * called before any other functions in this API. Normally, ConnectService is automatically called368 //--------------------------------------------------------------------------------------------------374 //--------------------------------------------------------------------------------------------------377 * Try to connect the current client thread to the service providing this API. Return with an error380 * For each thread that wants to use this API, either ConnectService or TryConnectService must be381 * called before any other functions in this API. Normally, ConnectService is automatically called390 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).393 //--------------------------------------------------------------------------------------------------399 //--------------------------------------------------------------------------------------------------403 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants406 //--------------------------------------------------------------------------------------------------413 //--------------------------------------------------------------------------------------------------419 * longer a connection to the service, and the functions in this API can't be used. For details, see424 //--------------------------------------------------------------------------------------------------431 //--------------------------------------------------------------------------------------------------437 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------444 //--------------------------------------------------------------------------------------------------447 //--------------------------------------------------------------------------------------------------452 //--------------------------------------------------------------------------------------------------455 //--------------------------------------------------------------------------------------------------459 //--------------------------------------------------------------------------------------------------462 //--------------------------------------------------------------------------------------------------466 //--------------------------------------------------------------------------------------------------469 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------476 //--------------------------------------------------------------------------------------------------480 //--------------------------------------------------------------------------------------------------483 //--------------------------------------------------------------------------------------------------487 //--------------------------------------------------------------------------------------------------490 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------497 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------518 //--------------------------------------------------------------------------------------------------522 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------539 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------599 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------678 //--------------------------------------------------------------------------------------------------691 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------788 //--------------------------------------------------------------------------------------------------792 //--------------------------------------------------------------------------------------------------907 //--------------------------------------------------------------------------------------------------911 //--------------------------------------------------------------------------------------------------915 //--------------------------------------------------------------------------------------------------919 //--------------------------------------------------------------------------------------------------923 //--------------------------------------------------------------------------------------------------927 //--------------------------------------------------------------------------------------------------931 //--------------------------------------------------------------------------------------------------935 //--------------------------------------------------------------------------------------------------939 //--------------------------------------------------------------------------------------------------943 //--------------------------------------------------------------------------------------------------945 (954 //--------------------------------------------------------------------------------------------------959 //--------------------------------------------------------------------------------------------------961 (968 //--------------------------------------------------------------------------------------------------973 //--------------------------------------------------------------------------------------------------975 (982 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------998 //--------------------------------------------------------------------------------------------------1002 //--------------------------------------------------------------------------------------------------1009 //--------------------------------------------------------------------------------------------------1016 //--------------------------------------------------------------------------------------------------1025 //--------------------------------------------------------------------------------------------------1029 //--------------------------------------------------------------------------------------------------1036 //--------------------------------------------------------------------------------------------------1046 //--------------------------------------------------------------------------------------------------1052 //--------------------------------------------------------------------------------------------------1064 //--------------------------------------------------------------------------------------------------1073 //--------------------------------------------------------------------------------------------------1078 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1084 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1090 //--------------------------------------------------------------------------------------------------1100 //--------------------------------------------------------------------------------------------------1117 //--------------------------------------------------------------------------------------------------1127 //--------------------------------------------------------------------------------------------------1141 //--------------------------------------------------------------------------------------------------1152 //--------------------------------------------------------------------------------------------------1167 //--------------------------------------------------------------------------------------------------1178 //--------------------------------------------------------------------------------------------------1186 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1192 //--------------------------------------------------------------------------------------------------1203 //--------------------------------------------------------------------------------------------------1218 //--------------------------------------------------------------------------------------------------1225 //--------------------------------------------------------------------------------------------------1240 //--------------------------------------------------------------------------------------------------1251 //--------------------------------------------------------------------------------------------------1263 //--------------------------------------------------------------------------------------------------1270 //--------------------------------------------------------------------------------------------------1281 //--------------------------------------------------------------------------------------------------1292 //--------------------------------------------------------------------------------------------------1301 //--------------------------------------------------------------------------------------------------1308 //--------------------------------------------------------------------------------------------------1316 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1321 //--------------------------------------------------------------------------------------------------1335 //--------------------------------------------------------------------------------------------------1344 //--------------------------------------------------------------------------------------------------1357 //--------------------------------------------------------------------------------------------------1369 //--------------------------------------------------------------------------------------------------1376 //--------------------------------------------------------------------------------------------------1386 //--------------------------------------------------------------------------------------------------1393 //--------------------------------------------------------------------------------------------------1402 //--------------------------------------------------------------------------------------------------1409 //--------------------------------------------------------------------------------------------------1420 //--------------------------------------------------------------------------------------------------1429 //--------------------------------------------------------------------------------------------------1440 //--------------------------------------------------------------------------------------------------1449 //--------------------------------------------------------------------------------------------------1453 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1464 //--------------------------------------------------------------------------------------------------1475 //--------------------------------------------------------------------------------------------------1480 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1490 //--------------------------------------------------------------------------------------------------1506 //--------------------------------------------------------------------------------------------------1510 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1516 //--------------------------------------------------------------------------------------------------1523 //--------------------------------------------------------------------------------------------------1528 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1537 //--------------------------------------------------------------------------------------------------1548 //--------------------------------------------------------------------------------------------------1563 //--------------------------------------------------------------------------------------------------1574 //--------------------------------------------------------------------------------------------------1588 //--------------------------------------------------------------------------------------------------1599 //--------------------------------------------------------------------------------------------------1604 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1614 //--------------------------------------------------------------------------------------------------1625 //--------------------------------------------------------------------------------------------------1634 //--------------------------------------------------------------------------------------------------1641 //--------------------------------------------------------------------------------------------------1655 //--------------------------------------------------------------------------------------------------1662 //--------------------------------------------------------------------------------------------------1670 //--------------------------------------------------------------------------------------------------1676 //--------------------------------------------------------------------------------------------------1685 //--------------------------------------------------------------------------------------------------1692 //--------------------------------------------------------------------------------------------------1703 //--------------------------------------------------------------------------------------------------1710 //--------------------------------------------------------------------------------------------------1721 //--------------------------------------------------------------------------------------------------1728 //--------------------------------------------------------------------------------------------------1738 //--------------------------------------------------------------------------------------------------1745 //--------------------------------------------------------------------------------------------------1752 //--------------------------------------------------------------------------------------------------1759 //--------------------------------------------------------------------------------------------------1766 //--------------------------------------------------------------------------------------------------1773 //--------------------------------------------------------------------------------------------------1777 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1787 //--------------------------------------------------------------------------------------------------1796 //--------------------------------------------------------------------------------------------------1801 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1807 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1810 //--------------------------------------------------------------------------------------------------1818 //--------------------------------------------------------------------------------------------------1825 //--------------------------------------------------------------------------------------------------1832 //--------------------------------------------------------------------------------------------------1839 //--------------------------------------------------------------------------------------------------1846 //--------------------------------------------------------------------------------------------------1854 //--------------------------------------------------------------------------------------------------1860 //--------------------------------------------------------------------------------------------------1868 //--------------------------------------------------------------------------------------------------1874 //--------------------------------------------------------------------------------------------------1882 //--------------------------------------------------------------------------------------------------1888 //--------------------------------------------------------------------------------------------------1896 //--------------------------------------------------------------------------------------------------1902 //--------------------------------------------------------------------------------------------------1910 //--------------------------------------------------------------------------------------------------1919 //--------------------------------------------------------------------------------------------------1927 //--------------------------------------------------------------------------------------------------1936 //--------------------------------------------------------------------------------------------------1944 //--------------------------------------------------------------------------------------------------1950 //--------------------------------------------------------------------------------------------------1959 //--------------------------------------------------------------------------------------------------1971 //--------------------------------------------------------------------------------------------------1980 //--------------------------------------------------------------------------------------------------1992 //--------------------------------------------------------------------------------------------------2000 //--------------------------------------------------------------------------------------------------void le_sms_Delete(le_sms_MsgRef_t msgRef)le_result_t le_sms_GetPDU(le_sms_MsgRef_t msgRef, uint8_t *pduPtr, size_t *pduSizePtr)Unassigned (unallocated) number.Definition: le_sms_interface.h:795Definition: le_sms_interface.h:742le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:753Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:666Definition: le_sms_interface.h:739le_result_t le_sms_ClearCdmaCellBroadcastServices(void)le_result_t le_sms_GetSmsCenterAddress(char *tel, size_t telSize)Message saved in the message storage has not been sent.Definition: le_sms_interface.h:548General News International.Definition: le_sms_interface.h:616(U)SIM data download errorDefinition: le_sms_interface.h:895Command cannot be actioned.Definition: le_sms_interface.h:861Short Message Type 0 not supported.Definition: le_sms_interface.h:848le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:854le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:734void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:636Definition: le_sms_interface.h:715Definition: le_sms_interface.h:726Definition: le_sms_interface.h:827le_result_t le_sms_SetUCS2(le_sms_MsgRef_t msgRef, const uint16_t *ucs2Ptr, size_t ucs2Size)Unspecified TP-Command error.Definition: le_sms_interface.h:865Definition: le_sms_interface.h:706Destination out of order.Definition: le_sms_interface.h:807A terminal problem other than described above.Definition: le_sms_interface.h:737Definition: le_sms_interface.h:745size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:765le_result_t le_sms_SetTimeout(le_sms_MsgRef_t msgRef, uint32_t timeout)le_sms_MsgRef_t le_sms_SendPdu(const uint8_t *pduPtr, size_t pduSize, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)void(* le_sms_DisconnectHandler_t)(void *)Definition: le_sms_interface.h:354Local Airplane Flight Schedules.Definition: le_sms_interface.h:646void le_sms_GetErrorCode(le_sms_MsgRef_t msgRef, le_sms_ErrorCode_t *rpCausePtr, le_sms_ErrorCode_t *tpCausePtr)A network problem other than identified above.Definition: le_sms_interface.h:713le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:821le_sms_MsgRef_t le_sms_GetNext(le_sms_MsgListRef_t msgListRef)le_result_t le_sms_GetBinary(le_sms_MsgRef_t msgRef, uint8_t *binPtr, size_t *binSizePtr)Definition: le_sms_interface.h:703le_sms_MsgListRef_t le_sms_CreateRxMsgList(void)void le_sms_RemoveRxMessageHandler(le_sms_RxMessageHandlerRef_t handlerRef)void le_sms_SetServerDisconnectHandler(le_sms_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_sms_GetText(le_sms_MsgRef_t msgRef, char *text, size_t textSize)The originating MIN is not recognized.Definition: le_sms_interface.h:751Definition: le_sms_interface.h:718le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:701Resources facility not implemented.Definition: le_sms_interface.h:825Message present in the message storage has not been read.Definition: le_sms_interface.h:544Invalid mandatory information.Definition: le_sms_interface.h:832Cannot replace short message.Definition: le_sms_interface.h:850void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:945void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)Definition: le_sms_interface.h:975Definition: le_sms_interface.h:836le_sms_FullStorageEventHandlerRef_t le_sms_AddFullStorageEventHandler(le_sms_FullStorageHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_sms_DeactivateCellBroadcast(void)Business News Regional.Definition: le_sms_interface.h:620struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:936le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:640void le_sms_DisconnectService(void)le_result_t le_sms_TryConnectService(void)le_result_t le_sms_AddCellBroadcastIds(uint16_t fromId, uint16_t toId)le_result_t le_sms_SetBinary(le_sms_MsgRef_t msgRef, const uint8_t *binPtr, size_t binSize)le_result_t le_sms_SetPreferredStorage(le_sms_Storage_t prefStorage)le_result_t le_sms_DeleteFromStorage(le_sms_MsgRef_t msgRef)le_result_t le_sms_GetUCS2(le_sms_MsgRef_t msgRef, uint16_t *ucs2Ptr, size_t *ucs2SizePtr)le_result_t le_sms_GetSenderTel(le_sms_MsgRef_t msgRef, char *tel, size_t telSize)Operator determined barring.Definition: le_sms_interface.h:797le_result_t le_sms_SendAsync(le_sms_MsgRef_t msgRef, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)le_sms_Status_t le_sms_GetStatus(le_sms_MsgRef_t msgRef)Resources facility not subscribed.Definition: le_sms_interface.h:823Definition: le_sms_interface.h:771Business News National.Definition: le_sms_interface.h:622Definition: le_sms_interface.h:759le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)le_result_t le_sms_SetText(le_sms_MsgRef_t msgRef, const char *text)Definition: le_sms_interface.h:698size_t le_sms_GetPDULen(le_sms_MsgRef_t msgRef)le_result_t le_sms_DeactivateCdmaCellBroadcast(void)No SMS storage capability in (U)SIM.Definition: le_sms_interface.h:887struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:928le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:879le_sms_MsgRef_t le_sms_GetFirst(le_sms_MsgListRef_t msgListRef)Definition: le_sms_interface.h:839void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:961Delivery is not currently possible.Definition: le_sms_interface.h:729Definition: le_sms_interface.h:709le_sms_MsgRef_t le_sms_SendText(const char *destStr, const char *textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:756le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:768Message class not supported.Definition: le_sms_interface.h:857le_result_t le_sms_RemoveCellBroadcastIds(uint16_t fromId, uint16_t toId)void le_sms_ConnectService(void)le_result_t le_sms_SetSmsCenterAddress(const char *tel)Definition: le_sms_interface.h:731Message saved in the message storage has been sent.Definition: le_sms_interface.h:546Sementically incorect message.Definition: le_sms_interface.h:830Definition: le_sms_interface.h:762le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:893Business News International.Definition: le_sms_interface.h:624Definition: le_sms_interface.h:774le_result_t le_sms_SetDestination(le_sms_MsgRef_t msgRef, const char *dest)le_sms_Format_t le_sms_GetFormat(le_sms_MsgRef_t msgRef)int32_t le_sms_GetPlatformSpecificErrorCode(le_sms_MsgRef_t msgRef)Entertainment News Local.Definition: le_sms_interface.h:634Definition: le_sms_interface.h:748Employment Opportunities.Definition: le_sms_interface.h:658le_sms_Type_t le_sms_GetType(le_sms_MsgRef_t msgRef)void le_sms_RemoveFullStorageEventHandler(le_sms_FullStorageEventHandlerRef_t handlerRef)Message present in the message storage has been read.Definition: le_sms_interface.h:542le_result_t le_sms_GetTimeStamp(le_sms_MsgRef_t msgRef, char *timestamp, size_t timestampSize)le_result_t le_sms_Send(le_sms_MsgRef_t msgRef)void le_sms_DeleteList(le_sms_MsgListRef_t msgListRef)Telematic interworking not supported.Definition: le_sms_interface.h:846le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:723Message type nonexistent or not implemented.Definition: le_sms_interface.h:834Entertainment News National.Definition: le_sms_interface.h:638Short message transfer rejected.Definition: le_sms_interface.h:803void le_sms_MarkRead(le_sms_MsgRef_t msgRef)Sports News International.Definition: le_sms_interface.h:632