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 identifiers288 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()367 //--------------------------------------------------------------------------------------------------371 //--------------------------------------------------------------------------------------------------374 //--------------------------------------------------------------------------------------------------377 * Connect the current client thread to the service providing this API. Block until the service is380 * For each thread that wants to use this API, either ConnectService or TryConnectService must be381 * called before any other functions in this API. Normally, ConnectService is automatically called386 //--------------------------------------------------------------------------------------------------392 //--------------------------------------------------------------------------------------------------395 * Try to connect the current client thread to the service providing this API. Return with an error398 * For each thread that wants to use this API, either ConnectService or TryConnectService must be399 * called before any other functions in this API. Normally, ConnectService is automatically called408 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).411 //--------------------------------------------------------------------------------------------------417 //--------------------------------------------------------------------------------------------------421 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants424 //--------------------------------------------------------------------------------------------------431 //--------------------------------------------------------------------------------------------------437 * longer a connection to the service, and the functions in this API can't be used. For details, see442 //--------------------------------------------------------------------------------------------------449 //--------------------------------------------------------------------------------------------------455 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------462 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------470 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------477 //--------------------------------------------------------------------------------------------------480 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------487 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------505 //--------------------------------------------------------------------------------------------------508 //--------------------------------------------------------------------------------------------------512 //--------------------------------------------------------------------------------------------------515 //--------------------------------------------------------------------------------------------------519 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------540 //--------------------------------------------------------------------------------------------------553 //--------------------------------------------------------------------------------------------------557 //--------------------------------------------------------------------------------------------------584 //--------------------------------------------------------------------------------------------------588 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------617 //--------------------------------------------------------------------------------------------------692 //--------------------------------------------------------------------------------------------------696 //--------------------------------------------------------------------------------------------------709 //--------------------------------------------------------------------------------------------------713 //--------------------------------------------------------------------------------------------------806 //--------------------------------------------------------------------------------------------------810 //--------------------------------------------------------------------------------------------------925 //--------------------------------------------------------------------------------------------------929 //--------------------------------------------------------------------------------------------------933 //--------------------------------------------------------------------------------------------------937 //--------------------------------------------------------------------------------------------------941 //--------------------------------------------------------------------------------------------------945 //--------------------------------------------------------------------------------------------------949 //--------------------------------------------------------------------------------------------------953 //--------------------------------------------------------------------------------------------------957 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------963 (972 //--------------------------------------------------------------------------------------------------977 //--------------------------------------------------------------------------------------------------979 (986 //--------------------------------------------------------------------------------------------------991 //--------------------------------------------------------------------------------------------------993 (1000 //--------------------------------------------------------------------------------------------------1007 //--------------------------------------------------------------------------------------------------1016 //--------------------------------------------------------------------------------------------------1020 //--------------------------------------------------------------------------------------------------1027 //--------------------------------------------------------------------------------------------------1034 //--------------------------------------------------------------------------------------------------1043 //--------------------------------------------------------------------------------------------------1047 //--------------------------------------------------------------------------------------------------1054 //--------------------------------------------------------------------------------------------------1064 //--------------------------------------------------------------------------------------------------1070 //--------------------------------------------------------------------------------------------------1082 //--------------------------------------------------------------------------------------------------1091 //--------------------------------------------------------------------------------------------------1096 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1102 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1108 //--------------------------------------------------------------------------------------------------1117 //--------------------------------------------------------------------------------------------------1134 //--------------------------------------------------------------------------------------------------1143 //--------------------------------------------------------------------------------------------------1157 //--------------------------------------------------------------------------------------------------1168 //--------------------------------------------------------------------------------------------------1183 //--------------------------------------------------------------------------------------------------1194 //--------------------------------------------------------------------------------------------------1202 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1208 //--------------------------------------------------------------------------------------------------1219 //--------------------------------------------------------------------------------------------------1234 //--------------------------------------------------------------------------------------------------1241 //--------------------------------------------------------------------------------------------------1256 //--------------------------------------------------------------------------------------------------1267 //--------------------------------------------------------------------------------------------------1279 //--------------------------------------------------------------------------------------------------1286 //--------------------------------------------------------------------------------------------------1297 //--------------------------------------------------------------------------------------------------1308 //--------------------------------------------------------------------------------------------------1317 //--------------------------------------------------------------------------------------------------1324 //--------------------------------------------------------------------------------------------------1332 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1337 //--------------------------------------------------------------------------------------------------1350 //--------------------------------------------------------------------------------------------------1359 //--------------------------------------------------------------------------------------------------1372 //--------------------------------------------------------------------------------------------------1384 //--------------------------------------------------------------------------------------------------1391 //--------------------------------------------------------------------------------------------------1401 //--------------------------------------------------------------------------------------------------1408 //--------------------------------------------------------------------------------------------------1417 //--------------------------------------------------------------------------------------------------1424 //--------------------------------------------------------------------------------------------------1435 //--------------------------------------------------------------------------------------------------1444 //--------------------------------------------------------------------------------------------------1455 //--------------------------------------------------------------------------------------------------1464 //--------------------------------------------------------------------------------------------------1468 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1479 //--------------------------------------------------------------------------------------------------1490 //--------------------------------------------------------------------------------------------------1495 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1505 //--------------------------------------------------------------------------------------------------1521 //--------------------------------------------------------------------------------------------------1525 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1531 //--------------------------------------------------------------------------------------------------1538 //--------------------------------------------------------------------------------------------------1543 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1552 //--------------------------------------------------------------------------------------------------1563 //--------------------------------------------------------------------------------------------------1578 //--------------------------------------------------------------------------------------------------1589 //--------------------------------------------------------------------------------------------------1603 //--------------------------------------------------------------------------------------------------1614 //--------------------------------------------------------------------------------------------------1619 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1629 //--------------------------------------------------------------------------------------------------1640 //--------------------------------------------------------------------------------------------------1649 //--------------------------------------------------------------------------------------------------1656 //--------------------------------------------------------------------------------------------------1670 //--------------------------------------------------------------------------------------------------1677 //--------------------------------------------------------------------------------------------------1685 //--------------------------------------------------------------------------------------------------1691 //--------------------------------------------------------------------------------------------------1700 //--------------------------------------------------------------------------------------------------1707 //--------------------------------------------------------------------------------------------------1718 //--------------------------------------------------------------------------------------------------1725 //--------------------------------------------------------------------------------------------------1736 //--------------------------------------------------------------------------------------------------1743 //--------------------------------------------------------------------------------------------------1753 //--------------------------------------------------------------------------------------------------1760 //--------------------------------------------------------------------------------------------------1767 //--------------------------------------------------------------------------------------------------1774 //--------------------------------------------------------------------------------------------------1781 //--------------------------------------------------------------------------------------------------1788 //--------------------------------------------------------------------------------------------------1792 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1802 //--------------------------------------------------------------------------------------------------1811 //--------------------------------------------------------------------------------------------------1816 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1822 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1825 //--------------------------------------------------------------------------------------------------1832 //--------------------------------------------------------------------------------------------------1839 //--------------------------------------------------------------------------------------------------1846 //--------------------------------------------------------------------------------------------------1853 //--------------------------------------------------------------------------------------------------1860 //--------------------------------------------------------------------------------------------------1868 //--------------------------------------------------------------------------------------------------1874 //--------------------------------------------------------------------------------------------------1882 //--------------------------------------------------------------------------------------------------1888 //--------------------------------------------------------------------------------------------------1896 //--------------------------------------------------------------------------------------------------1902 //--------------------------------------------------------------------------------------------------1910 //--------------------------------------------------------------------------------------------------1916 //--------------------------------------------------------------------------------------------------1924 //--------------------------------------------------------------------------------------------------1933 //--------------------------------------------------------------------------------------------------1941 //--------------------------------------------------------------------------------------------------1950 //--------------------------------------------------------------------------------------------------1958 //--------------------------------------------------------------------------------------------------1964 //--------------------------------------------------------------------------------------------------1973 //--------------------------------------------------------------------------------------------------1985 //--------------------------------------------------------------------------------------------------1994 //--------------------------------------------------------------------------------------------------2006 //--------------------------------------------------------------------------------------------------2014 //--------------------------------------------------------------------------------------------------2020 //--------------------------------------------------------------------------------------------------2031 //--------------------------------------------------------------------------------------------------2040 //--------------------------------------------------------------------------------------------------2044 //--------------------------------------------------------------------------------------------------2050 //--------------------------------------------------------------------------------------------------2054 //--------------------------------------------------------------------------------------------------2060 //--------------------------------------------------------------------------------------------------2064 //--------------------------------------------------------------------------------------------------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:813Definition: le_sms_interface.h:760le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:771Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:684Definition: le_sms_interface.h:757le_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:566General News International.Definition: le_sms_interface.h:634(U)SIM data download errorDefinition: le_sms_interface.h:913Command cannot be actioned.Definition: le_sms_interface.h:879void le_sms_StartCount(void)Short Message Type 0 not supported.Definition: le_sms_interface.h:866le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:872le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:752void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:654Definition: le_sms_interface.h:733Definition: le_sms_interface.h:744Definition: le_sms_interface.h:845le_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:883Definition: le_sms_interface.h:724Destination out of order.Definition: le_sms_interface.h:825A terminal problem other than described above.Definition: le_sms_interface.h:755Definition: le_sms_interface.h:763size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:783le_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:372Local Airplane Flight Schedules.Definition: le_sms_interface.h:664void 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:731le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:839le_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:721le_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:769Definition: le_sms_interface.h:736le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:719Resources facility not implemented.Definition: le_sms_interface.h:843Message present in the message storage has not been read.Definition: le_sms_interface.h:562Invalid mandatory information.Definition: le_sms_interface.h:850Cannot replace short message.Definition: le_sms_interface.h:868void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:963void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)Definition: le_sms_interface.h:993Definition: le_sms_interface.h:854le_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:638struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:954le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:658void 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:815le_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:841Definition: le_sms_interface.h:789Business News National.Definition: le_sms_interface.h:640Definition: le_sms_interface.h:777le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)Definition: le_sms_interface.h:716size_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:905struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:946le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:897le_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:857void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:979Delivery is not currently possible.Definition: le_sms_interface.h:747Definition: le_sms_interface.h:727void le_sms_ResetCount(void)Definition: le_sms_interface.h:774le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:786Message class not supported.Definition: le_sms_interface.h:875le_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:749Message saved in the message storage has been sent.Definition: le_sms_interface.h:564Sementically incorect message.Definition: le_sms_interface.h:848Definition: le_sms_interface.h:780le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:911Business News International.Definition: le_sms_interface.h:642Definition: le_sms_interface.h:792le_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:652Definition: le_sms_interface.h:766Employment Opportunities.Definition: le_sms_interface.h:676le_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)Message present in the message storage has been read.Definition: le_sms_interface.h:560le_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:864le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:741Message type nonexistent or not implemented.Definition: le_sms_interface.h:852Entertainment News National.Definition: le_sms_interface.h:656Short message transfer rejected.Definition: le_sms_interface.h:821void le_sms_MarkRead(le_sms_MsgRef_t msgRef)Sports News International.Definition: le_sms_interface.h:650void le_sms_StopCount(void)