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 retrieve110 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error201 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.203 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms209 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast211 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,265 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.269 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).274 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers283 * SMS Status Report may be sent by the SMS Center (SMSC) to inform the originating device about the287 * le_sms_EnableStatusReport() and le_sms_DisableStatusReport(). The current activation state can290 * The reception of a SMS Status Report is notified by the SMS handler like a SMS message reception,297 * - le_sms_GetTpRa() gives the Recipient Address, defined in 3GPP TS 23.040 section 9.2.3.14, and311 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()390 //--------------------------------------------------------------------------------------------------394 //--------------------------------------------------------------------------------------------------397 //--------------------------------------------------------------------------------------------------400 * Connect the current client thread to the service providing this API. Block until the service is403 * For each thread that wants to use this API, either ConnectService or TryConnectService must be404 * called before any other functions in this API. Normally, ConnectService is automatically called409 //--------------------------------------------------------------------------------------------------415 //--------------------------------------------------------------------------------------------------418 * Try to connect the current client thread to the service providing this API. Return with an error421 * For each thread that wants to use this API, either ConnectService or TryConnectService must be422 * called before any other functions in this API. Normally, ConnectService is automatically called431 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).434 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------444 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants447 //--------------------------------------------------------------------------------------------------454 //--------------------------------------------------------------------------------------------------460 * longer a connection to the service, and the functions in this API can't be used. For details, see465 //--------------------------------------------------------------------------------------------------472 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------493 //--------------------------------------------------------------------------------------------------496 //--------------------------------------------------------------------------------------------------500 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------514 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------521 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------528 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------563 //--------------------------------------------------------------------------------------------------578 //--------------------------------------------------------------------------------------------------582 //--------------------------------------------------------------------------------------------------609 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------642 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------721 //--------------------------------------------------------------------------------------------------734 //--------------------------------------------------------------------------------------------------738 //--------------------------------------------------------------------------------------------------831 //--------------------------------------------------------------------------------------------------835 //--------------------------------------------------------------------------------------------------950 //--------------------------------------------------------------------------------------------------954 //--------------------------------------------------------------------------------------------------958 //--------------------------------------------------------------------------------------------------962 //--------------------------------------------------------------------------------------------------966 //--------------------------------------------------------------------------------------------------970 //--------------------------------------------------------------------------------------------------974 //--------------------------------------------------------------------------------------------------978 //--------------------------------------------------------------------------------------------------982 //--------------------------------------------------------------------------------------------------986 //--------------------------------------------------------------------------------------------------988 (997 //--------------------------------------------------------------------------------------------------1002 //--------------------------------------------------------------------------------------------------1004 (1011 //--------------------------------------------------------------------------------------------------1016 //--------------------------------------------------------------------------------------------------1018 (1025 //--------------------------------------------------------------------------------------------------1032 //--------------------------------------------------------------------------------------------------1041 //--------------------------------------------------------------------------------------------------1045 //--------------------------------------------------------------------------------------------------1052 //--------------------------------------------------------------------------------------------------1059 //--------------------------------------------------------------------------------------------------1068 //--------------------------------------------------------------------------------------------------1072 //--------------------------------------------------------------------------------------------------1079 //--------------------------------------------------------------------------------------------------1089 //--------------------------------------------------------------------------------------------------1095 //--------------------------------------------------------------------------------------------------1107 //--------------------------------------------------------------------------------------------------1116 //--------------------------------------------------------------------------------------------------1121 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1127 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1133 //--------------------------------------------------------------------------------------------------1142 //--------------------------------------------------------------------------------------------------1159 //--------------------------------------------------------------------------------------------------1168 //--------------------------------------------------------------------------------------------------1182 //--------------------------------------------------------------------------------------------------1193 //--------------------------------------------------------------------------------------------------1208 //--------------------------------------------------------------------------------------------------1219 //--------------------------------------------------------------------------------------------------1227 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1233 //--------------------------------------------------------------------------------------------------1244 //--------------------------------------------------------------------------------------------------1259 //--------------------------------------------------------------------------------------------------1266 //--------------------------------------------------------------------------------------------------1281 //--------------------------------------------------------------------------------------------------1292 //--------------------------------------------------------------------------------------------------1304 //--------------------------------------------------------------------------------------------------1311 //--------------------------------------------------------------------------------------------------1322 //--------------------------------------------------------------------------------------------------1333 //--------------------------------------------------------------------------------------------------1342 //--------------------------------------------------------------------------------------------------1349 //--------------------------------------------------------------------------------------------------1357 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1362 //--------------------------------------------------------------------------------------------------1375 //--------------------------------------------------------------------------------------------------1384 //--------------------------------------------------------------------------------------------------1397 //--------------------------------------------------------------------------------------------------1409 //--------------------------------------------------------------------------------------------------1416 //--------------------------------------------------------------------------------------------------1426 //--------------------------------------------------------------------------------------------------1433 //--------------------------------------------------------------------------------------------------1442 //--------------------------------------------------------------------------------------------------1449 //--------------------------------------------------------------------------------------------------1460 //--------------------------------------------------------------------------------------------------1469 //--------------------------------------------------------------------------------------------------1480 //--------------------------------------------------------------------------------------------------1489 //--------------------------------------------------------------------------------------------------1493 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1504 //--------------------------------------------------------------------------------------------------1515 //--------------------------------------------------------------------------------------------------1520 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1530 //--------------------------------------------------------------------------------------------------1546 //--------------------------------------------------------------------------------------------------1550 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1556 //--------------------------------------------------------------------------------------------------1563 //--------------------------------------------------------------------------------------------------1568 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1577 //--------------------------------------------------------------------------------------------------1588 //--------------------------------------------------------------------------------------------------1603 //--------------------------------------------------------------------------------------------------1614 //--------------------------------------------------------------------------------------------------1628 //--------------------------------------------------------------------------------------------------1639 //--------------------------------------------------------------------------------------------------1644 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1654 //--------------------------------------------------------------------------------------------------1665 //--------------------------------------------------------------------------------------------------1674 //--------------------------------------------------------------------------------------------------1681 //--------------------------------------------------------------------------------------------------1695 //--------------------------------------------------------------------------------------------------1702 //--------------------------------------------------------------------------------------------------1710 //--------------------------------------------------------------------------------------------------1716 //--------------------------------------------------------------------------------------------------1725 //--------------------------------------------------------------------------------------------------1732 //--------------------------------------------------------------------------------------------------1743 //--------------------------------------------------------------------------------------------------1750 //--------------------------------------------------------------------------------------------------1761 //--------------------------------------------------------------------------------------------------1768 //--------------------------------------------------------------------------------------------------1778 //--------------------------------------------------------------------------------------------------1785 //--------------------------------------------------------------------------------------------------1792 //--------------------------------------------------------------------------------------------------1799 //--------------------------------------------------------------------------------------------------1806 //--------------------------------------------------------------------------------------------------1813 //--------------------------------------------------------------------------------------------------1817 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1827 //--------------------------------------------------------------------------------------------------1836 //--------------------------------------------------------------------------------------------------1841 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1847 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1850 //--------------------------------------------------------------------------------------------------1857 //--------------------------------------------------------------------------------------------------1864 //--------------------------------------------------------------------------------------------------1871 //--------------------------------------------------------------------------------------------------1878 //--------------------------------------------------------------------------------------------------1885 //--------------------------------------------------------------------------------------------------1893 //--------------------------------------------------------------------------------------------------1899 //--------------------------------------------------------------------------------------------------1907 //--------------------------------------------------------------------------------------------------1913 //--------------------------------------------------------------------------------------------------1921 //--------------------------------------------------------------------------------------------------1927 //--------------------------------------------------------------------------------------------------1935 //--------------------------------------------------------------------------------------------------1941 //--------------------------------------------------------------------------------------------------1949 //--------------------------------------------------------------------------------------------------1958 //--------------------------------------------------------------------------------------------------1966 //--------------------------------------------------------------------------------------------------1975 //--------------------------------------------------------------------------------------------------1983 //--------------------------------------------------------------------------------------------------1989 //--------------------------------------------------------------------------------------------------1998 //--------------------------------------------------------------------------------------------------2010 //--------------------------------------------------------------------------------------------------2019 //--------------------------------------------------------------------------------------------------2031 //--------------------------------------------------------------------------------------------------2039 //--------------------------------------------------------------------------------------------------2045 //--------------------------------------------------------------------------------------------------2056 //--------------------------------------------------------------------------------------------------2065 //--------------------------------------------------------------------------------------------------2069 //--------------------------------------------------------------------------------------------------2075 //--------------------------------------------------------------------------------------------------2079 //--------------------------------------------------------------------------------------------------2085 //--------------------------------------------------------------------------------------------------2089 //--------------------------------------------------------------------------------------------------2095 //--------------------------------------------------------------------------------------------------2103 //--------------------------------------------------------------------------------------------------2109 //--------------------------------------------------------------------------------------------------2117 //--------------------------------------------------------------------------------------------------2123 //--------------------------------------------------------------------------------------------------2132 //--------------------------------------------------------------------------------------------------2139 //--------------------------------------------------------------------------------------------------2149 //--------------------------------------------------------------------------------------------------2158 //--------------------------------------------------------------------------------------------------2170 //--------------------------------------------------------------------------------------------------2184 //--------------------------------------------------------------------------------------------------2195 //--------------------------------------------------------------------------------------------------2206 //--------------------------------------------------------------------------------------------------2217 //--------------------------------------------------------------------------------------------------2228 //--------------------------------------------------------------------------------------------------2238 //--------------------------------------------------------------------------------------------------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:838Definition: le_sms_interface.h:785le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:796Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:709Definition: le_sms_interface.h:782le_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:591General News International.Definition: le_sms_interface.h:659(U)SIM data download errorDefinition: le_sms_interface.h:938Command cannot be actioned.Definition: le_sms_interface.h:904void le_sms_StartCount(void)Short Message Type 0 not supported.Definition: le_sms_interface.h:891le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:897le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:777void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:679Definition: le_sms_interface.h:758Definition: le_sms_interface.h:769Definition: le_sms_interface.h:870le_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:908Definition: le_sms_interface.h:749Destination out of order.Definition: le_sms_interface.h:850A terminal problem other than described above.Definition: le_sms_interface.h:780Definition: le_sms_interface.h:788size_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:808le_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:395Local Airplane Flight Schedules.Definition: le_sms_interface.h:689void 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:756le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:864le_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:746le_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:794Definition: le_sms_interface.h:761le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:744Resources facility not implemented.Definition: le_sms_interface.h:868Message present in the message storage has not been read.Definition: le_sms_interface.h:587Invalid mandatory information.Definition: le_sms_interface.h:875Cannot replace short message.Definition: le_sms_interface.h:893void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:988void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)Definition: le_sms_interface.h:1018Definition: le_sms_interface.h:879le_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:663struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:979le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:683le_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:840le_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:866Definition: le_sms_interface.h:814Business News National.Definition: le_sms_interface.h:665Definition: le_sms_interface.h:802le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)Definition: le_sms_interface.h:741size_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:930struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:971le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:922le_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:882void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:1004Delivery is not currently possible.Definition: le_sms_interface.h:772Definition: le_sms_interface.h:752void le_sms_ResetCount(void)Definition: le_sms_interface.h:799le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:811Message class not supported.Definition: le_sms_interface.h:900le_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:774Message saved in the message storage has been sent.Definition: le_sms_interface.h:589le_result_t le_sms_GetTpDt(le_sms_MsgRef_t msgRef, char *dt, size_t dtSize)Sementically incorect message.Definition: le_sms_interface.h:873Definition: le_sms_interface.h:805le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:936le_result_t le_sms_GetTpMr(le_sms_MsgRef_t msgRef, uint8_t *tpMrPtr)Business News International.Definition: le_sms_interface.h:667le_result_t le_sms_EnableStatusReport(void)Definition: le_sms_interface.h:817le_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:677Definition: le_sms_interface.h:791Employment Opportunities.Definition: le_sms_interface.h:701le_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:585le_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:889le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:766le_result_t le_sms_IsStatusReportEnabled(bool *enabledPtr)Message type nonexistent or not implemented.Definition: le_sms_interface.h:877Entertainment News National.Definition: le_sms_interface.h:681Short message transfer rejected.Definition: le_sms_interface.h:846void 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:675void le_sms_StopCount(void)