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, maximum76 * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve103 * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error187 * identified with @c le_sms_MsgRef_t object. The API returns an error if the message is not found193 * the Message object reference (not necessary from storage). API returns always LE_OK in this case.195 * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms201 * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast203 * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,259 * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.263 * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).268 * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers282 * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()350 //--------------------------------------------------------------------------------------------------354 //--------------------------------------------------------------------------------------------------357 //--------------------------------------------------------------------------------------------------360 * Connect the current client thread to the service providing this API. Block until the service is363 * For each thread that wants to use this API, either ConnectService or TryConnectService must be364 * called before any other functions in this API. Normally, ConnectService is automatically called369 //--------------------------------------------------------------------------------------------------375 //--------------------------------------------------------------------------------------------------378 * Try to connect the current client thread to the service providing this API. Return with an error381 * For each thread that wants to use this API, either ConnectService or TryConnectService must be382 * called before any other functions in this API. Normally, ConnectService is automatically called391 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).394 //--------------------------------------------------------------------------------------------------400 //--------------------------------------------------------------------------------------------------404 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants407 //--------------------------------------------------------------------------------------------------414 //--------------------------------------------------------------------------------------------------420 * longer a connection to the service, and the functions in this API can't be used. For details, see425 //--------------------------------------------------------------------------------------------------432 //--------------------------------------------------------------------------------------------------438 //--------------------------------------------------------------------------------------------------441 //--------------------------------------------------------------------------------------------------445 //--------------------------------------------------------------------------------------------------448 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------456 //--------------------------------------------------------------------------------------------------460 //--------------------------------------------------------------------------------------------------463 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------470 //--------------------------------------------------------------------------------------------------474 //--------------------------------------------------------------------------------------------------477 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------495 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------519 //--------------------------------------------------------------------------------------------------523 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------540 //--------------------------------------------------------------------------------------------------567 //--------------------------------------------------------------------------------------------------571 //--------------------------------------------------------------------------------------------------596 //--------------------------------------------------------------------------------------------------600 //--------------------------------------------------------------------------------------------------675 //--------------------------------------------------------------------------------------------------679 //--------------------------------------------------------------------------------------------------692 //--------------------------------------------------------------------------------------------------696 //--------------------------------------------------------------------------------------------------789 //--------------------------------------------------------------------------------------------------793 //--------------------------------------------------------------------------------------------------908 //--------------------------------------------------------------------------------------------------912 //--------------------------------------------------------------------------------------------------916 //--------------------------------------------------------------------------------------------------920 //--------------------------------------------------------------------------------------------------924 //--------------------------------------------------------------------------------------------------928 //--------------------------------------------------------------------------------------------------932 //--------------------------------------------------------------------------------------------------936 //--------------------------------------------------------------------------------------------------940 //--------------------------------------------------------------------------------------------------944 //--------------------------------------------------------------------------------------------------946 (955 //--------------------------------------------------------------------------------------------------960 //--------------------------------------------------------------------------------------------------962 (969 //--------------------------------------------------------------------------------------------------974 //--------------------------------------------------------------------------------------------------976 (983 //--------------------------------------------------------------------------------------------------990 //--------------------------------------------------------------------------------------------------999 //--------------------------------------------------------------------------------------------------1003 //--------------------------------------------------------------------------------------------------1010 //--------------------------------------------------------------------------------------------------1017 //--------------------------------------------------------------------------------------------------1026 //--------------------------------------------------------------------------------------------------1030 //--------------------------------------------------------------------------------------------------1037 //--------------------------------------------------------------------------------------------------1047 //--------------------------------------------------------------------------------------------------1053 //--------------------------------------------------------------------------------------------------1065 //--------------------------------------------------------------------------------------------------1074 //--------------------------------------------------------------------------------------------------1079 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1085 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1091 //--------------------------------------------------------------------------------------------------1101 //--------------------------------------------------------------------------------------------------1118 //--------------------------------------------------------------------------------------------------1128 //--------------------------------------------------------------------------------------------------1142 //--------------------------------------------------------------------------------------------------1153 //--------------------------------------------------------------------------------------------------1168 //--------------------------------------------------------------------------------------------------1179 //--------------------------------------------------------------------------------------------------1187 * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,1193 //--------------------------------------------------------------------------------------------------1204 //--------------------------------------------------------------------------------------------------1219 //--------------------------------------------------------------------------------------------------1226 //--------------------------------------------------------------------------------------------------1241 //--------------------------------------------------------------------------------------------------1252 //--------------------------------------------------------------------------------------------------1264 //--------------------------------------------------------------------------------------------------1271 //--------------------------------------------------------------------------------------------------1282 //--------------------------------------------------------------------------------------------------1293 //--------------------------------------------------------------------------------------------------1302 //--------------------------------------------------------------------------------------------------1309 //--------------------------------------------------------------------------------------------------1317 * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN1322 //--------------------------------------------------------------------------------------------------1336 //--------------------------------------------------------------------------------------------------1345 //--------------------------------------------------------------------------------------------------1358 //--------------------------------------------------------------------------------------------------1370 //--------------------------------------------------------------------------------------------------1377 //--------------------------------------------------------------------------------------------------1388 //--------------------------------------------------------------------------------------------------1395 //--------------------------------------------------------------------------------------------------1404 //--------------------------------------------------------------------------------------------------1411 //--------------------------------------------------------------------------------------------------1422 //--------------------------------------------------------------------------------------------------1431 //--------------------------------------------------------------------------------------------------1442 //--------------------------------------------------------------------------------------------------1451 //--------------------------------------------------------------------------------------------------1455 * Output parameter is updated with the Telephone number. If the Telephone number string exceeds1466 //--------------------------------------------------------------------------------------------------1477 //--------------------------------------------------------------------------------------------------1482 * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until1492 //--------------------------------------------------------------------------------------------------1508 //--------------------------------------------------------------------------------------------------1512 * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for1518 //--------------------------------------------------------------------------------------------------1525 //--------------------------------------------------------------------------------------------------1530 * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled1539 //--------------------------------------------------------------------------------------------------1550 //--------------------------------------------------------------------------------------------------1565 //--------------------------------------------------------------------------------------------------1576 //--------------------------------------------------------------------------------------------------1590 //--------------------------------------------------------------------------------------------------1601 //--------------------------------------------------------------------------------------------------1606 * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is1616 //--------------------------------------------------------------------------------------------------1627 //--------------------------------------------------------------------------------------------------1636 //--------------------------------------------------------------------------------------------------1643 //--------------------------------------------------------------------------------------------------1657 //--------------------------------------------------------------------------------------------------1664 //--------------------------------------------------------------------------------------------------1672 //--------------------------------------------------------------------------------------------------1678 //--------------------------------------------------------------------------------------------------1687 //--------------------------------------------------------------------------------------------------1694 //--------------------------------------------------------------------------------------------------1705 //--------------------------------------------------------------------------------------------------1712 //--------------------------------------------------------------------------------------------------1723 //--------------------------------------------------------------------------------------------------1730 //--------------------------------------------------------------------------------------------------1740 //--------------------------------------------------------------------------------------------------1747 //--------------------------------------------------------------------------------------------------1754 //--------------------------------------------------------------------------------------------------1761 //--------------------------------------------------------------------------------------------------1768 //--------------------------------------------------------------------------------------------------1775 //--------------------------------------------------------------------------------------------------1779 * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds1789 //--------------------------------------------------------------------------------------------------1798 //--------------------------------------------------------------------------------------------------1803 * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.1809 * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it1812 //--------------------------------------------------------------------------------------------------1820 //--------------------------------------------------------------------------------------------------1827 //--------------------------------------------------------------------------------------------------1834 //--------------------------------------------------------------------------------------------------1841 //--------------------------------------------------------------------------------------------------1848 //--------------------------------------------------------------------------------------------------1856 //--------------------------------------------------------------------------------------------------1862 //--------------------------------------------------------------------------------------------------1870 //--------------------------------------------------------------------------------------------------1876 //--------------------------------------------------------------------------------------------------1884 //--------------------------------------------------------------------------------------------------1890 //--------------------------------------------------------------------------------------------------1898 //--------------------------------------------------------------------------------------------------1904 //--------------------------------------------------------------------------------------------------1912 //--------------------------------------------------------------------------------------------------1921 //--------------------------------------------------------------------------------------------------1929 //--------------------------------------------------------------------------------------------------1938 //--------------------------------------------------------------------------------------------------1946 //--------------------------------------------------------------------------------------------------1952 //--------------------------------------------------------------------------------------------------1961 //--------------------------------------------------------------------------------------------------1973 //--------------------------------------------------------------------------------------------------1982 //--------------------------------------------------------------------------------------------------1994 //--------------------------------------------------------------------------------------------------2002 //--------------------------------------------------------------------------------------------------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:796Definition: le_sms_interface.h:743le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)Definition: le_sms_interface.h:754Card Application Toolkit Protocol Teleservice.Definition: le_sms_interface.h:667Definition: le_sms_interface.h:740le_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:549General News International.Definition: le_sms_interface.h:617(U)SIM data download errorDefinition: le_sms_interface.h:896Command cannot be actioned.Definition: le_sms_interface.h:862Short Message Type 0 not supported.Definition: le_sms_interface.h:849le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:855le_result_t le_sms_ClearCellBroadcastIds(void)Definition: le_sms_interface.h:735void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)le_sms_MsgRef_t le_sms_Create(void)Entertainment News Regional.Definition: le_sms_interface.h:637Definition: le_sms_interface.h:716Definition: le_sms_interface.h:727Definition: le_sms_interface.h:828le_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:866Definition: le_sms_interface.h:707Destination out of order.Definition: le_sms_interface.h:808A terminal problem other than described above.Definition: le_sms_interface.h:738Definition: le_sms_interface.h:746size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)Definition: le_sms_interface.h:766le_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:355Local Airplane Flight Schedules.Definition: le_sms_interface.h:647void 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:714le_result_t le_sms_ActivateCellBroadcast(void)Resources unavailable, unspecified.Definition: le_sms_interface.h:822le_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:704le_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:752Definition: le_sms_interface.h:719le_result_t le_sms_ActivateCdmaCellBroadcast(void)The SMS Destination Address is invalid.Definition: le_sms_interface.h:702Resources facility not implemented.Definition: le_sms_interface.h:826Message present in the message storage has not been read.Definition: le_sms_interface.h:545Invalid mandatory information.Definition: le_sms_interface.h:833Cannot replace short message.Definition: le_sms_interface.h:851void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)Definition: le_sms_interface.h:946void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)Definition: le_sms_interface.h:976Definition: le_sms_interface.h:837le_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:621struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_tDefinition: le_sms_interface.h:937le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)Entertainment News International.Definition: le_sms_interface.h:641void 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_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:798le_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:824Definition: le_sms_interface.h:772Business News National.Definition: le_sms_interface.h:623Definition: le_sms_interface.h:760le_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:699size_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:888struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_tDefinition: le_sms_interface.h:929le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)SM Rejected-Duplicate SM.Definition: le_sms_interface.h:880le_sms_MsgRef_t le_sms_GetFirst(le_sms_MsgListRef_t msgListRef)Definition: le_sms_interface.h:840void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)Definition: le_sms_interface.h:962Delivery is not currently possible.Definition: le_sms_interface.h:730Definition: le_sms_interface.h:710le_sms_MsgRef_t le_sms_SendText(const char *destStr, const char *textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:757le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)Definition: le_sms_interface.h:769Message class not supported.Definition: le_sms_interface.h:858le_result_t le_sms_RemoveCellBroadcastIds(uint16_t fromId, uint16_t toId)void le_sms_ConnectService(void)le_result_t le_sms_SetSmsCenterAddress(const char *tel)Definition: le_sms_interface.h:732Message saved in the message storage has been sent.Definition: le_sms_interface.h:547Sementically incorect message.Definition: le_sms_interface.h:831Definition: le_sms_interface.h:763le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)(U)SIM Application Toolkit busyDefinition: le_sms_interface.h:894Business News International.Definition: le_sms_interface.h:625Definition: le_sms_interface.h:775le_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:635Definition: le_sms_interface.h:749Employment Opportunities.Definition: le_sms_interface.h:659le_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:543le_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:847le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_sms_interface.h:724Message type nonexistent or not implemented.Definition: le_sms_interface.h:835Entertainment News National.Definition: le_sms_interface.h:639Short message transfer rejected.Definition: le_sms_interface.h:804void le_sms_MarkRead(le_sms_MsgRef_t msgRef)Sports News International.Definition: le_sms_interface.h:633