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, maximum75 * TP-Validity-Period(TP-VP) parameter value indicates the time period for which the short message77 * memory before delivery to the recipient has been carried out. The default validity period(TP-VP)80 * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve113 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error204 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.206 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms212 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast214 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,268 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.272 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).277 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers286 * SMS Status Report may be sent by the SMS Center (SMSC) to inform the originating device about the290 * le_sms_EnableStatusReport() and le_sms_DisableStatusReport(). The current activation state can293 * The reception of a SMS Status Report is notified by the SMS handler like a SMS message reception,300 * - le_sms_GetTpRa() gives the Recipient Address, defined in 3GPP TS 23.040 section 9.2.3.14, and314 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()393 //--------------------------------------------------------------------------------------------------397 //--------------------------------------------------------------------------------------------------400 //--------------------------------------------------------------------------------------------------403 * Connect the current client thread to the service providing this API. Block until the service is406 * For each thread that wants to use this API, either ConnectService or TryConnectService must be407 * called before any other functions in this API. Normally, ConnectService is automatically called412 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------421 * Try to connect the current client thread to the service providing this API. Return with an error424 * For each thread that wants to use this API, either ConnectService or TryConnectService must be425 * called before any other functions in this API. Normally, ConnectService is automatically called434 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).437 //--------------------------------------------------------------------------------------------------443 //--------------------------------------------------------------------------------------------------447 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants450 //--------------------------------------------------------------------------------------------------457 //--------------------------------------------------------------------------------------------------463 * longer a connection to the service, and the functions in this API can't be used. For details, see468 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------496 //--------------------------------------------------------------------------------------------------499 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------520 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------534 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------541 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------562 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------581 //--------------------------------------------------------------------------------------------------585 //--------------------------------------------------------------------------------------------------612 //--------------------------------------------------------------------------------------------------616 //--------------------------------------------------------------------------------------------------641 //--------------------------------------------------------------------------------------------------645 //--------------------------------------------------------------------------------------------------720 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------737 //--------------------------------------------------------------------------------------------------741 //--------------------------------------------------------------------------------------------------834 //--------------------------------------------------------------------------------------------------838 //--------------------------------------------------------------------------------------------------953 //--------------------------------------------------------------------------------------------------957 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------965 //--------------------------------------------------------------------------------------------------969 //--------------------------------------------------------------------------------------------------973 //--------------------------------------------------------------------------------------------------977 //--------------------------------------------------------------------------------------------------981 //--------------------------------------------------------------------------------------------------985 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------991 (1000 //--------------------------------------------------------------------------------------------------1005 //--------------------------------------------------------------------------------------------------1007 (1014 //--------------------------------------------------------------------------------------------------1019 //--------------------------------------------------------------------------------------------------1021 (1028 //--------------------------------------------------------------------------------------------------1035 //--------------------------------------------------------------------------------------------------1044 //--------------------------------------------------------------------------------------------------1048 //--------------------------------------------------------------------------------------------------1055 //--------------------------------------------------------------------------------------------------1062 //--------------------------------------------------------------------------------------------------1071 //--------------------------------------------------------------------------------------------------1075 //--------------------------------------------------------------------------------------------------1082 //--------------------------------------------------------------------------------------------------1092 //--------------------------------------------------------------------------------------------------1098 //--------------------------------------------------------------------------------------------------1110 //--------------------------------------------------------------------------------------------------1119 //--------------------------------------------------------------------------------------------------1124 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1130 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1136 //--------------------------------------------------------------------------------------------------1145 //--------------------------------------------------------------------------------------------------1162 //--------------------------------------------------------------------------------------------------1171 //--------------------------------------------------------------------------------------------------1185 //--------------------------------------------------------------------------------------------------1196 //--------------------------------------------------------------------------------------------------1211 //--------------------------------------------------------------------------------------------------1222 //--------------------------------------------------------------------------------------------------1230 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1236 //--------------------------------------------------------------------------------------------------1247 //--------------------------------------------------------------------------------------------------1262 //--------------------------------------------------------------------------------------------------1269 //--------------------------------------------------------------------------------------------------1284 //--------------------------------------------------------------------------------------------------1295 //--------------------------------------------------------------------------------------------------1307 //--------------------------------------------------------------------------------------------------1314 //--------------------------------------------------------------------------------------------------1325 //--------------------------------------------------------------------------------------------------1336 //--------------------------------------------------------------------------------------------------1340 * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific error code description.1347 //--------------------------------------------------------------------------------------------------1354 //--------------------------------------------------------------------------------------------------1362 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1367 //--------------------------------------------------------------------------------------------------1380 //--------------------------------------------------------------------------------------------------1389 //--------------------------------------------------------------------------------------------------1402 //--------------------------------------------------------------------------------------------------1414 //--------------------------------------------------------------------------------------------------1421 //--------------------------------------------------------------------------------------------------1431 //--------------------------------------------------------------------------------------------------1438 //--------------------------------------------------------------------------------------------------1447 //--------------------------------------------------------------------------------------------------1454 //--------------------------------------------------------------------------------------------------1465 //--------------------------------------------------------------------------------------------------1474 //--------------------------------------------------------------------------------------------------1485 //--------------------------------------------------------------------------------------------------1494 //--------------------------------------------------------------------------------------------------1498 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1509 //--------------------------------------------------------------------------------------------------1520 //--------------------------------------------------------------------------------------------------1525 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1535 //--------------------------------------------------------------------------------------------------1551 //--------------------------------------------------------------------------------------------------1555 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1561 //--------------------------------------------------------------------------------------------------1568 //--------------------------------------------------------------------------------------------------1573 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1582 //--------------------------------------------------------------------------------------------------1593 //--------------------------------------------------------------------------------------------------1608 //--------------------------------------------------------------------------------------------------1619 //--------------------------------------------------------------------------------------------------1633 //--------------------------------------------------------------------------------------------------1644 //--------------------------------------------------------------------------------------------------1649 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1659 //--------------------------------------------------------------------------------------------------1670 //--------------------------------------------------------------------------------------------------1679 //--------------------------------------------------------------------------------------------------1686 //--------------------------------------------------------------------------------------------------1700 //--------------------------------------------------------------------------------------------------1707 //--------------------------------------------------------------------------------------------------1715 //--------------------------------------------------------------------------------------------------1721 //--------------------------------------------------------------------------------------------------1730 //--------------------------------------------------------------------------------------------------1737 //--------------------------------------------------------------------------------------------------1748 //--------------------------------------------------------------------------------------------------1755 //--------------------------------------------------------------------------------------------------1766 //--------------------------------------------------------------------------------------------------1773 //--------------------------------------------------------------------------------------------------1783 //--------------------------------------------------------------------------------------------------1790 //--------------------------------------------------------------------------------------------------1797 //--------------------------------------------------------------------------------------------------1804 //--------------------------------------------------------------------------------------------------1811 //--------------------------------------------------------------------------------------------------1818 //--------------------------------------------------------------------------------------------------1822 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1832 //--------------------------------------------------------------------------------------------------1841 //--------------------------------------------------------------------------------------------------1846 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1852 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1855 //--------------------------------------------------------------------------------------------------1862 //--------------------------------------------------------------------------------------------------1869 //--------------------------------------------------------------------------------------------------1876 //--------------------------------------------------------------------------------------------------1883 //--------------------------------------------------------------------------------------------------1890 //--------------------------------------------------------------------------------------------------1898 //--------------------------------------------------------------------------------------------------1904 //--------------------------------------------------------------------------------------------------1912 //--------------------------------------------------------------------------------------------------1918 //--------------------------------------------------------------------------------------------------1926 //--------------------------------------------------------------------------------------------------1932 //--------------------------------------------------------------------------------------------------1940 //--------------------------------------------------------------------------------------------------1946 //--------------------------------------------------------------------------------------------------1954 //--------------------------------------------------------------------------------------------------1963 //--------------------------------------------------------------------------------------------------1971 //--------------------------------------------------------------------------------------------------1980 //--------------------------------------------------------------------------------------------------1988 //--------------------------------------------------------------------------------------------------1994 //--------------------------------------------------------------------------------------------------2003 //--------------------------------------------------------------------------------------------------2015 //--------------------------------------------------------------------------------------------------2024 //--------------------------------------------------------------------------------------------------2036 //--------------------------------------------------------------------------------------------------2044 //--------------------------------------------------------------------------------------------------2050 //--------------------------------------------------------------------------------------------------2061 //--------------------------------------------------------------------------------------------------2070 //--------------------------------------------------------------------------------------------------2074 //--------------------------------------------------------------------------------------------------2080 //--------------------------------------------------------------------------------------------------2084 //--------------------------------------------------------------------------------------------------2090 //--------------------------------------------------------------------------------------------------2094 //--------------------------------------------------------------------------------------------------2100 //--------------------------------------------------------------------------------------------------2108 //--------------------------------------------------------------------------------------------------2114 //--------------------------------------------------------------------------------------------------2122 //--------------------------------------------------------------------------------------------------2128 //--------------------------------------------------------------------------------------------------2137 //--------------------------------------------------------------------------------------------------2144 //--------------------------------------------------------------------------------------------------2146 * Get TP-Message-Reference of a message. Message type should be either a SMS Status Report or an2156 //--------------------------------------------------------------------------------------------------2165 //--------------------------------------------------------------------------------------------------2177 //--------------------------------------------------------------------------------------------------2191 //--------------------------------------------------------------------------------------------------2202 //--------------------------------------------------------------------------------------------------2213 //--------------------------------------------------------------------------------------------------2224 //--------------------------------------------------------------------------------------------------2235 //--------------------------------------------------------------------------------------------------2245 //--------------------------------------------------------------------------------------------------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:841Definition: le_sms_interface.h:788le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:799Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:712Definition: le_sms_interface.h:785void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:991le_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:594General News International.Definition: le_sms_interface.h:662(U)SIM data download errorDefinition: le_sms_interface.h:941Command cannot be actioned.Definition: le_sms_interface.h:907void le_sms_StartCount(void)Short Message Type 0 not supported.Definition: le_sms_interface.h:894le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:900le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:780void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:682Definition: le_sms_interface.h:761Definition: le_sms_interface.h:772Definition: le_sms_interface.h:873le_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:911Definition: le_sms_interface.h:752Destination out of order.Definition: le_sms_interface.h:853A terminal problem other than described above.Definition: le_sms_interface.h:783Definition: le_sms_interface.h:791size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)le_result_t le_sms_GetTpRa(le_sms_MsgRef_t msgRef, uint8_t *toraPtr, char *ra, size_t raSize)Definition: le_sms_interface.h:811le_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:398Local Airplane Flight Schedules.Definition: le_sms_interface.h:692void 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:759le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:867le_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:749le_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:797Definition: le_sms_interface.h:764le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:747Resources facility not implemented.Definition: le_sms_interface.h:871Message present in the message storage has not been read.Definition: le_sms_interface.h:590Invalid mandatory information.Definition: le_sms_interface.h:878Cannot replace short message.Definition: le_sms_interface.h:896Definition: le_sms_interface.h:882le_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:666struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:982le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:686le_result_t le_sms_DisableStatusReport(void)void 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_SetText(le_sms_MsgRef_t msgRef, const char *LE_NONNULL text)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:843le_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:869Definition: le_sms_interface.h:817Business News National.Definition: le_sms_interface.h:668Definition: le_sms_interface.h:805le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)Definition: le_sms_interface.h:744size_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:933struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:974le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:925le_result_t le_sms_SetSmsCenterAddress(const char *LE_NONNULL tel)le_sms_MsgRef_t le_sms_GetFirst(le_sms_MsgListRef_t msgListRef)Definition: le_sms_interface.h:885Delivery is not currently possible.Definition: le_sms_interface.h:775Definition: le_sms_interface.h:755void le_sms_ResetCount(void)Definition: le_sms_interface.h:802le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:814Message class not supported.Definition: le_sms_interface.h:903le_result_t le_sms_RemoveCellBroadcastIds(uint16_t fromId, uint16_t toId)void le_sms_ConnectService(void)le_sms_MsgRef_t le_sms_SendText(const char *LE_NONNULL destStr, const char *LE_NONNULL textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)le_result_t le_sms_SetDestination(le_sms_MsgRef_t msgRef, const char *LE_NONNULL dest)Definition: le_sms_interface.h:777Message saved in the message storage has been sent.Definition: le_sms_interface.h:592le_result_t le_sms_GetTpDt(le_sms_MsgRef_t msgRef, char *dt, size_t dtSize)Sementically incorect message.Definition: le_sms_interface.h:876Definition: le_sms_interface.h:808le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)Definition: le_sms_interface.h:1021(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:939le_result_t le_sms_GetTpMr(le_sms_MsgRef_t msgRef, uint8_t *tpMrPtr)Business News International.Definition: le_sms_interface.h:670le_result_t le_sms_EnableStatusReport(void)Definition: le_sms_interface.h:820le_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:680Definition: le_sms_interface.h:794Employment Opportunities.Definition: le_sms_interface.h:704le_result_t le_sms_GetCount(le_sms_Type_t messageType, int32_t *messageCountPtr)le_sms_Type_t le_sms_GetType(le_sms_MsgRef_t msgRef)void le_sms_RemoveFullStorageEventHandler(le_sms_FullStorageEventHandlerRef_t handlerRef)le_result_t le_sms_GetTpSt(le_sms_MsgRef_t msgRef, uint8_t *stPtr)Message present in the message storage has been read.Definition: le_sms_interface.h:588void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:1007le_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:892le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:769le_result_t le_sms_IsStatusReportEnabled(bool *enabledPtr)Message type nonexistent or not implemented.Definition: le_sms_interface.h:880Entertainment News National.Definition: le_sms_interface.h:684Short message transfer rejected.Definition: le_sms_interface.h:849void le_sms_MarkRead(le_sms_MsgRef_t msgRef)le_result_t le_sms_GetTpScTs(le_sms_MsgRef_t msgRef, char *scts, size_t sctsSize)Sports News International.Definition: le_sms_interface.h:678void le_sms_StopCount(void)