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, maximum70 * @c le_sms_Send() is a blocking function with a maximum timeout set to 240 seconds, it will return73 * TP-Validity-Period(TP-VP) parameter value indicates the time period for which the short message75 * memory before delivery to the recipient has been carried out. The default validity period(TP-VP)78 * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve91 * To send an asynchronous message, le_sms_SendAsync() API can be called instead of le_sms_Send().92 * le_sms_SendAsync() is a non-blocking function, it queues the message to the SMS pool and returns117 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error208 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.210 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms216 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast218 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,272 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.276 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).281 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers290 * SMS Status Report may be sent by the SMS Center (SMSC) to inform the originating device about the294 * le_sms_EnableStatusReport() and le_sms_DisableStatusReport(). The current activation state can297 * The reception of a SMS Status Report is notified by the SMS handler like a SMS message reception,304 * - le_sms_GetTpRa() gives the Recipient Address, defined in 3GPP TS 23.040 section 9.2.3.14, and318 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()397 //--------------------------------------------------------------------------------------------------401 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------407 * Connect the current client thread to the service providing this API. Block until the service is410 * For each thread that wants to use this API, either ConnectService or TryConnectService must be411 * called before any other functions in this API. Normally, ConnectService is automatically called416 //--------------------------------------------------------------------------------------------------422 //--------------------------------------------------------------------------------------------------425 * Try to connect the current client thread to the service providing this API. Return with an error428 * For each thread that wants to use this API, either ConnectService or TryConnectService must be429 * called before any other functions in this API. Normally, ConnectService is automatically called438 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).441 //--------------------------------------------------------------------------------------------------447 //--------------------------------------------------------------------------------------------------451 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants454 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------467 * longer a connection to the service, and the functions in this API can't be used. For details, see472 //--------------------------------------------------------------------------------------------------479 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------495 //--------------------------------------------------------------------------------------------------500 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------514 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------521 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------528 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------549 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------585 //--------------------------------------------------------------------------------------------------589 //--------------------------------------------------------------------------------------------------616 //--------------------------------------------------------------------------------------------------620 //--------------------------------------------------------------------------------------------------645 //--------------------------------------------------------------------------------------------------649 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------728 //--------------------------------------------------------------------------------------------------741 //--------------------------------------------------------------------------------------------------745 //--------------------------------------------------------------------------------------------------838 //--------------------------------------------------------------------------------------------------842 //--------------------------------------------------------------------------------------------------957 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------965 //--------------------------------------------------------------------------------------------------969 //--------------------------------------------------------------------------------------------------973 //--------------------------------------------------------------------------------------------------977 //--------------------------------------------------------------------------------------------------981 //--------------------------------------------------------------------------------------------------985 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------993 //--------------------------------------------------------------------------------------------------995 (1004 //--------------------------------------------------------------------------------------------------1009 //--------------------------------------------------------------------------------------------------1011 (1018 //--------------------------------------------------------------------------------------------------1023 //--------------------------------------------------------------------------------------------------1025 (1032 //--------------------------------------------------------------------------------------------------1039 //--------------------------------------------------------------------------------------------------1048 //--------------------------------------------------------------------------------------------------1052 //--------------------------------------------------------------------------------------------------1059 //--------------------------------------------------------------------------------------------------1066 //--------------------------------------------------------------------------------------------------1075 //--------------------------------------------------------------------------------------------------1079 //--------------------------------------------------------------------------------------------------1086 //--------------------------------------------------------------------------------------------------1096 //--------------------------------------------------------------------------------------------------1102 //--------------------------------------------------------------------------------------------------1118 //--------------------------------------------------------------------------------------------------1127 //--------------------------------------------------------------------------------------------------1132 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1138 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1144 //--------------------------------------------------------------------------------------------------1153 //--------------------------------------------------------------------------------------------------1170 //--------------------------------------------------------------------------------------------------1179 //--------------------------------------------------------------------------------------------------1193 //--------------------------------------------------------------------------------------------------1204 //--------------------------------------------------------------------------------------------------1219 //--------------------------------------------------------------------------------------------------1230 //--------------------------------------------------------------------------------------------------1238 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1244 //--------------------------------------------------------------------------------------------------1255 //--------------------------------------------------------------------------------------------------1270 //--------------------------------------------------------------------------------------------------1277 //--------------------------------------------------------------------------------------------------1292 //--------------------------------------------------------------------------------------------------1303 //--------------------------------------------------------------------------------------------------1315 //--------------------------------------------------------------------------------------------------1322 //--------------------------------------------------------------------------------------------------1333 //--------------------------------------------------------------------------------------------------1344 //--------------------------------------------------------------------------------------------------1348 * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific error code description.1355 //--------------------------------------------------------------------------------------------------1362 //--------------------------------------------------------------------------------------------------1370 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1375 //--------------------------------------------------------------------------------------------------1388 //--------------------------------------------------------------------------------------------------1397 //--------------------------------------------------------------------------------------------------1410 //--------------------------------------------------------------------------------------------------1422 //--------------------------------------------------------------------------------------------------1429 //--------------------------------------------------------------------------------------------------1439 //--------------------------------------------------------------------------------------------------1446 //--------------------------------------------------------------------------------------------------1455 //--------------------------------------------------------------------------------------------------1462 //--------------------------------------------------------------------------------------------------1473 //--------------------------------------------------------------------------------------------------1482 //--------------------------------------------------------------------------------------------------1493 //--------------------------------------------------------------------------------------------------1502 //--------------------------------------------------------------------------------------------------1506 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1517 //--------------------------------------------------------------------------------------------------1528 //--------------------------------------------------------------------------------------------------1533 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1543 //--------------------------------------------------------------------------------------------------1559 //--------------------------------------------------------------------------------------------------1563 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1569 //--------------------------------------------------------------------------------------------------1576 //--------------------------------------------------------------------------------------------------1581 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1590 //--------------------------------------------------------------------------------------------------1601 //--------------------------------------------------------------------------------------------------1616 //--------------------------------------------------------------------------------------------------1627 //--------------------------------------------------------------------------------------------------1641 //--------------------------------------------------------------------------------------------------1652 //--------------------------------------------------------------------------------------------------1657 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1667 //--------------------------------------------------------------------------------------------------1678 //--------------------------------------------------------------------------------------------------1687 //--------------------------------------------------------------------------------------------------1694 //--------------------------------------------------------------------------------------------------1708 //--------------------------------------------------------------------------------------------------1715 //--------------------------------------------------------------------------------------------------1723 //--------------------------------------------------------------------------------------------------1729 //--------------------------------------------------------------------------------------------------1738 //--------------------------------------------------------------------------------------------------1745 //--------------------------------------------------------------------------------------------------1756 //--------------------------------------------------------------------------------------------------1763 //--------------------------------------------------------------------------------------------------1774 //--------------------------------------------------------------------------------------------------1781 //--------------------------------------------------------------------------------------------------1791 //--------------------------------------------------------------------------------------------------1798 //--------------------------------------------------------------------------------------------------1805 //--------------------------------------------------------------------------------------------------1812 //--------------------------------------------------------------------------------------------------1819 //--------------------------------------------------------------------------------------------------1826 //--------------------------------------------------------------------------------------------------1830 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1840 //--------------------------------------------------------------------------------------------------1849 //--------------------------------------------------------------------------------------------------1854 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1860 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1863 //--------------------------------------------------------------------------------------------------1870 //--------------------------------------------------------------------------------------------------1877 //--------------------------------------------------------------------------------------------------1884 //--------------------------------------------------------------------------------------------------1891 //--------------------------------------------------------------------------------------------------1898 //--------------------------------------------------------------------------------------------------1906 //--------------------------------------------------------------------------------------------------1912 //--------------------------------------------------------------------------------------------------1920 //--------------------------------------------------------------------------------------------------1926 //--------------------------------------------------------------------------------------------------1934 //--------------------------------------------------------------------------------------------------1940 //--------------------------------------------------------------------------------------------------1948 //--------------------------------------------------------------------------------------------------1954 //--------------------------------------------------------------------------------------------------1962 //--------------------------------------------------------------------------------------------------1971 //--------------------------------------------------------------------------------------------------1979 //--------------------------------------------------------------------------------------------------1988 //--------------------------------------------------------------------------------------------------1996 //--------------------------------------------------------------------------------------------------2002 //--------------------------------------------------------------------------------------------------2011 //--------------------------------------------------------------------------------------------------2023 //--------------------------------------------------------------------------------------------------2032 //--------------------------------------------------------------------------------------------------2044 //--------------------------------------------------------------------------------------------------2052 //--------------------------------------------------------------------------------------------------2058 //--------------------------------------------------------------------------------------------------2069 //--------------------------------------------------------------------------------------------------2078 //--------------------------------------------------------------------------------------------------2082 //--------------------------------------------------------------------------------------------------2088 //--------------------------------------------------------------------------------------------------2092 //--------------------------------------------------------------------------------------------------2098 //--------------------------------------------------------------------------------------------------2102 //--------------------------------------------------------------------------------------------------2108 //--------------------------------------------------------------------------------------------------2116 //--------------------------------------------------------------------------------------------------2122 //--------------------------------------------------------------------------------------------------2130 //--------------------------------------------------------------------------------------------------2136 //--------------------------------------------------------------------------------------------------2145 //--------------------------------------------------------------------------------------------------2152 //--------------------------------------------------------------------------------------------------2154 * Get TP-Message-Reference of a message. Message type should be either a SMS Status Report or an2164 //--------------------------------------------------------------------------------------------------2173 //--------------------------------------------------------------------------------------------------2185 //--------------------------------------------------------------------------------------------------2199 //--------------------------------------------------------------------------------------------------2210 //--------------------------------------------------------------------------------------------------2221 //--------------------------------------------------------------------------------------------------2232 //--------------------------------------------------------------------------------------------------2243 //--------------------------------------------------------------------------------------------------2253 //--------------------------------------------------------------------------------------------------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:845Definition: le_sms_interface.h:792le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:803Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:716Definition: le_sms_interface.h:789void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:995le_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:598General News International.Definition: le_sms_interface.h:666(U)SIM data download errorDefinition: le_sms_interface.h:945Command cannot be actioned.Definition: le_sms_interface.h:911void le_sms_StartCount(void)Short Message Type 0 not supported.Definition: le_sms_interface.h:898le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:904le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:784void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:686Definition: le_sms_interface.h:765Definition: le_sms_interface.h:776Definition: le_sms_interface.h:877le_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:915Definition: le_sms_interface.h:756Destination out of order.Definition: le_sms_interface.h:857A terminal problem other than described above.Definition: le_sms_interface.h:787Definition: le_sms_interface.h:795size_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:815le_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:402Local Airplane Flight Schedules.Definition: le_sms_interface.h:696void 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:763le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:871le_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:753le_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:801Definition: le_sms_interface.h:768le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:751Resources facility not implemented.Definition: le_sms_interface.h:875Message present in the message storage has not been read.Definition: le_sms_interface.h:594Invalid mandatory information.Definition: le_sms_interface.h:882Cannot replace short message.Definition: le_sms_interface.h:900Definition: le_sms_interface.h:886le_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:670struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:986le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:690le_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:847le_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:873Definition: le_sms_interface.h:821Business News National.Definition: le_sms_interface.h:672Definition: le_sms_interface.h:809le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)Definition: le_sms_interface.h:748size_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:937struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:978le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:929le_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:889Delivery is not currently possible.Definition: le_sms_interface.h:779Definition: le_sms_interface.h:759void le_sms_ResetCount(void)Definition: le_sms_interface.h:806le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:818Message class not supported.Definition: le_sms_interface.h:907le_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:781Message saved in the message storage has been sent.Definition: le_sms_interface.h:596le_result_t le_sms_GetTpDt(le_sms_MsgRef_t msgRef, char *dt, size_t dtSize)Sementically incorect message.Definition: le_sms_interface.h:880Definition: le_sms_interface.h:812le_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:1025(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:943le_result_t le_sms_GetTpMr(le_sms_MsgRef_t msgRef, uint8_t *tpMrPtr)Business News International.Definition: le_sms_interface.h:674le_result_t le_sms_EnableStatusReport(void)Definition: le_sms_interface.h:824le_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:684Definition: le_sms_interface.h:798Employment Opportunities.Definition: le_sms_interface.h:708le_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:592void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:1011le_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:896le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:773le_result_t le_sms_IsStatusReportEnabled(bool *enabledPtr)Message type nonexistent or not implemented.Definition: le_sms_interface.h:884Entertainment News National.Definition: le_sms_interface.h:688Short message transfer rejected.Definition: le_sms_interface.h:853void 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:682void le_sms_StopCount(void)