le_sms_interface.h
Go to the documentation of this file.
42 * APIs. It automatically allocates needed resources for the Message object, which is referenced by60 * - Binary content with le_sms_SetBinary(), total length is set with this API, maximum 140 bytes.63 * - UCS2 content (16-bit format) with le_sms_SetUCS2(), total length is set with this API, maximum74 * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve101 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error183 * identified with @c le_sms_MsgRef_t object. The API returns an error if the message is not found189 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.191 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms197 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast199 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,255 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.259 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).264 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers278 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()346 //--------------------------------------------------------------------------------------------------349 * Connect the current client thread to the service providing this API. Block until the service is352 * For each thread that wants to use this API, either ConnectService or TryConnectService must be353 * called before any other functions in this API. Normally, ConnectService is automatically called358 //--------------------------------------------------------------------------------------------------364 //--------------------------------------------------------------------------------------------------367 * Try to connect the current client thread to the service providing this API. Return with an error370 * For each thread that wants to use this API, either ConnectService or TryConnectService must be371 * called before any other functions in this API. Normally, ConnectService is automatically called378 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.379 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).382 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------394 * longer a connection to the service, and the functions in this API can't be used. For details, see399 //--------------------------------------------------------------------------------------------------406 //--------------------------------------------------------------------------------------------------412 //--------------------------------------------------------------------------------------------------416 //--------------------------------------------------------------------------------------------------420 //--------------------------------------------------------------------------------------------------424 //--------------------------------------------------------------------------------------------------429 //--------------------------------------------------------------------------------------------------433 //--------------------------------------------------------------------------------------------------437 //--------------------------------------------------------------------------------------------------441 //--------------------------------------------------------------------------------------------------445 //--------------------------------------------------------------------------------------------------449 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------457 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------469 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------477 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------525 //--------------------------------------------------------------------------------------------------529 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------569 //--------------------------------------------------------------------------------------------------601 //--------------------------------------------------------------------------------------------------605 //--------------------------------------------------------------------------------------------------712 //--------------------------------------------------------------------------------------------------716 //--------------------------------------------------------------------------------------------------731 //--------------------------------------------------------------------------------------------------735 //--------------------------------------------------------------------------------------------------857 //--------------------------------------------------------------------------------------------------861 //--------------------------------------------------------------------------------------------------1027 //--------------------------------------------------------------------------------------------------1031 //--------------------------------------------------------------------------------------------------1035 //--------------------------------------------------------------------------------------------------1039 //--------------------------------------------------------------------------------------------------1043 //--------------------------------------------------------------------------------------------------1047 //--------------------------------------------------------------------------------------------------1051 //--------------------------------------------------------------------------------------------------1055 //--------------------------------------------------------------------------------------------------1059 //--------------------------------------------------------------------------------------------------1069 //--------------------------------------------------------------------------------------------------1071 (1078 //--------------------------------------------------------------------------------------------------1087 //--------------------------------------------------------------------------------------------------1089 (1095 //--------------------------------------------------------------------------------------------------1104 //--------------------------------------------------------------------------------------------------1106 (1111 //--------------------------------------------------------------------------------------------------1117 //--------------------------------------------------------------------------------------------------1127 //--------------------------------------------------------------------------------------------------1131 //--------------------------------------------------------------------------------------------------1138 //--------------------------------------------------------------------------------------------------1144 //--------------------------------------------------------------------------------------------------1154 //--------------------------------------------------------------------------------------------------1158 //--------------------------------------------------------------------------------------------------1165 //--------------------------------------------------------------------------------------------------1175 //--------------------------------------------------------------------------------------------------1181 //--------------------------------------------------------------------------------------------------1193 //--------------------------------------------------------------------------------------------------1203 //--------------------------------------------------------------------------------------------------1208 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1214 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1220 //--------------------------------------------------------------------------------------------------1230 //--------------------------------------------------------------------------------------------------1247 //--------------------------------------------------------------------------------------------------1257 //--------------------------------------------------------------------------------------------------1271 //--------------------------------------------------------------------------------------------------1284 //--------------------------------------------------------------------------------------------------1299 //--------------------------------------------------------------------------------------------------1312 //--------------------------------------------------------------------------------------------------1320 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1326 //--------------------------------------------------------------------------------------------------1339 //--------------------------------------------------------------------------------------------------1354 //--------------------------------------------------------------------------------------------------1361 //--------------------------------------------------------------------------------------------------1376 //--------------------------------------------------------------------------------------------------1389 //--------------------------------------------------------------------------------------------------1401 //--------------------------------------------------------------------------------------------------1408 //--------------------------------------------------------------------------------------------------1419 //--------------------------------------------------------------------------------------------------1432 //--------------------------------------------------------------------------------------------------1441 //--------------------------------------------------------------------------------------------------1448 //--------------------------------------------------------------------------------------------------1456 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1461 //--------------------------------------------------------------------------------------------------1477 //--------------------------------------------------------------------------------------------------1486 //--------------------------------------------------------------------------------------------------1502 //--------------------------------------------------------------------------------------------------1514 //--------------------------------------------------------------------------------------------------1521 //--------------------------------------------------------------------------------------------------1532 //--------------------------------------------------------------------------------------------------1539 //--------------------------------------------------------------------------------------------------1548 //--------------------------------------------------------------------------------------------------1555 //--------------------------------------------------------------------------------------------------1566 //--------------------------------------------------------------------------------------------------1576 //--------------------------------------------------------------------------------------------------1587 //--------------------------------------------------------------------------------------------------1597 //--------------------------------------------------------------------------------------------------1601 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1612 //--------------------------------------------------------------------------------------------------1625 //--------------------------------------------------------------------------------------------------1630 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1640 //--------------------------------------------------------------------------------------------------1655 //--------------------------------------------------------------------------------------------------1659 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1665 //--------------------------------------------------------------------------------------------------1672 //--------------------------------------------------------------------------------------------------1677 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1686 //--------------------------------------------------------------------------------------------------1699 //--------------------------------------------------------------------------------------------------1714 //--------------------------------------------------------------------------------------------------1727 //--------------------------------------------------------------------------------------------------1741 //--------------------------------------------------------------------------------------------------1754 //--------------------------------------------------------------------------------------------------1759 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1769 //--------------------------------------------------------------------------------------------------1782 //--------------------------------------------------------------------------------------------------1791 //--------------------------------------------------------------------------------------------------1798 //--------------------------------------------------------------------------------------------------1812 //--------------------------------------------------------------------------------------------------1819 //--------------------------------------------------------------------------------------------------1827 //--------------------------------------------------------------------------------------------------1833 //--------------------------------------------------------------------------------------------------1842 //--------------------------------------------------------------------------------------------------1849 //--------------------------------------------------------------------------------------------------1860 //--------------------------------------------------------------------------------------------------1867 //--------------------------------------------------------------------------------------------------1878 //--------------------------------------------------------------------------------------------------1885 //--------------------------------------------------------------------------------------------------1895 //--------------------------------------------------------------------------------------------------1902 //--------------------------------------------------------------------------------------------------1909 //--------------------------------------------------------------------------------------------------1916 //--------------------------------------------------------------------------------------------------1923 //--------------------------------------------------------------------------------------------------1930 //--------------------------------------------------------------------------------------------------1934 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1944 //--------------------------------------------------------------------------------------------------1954 //--------------------------------------------------------------------------------------------------1959 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1965 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1968 //--------------------------------------------------------------------------------------------------1975 //--------------------------------------------------------------------------------------------------1982 //--------------------------------------------------------------------------------------------------1989 //--------------------------------------------------------------------------------------------------1996 //--------------------------------------------------------------------------------------------------2003 //--------------------------------------------------------------------------------------------------2011 //--------------------------------------------------------------------------------------------------2017 //--------------------------------------------------------------------------------------------------2025 //--------------------------------------------------------------------------------------------------2031 //--------------------------------------------------------------------------------------------------2039 //--------------------------------------------------------------------------------------------------2045 //--------------------------------------------------------------------------------------------------2053 //--------------------------------------------------------------------------------------------------2059 //--------------------------------------------------------------------------------------------------2067 //--------------------------------------------------------------------------------------------------2077 //--------------------------------------------------------------------------------------------------2085 //--------------------------------------------------------------------------------------------------2095 //--------------------------------------------------------------------------------------------------2103 //--------------------------------------------------------------------------------------------------2109 //--------------------------------------------------------------------------------------------------2118 //--------------------------------------------------------------------------------------------------2131 //--------------------------------------------------------------------------------------------------2140 //--------------------------------------------------------------------------------------------------2153 //--------------------------------------------------------------------------------------------------2161 //--------------------------------------------------------------------------------------------------void le_sms_Delete(le_sms_MsgRef_t msgRef)Unassigned (unallocated) number.Definition: le_sms_interface.h:864Definition: le_sms_interface.h:797le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:812Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:704Definition: le_sms_interface.h:793void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:1071le_result_t le_sms_ClearCdmaCellBroadcastServices(void)Message saved in the message storage has not been sent.Definition: le_sms_interface.h:541General News International.Definition: le_sms_interface.h:629(U)SIM data download errorDefinition: le_sms_interface.h:1012Command cannot be actioned.Definition: le_sms_interface.h:961Short Message Type 0 not supported.Definition: le_sms_interface.h:942le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:951le_result_t le_sms_GetSmsCenterAddress(char *tel, size_t telNumElements)le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:786void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:659Definition: le_sms_interface.h:761le_result_t le_sms_GetTimeStamp(le_sms_MsgRef_t msgRef, char *timestamp, size_t timestampNumElements)Definition: le_sms_interface.h:775Definition: le_sms_interface.h:912Unspecified TP-Command error.Definition: le_sms_interface.h:967Definition: le_sms_interface.h:749Destination out of order.Definition: le_sms_interface.h:882A terminal problem other than described above.Definition: le_sms_interface.h:790Definition: le_sms_interface.h:801size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:828le_result_t le_sms_SetTimeout(le_sms_MsgRef_t msgRef, uint32_t timeout)void le_sms_RemoveRxMessageHandler(le_sms_RxMessageHandlerRef_t addHandlerRef)Local Airplane Flight Schedules.Definition: le_sms_interface.h:674void 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:758le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:903le_sms_MsgRef_t le_sms_GetNext(le_sms_MsgListRef_t msgListRef)Definition: le_sms_interface.h:745le_sms_MsgListRef_t le_sms_CreateRxMsgList(void)The originating MIN is not recognized.Definition: le_sms_interface.h:809Definition: le_sms_interface.h:765le_result_t le_sms_ActivateCdmaCellBroadcast(void)le_result_t le_sms_GetBinary(le_sms_MsgRef_t msgRef, uint8_t *binPtr, size_t *binNumElementsPtr)The SMS Destination Address is invalid.Definition: le_sms_interface.h:742Resources facility not implemented.Definition: le_sms_interface.h:909Message present in the message storage has not been read.Definition: le_sms_interface.h:535Invalid mandatory information.Definition: le_sms_interface.h:919Cannot replace short message.Definition: le_sms_interface.h:945le_result_t le_sms_GetSenderTel(le_sms_MsgRef_t msgRef, char *tel, size_t telNumElements)Definition: le_sms_interface.h:925le_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:635struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:1056le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:665void le_sms_DisconnectService(void)le_sms_MsgRef_t le_sms_SendPdu(const uint8_t *pduPtr, size_t pduNumElements, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)le_result_t le_sms_TryConnectService(void)le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduNumElements)le_result_t le_sms_AddCellBroadcastIds(uint16_t fromId, uint16_t toId)le_result_t le_sms_SetPreferredStorage(le_sms_Storage_t prefStorage)le_result_t le_sms_DeleteFromStorage(le_sms_MsgRef_t msgRef)Operator determined barring.Definition: le_sms_interface.h:867le_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:906Definition: le_sms_interface.h:836Business News National.Definition: le_sms_interface.h:638le_result_t le_sms_GetPDU(le_sms_MsgRef_t msgRef, uint8_t *pduPtr, size_t *pduNumElementsPtr)Definition: le_sms_interface.h:820le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)le_result_t le_sms_SetText(le_sms_MsgRef_t msgRef, const char *text)Definition: le_sms_interface.h:738size_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:1000struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:1048le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:988le_sms_MsgRef_t le_sms_GetFirst(le_sms_MsgListRef_t msgListRef)Definition: le_sms_interface.h:929Delivery is not currently possible.Definition: le_sms_interface.h:779Definition: le_sms_interface.h:753le_sms_MsgRef_t le_sms_SendText(const char *destStr, const char *textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:816Definition: le_sms_interface.h:832Message class not supported.Definition: le_sms_interface.h:955le_result_t le_sms_RemoveCellBroadcastIds(uint16_t fromId, uint16_t toId)le_result_t le_sms_SetBinary(le_sms_MsgRef_t msgRef, const uint8_t *binPtr, size_t binNumElements)void le_sms_ConnectService(void)le_result_t le_sms_GetUCS2(le_sms_MsgRef_t msgRef, uint16_t *ucs2Ptr, size_t *ucs2NumElementsPtr)le_result_t le_sms_SetSmsCenterAddress(const char *tel)le_result_t le_sms_SetUCS2(le_sms_MsgRef_t msgRef, const uint16_t *ucs2Ptr, size_t ucs2NumElements)Definition: le_sms_interface.h:782Message saved in the message storage has been sent.Definition: le_sms_interface.h:538Sementically incorect message.Definition: le_sms_interface.h:916Definition: le_sms_interface.h:824le_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:1106(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:1009void le_sms_RemoveFullStorageEventHandler(le_sms_FullStorageEventHandlerRef_t addHandlerRef)Business News International.Definition: le_sms_interface.h:641Definition: le_sms_interface.h:840le_result_t le_sms_SetDestination(le_sms_MsgRef_t msgRef, const char *dest)le_sms_Format_t le_sms_GetFormat(le_sms_MsgRef_t msgRef)int32_t le_sms_GetPlatformSpecificErrorCode(le_sms_MsgRef_t msgRef)Entertainment News Local.Definition: le_sms_interface.h:656Definition: le_sms_interface.h:805Employment Opportunities.Definition: le_sms_interface.h:692le_sms_Type_t le_sms_GetType(le_sms_MsgRef_t msgRef)Message present in the message storage has been read.Definition: le_sms_interface.h:532void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:1089le_result_t le_sms_Send(le_sms_MsgRef_t msgRef)void le_sms_DeleteList(le_sms_MsgListRef_t msgListRef)le_result_t le_sms_GetText(le_sms_MsgRef_t msgRef, char *text, size_t textNumElements)Telematic interworking not supported.Definition: le_sms_interface.h:939le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:771Message type nonexistent or not implemented.Definition: le_sms_interface.h:922Entertainment News National.Definition: le_sms_interface.h:662Short message transfer rejected.Definition: le_sms_interface.h:876void le_sms_MarkRead(le_sms_MsgRef_t msgRef)Sports News International.Definition: le_sms_interface.h:653