le_sms_common.h

Go to the documentation of this file.
1 
2 /*
3  * ====================== WARNING ======================
4  *
5  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
6  * DO NOT MODIFY IN ANY WAY.
7  *
8  * ====================== WARNING ======================
9  */
10 /**
11  * @file le_sms_common.h
12  *
13  * Type definitions for le_sms.
14  *
15  */
16 #ifndef LE_SMS_COMMON_H_INCLUDE_GUARD
17 #define LE_SMS_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 // Interface specific includes
23 #include "le_mdmDefs_common.h"
24 
25 #define IFGEN_LE_SMS_PROTOCOL_ID "c2ece8e44b43e7f968fa450336bebe69"
26 #define IFGEN_LE_SMS_MSG_SIZE 197
27 /** @addtogroup le_sms
28  * @{ **/
29 
30 
31 //--------------------------------------------------------------------------------------------------
32 /**
33  * Time stamp string length.
34  * The string format is "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone).
35  * One extra byte is added for the null character.
36  */
37 //--------------------------------------------------------------------------------------------------
38 #define LE_SMS_TIMESTAMP_MAX_LEN 20
39 
40 //--------------------------------------------------------------------------------------------------
41 /**
42  * Time stamp string length (including the null-terminator).
43  */
44 //--------------------------------------------------------------------------------------------------
45 #define LE_SMS_TIMESTAMP_MAX_BYTES 21
46 
47 //--------------------------------------------------------------------------------------------------
48 /**
49  * The text message can be up to 160 characters long.
50  * One extra byte is added for the null character.
51  */
52 //--------------------------------------------------------------------------------------------------
53 #define LE_SMS_TEXT_MAX_LEN 160
54 
55 //--------------------------------------------------------------------------------------------------
56 /**
57  * Test message string length (including the null-terminator).
58  */
59 //--------------------------------------------------------------------------------------------------
60 #define LE_SMS_TEXT_MAX_BYTES 161
61 
62 //--------------------------------------------------------------------------------------------------
63 /**
64  * The raw binary message can be up to 140 bytes long.
65  */
66 //--------------------------------------------------------------------------------------------------
67 #define LE_SMS_BINARY_MAX_BYTES 140
68 
69 //--------------------------------------------------------------------------------------------------
70 /**
71  * The UCS2 message can be up to 140 bytes long (70 characters).
72  */
73 //--------------------------------------------------------------------------------------------------
74 #define LE_SMS_UCS2_MAX_BYTES 140
75 
76 //--------------------------------------------------------------------------------------------------
77 /**
78  * The UCS2 message can be up to 70 characters (140 bytes long).
79  */
80 //--------------------------------------------------------------------------------------------------
81 #define LE_SMS_UCS2_MAX_CHARS 70
82 
83 //--------------------------------------------------------------------------------------------------
84 /**
85  * The PDU payload bytes long.
86  */
87 //--------------------------------------------------------------------------------------------------
88 #define LE_SMS_PDU_MAX_PAYLOAD 140
89 
90 //--------------------------------------------------------------------------------------------------
91 /**
92  * The PDU message can be up to 36 (header) + 140 (payload) bytes long.
93  */
94 //--------------------------------------------------------------------------------------------------
95 #define LE_SMS_PDU_MAX_BYTES 176
96 
97 //--------------------------------------------------------------------------------------------------
98 /**
99  * Message Format.
100  */
101 //--------------------------------------------------------------------------------------------------
102 typedef enum
103 {
105  ///< PDU message format.
107  ///< Text message format.
109  ///< Binary message format.
111  ///< UCS2 message format.
113  ///< Unknown message format.
114 }
116 
117 
118 //--------------------------------------------------------------------------------------------------
119 /**
120  * Message Type.
121  */
122 //--------------------------------------------------------------------------------------------------
123 typedef enum
124 {
126  ///< SMS mobile terminated message.
128  ///< SMS mobile originated message.
130  ///< SMS Cell Broadcast message.
132  ///< SMS Status Report.
133 }
135 
136 
137 //--------------------------------------------------------------------------------------------------
138 /**
139  * Message Status.
140  */
141 //--------------------------------------------------------------------------------------------------
142 typedef enum
143 {
145  ///< Message present in the message storage has been read.
147  ///< Message present in the message storage has not been read.
149  ///< Message saved in the message storage has been sent.
151  ///< Message saved in the message storage has not been sent.
153  ///< Message has been sent.
155  ///< Message has been in the sending pool.
157  ///< Message has not been sent.
159  ///< Message sending has Failed.
161  ///< Message sending has Failed due to timeout.
163  ///< Unknown message status.
164 }
166 
167 
168 //--------------------------------------------------------------------------------------------------
169 /**
170  * CDMA Cell broadcast message languages.
171  */
172 //--------------------------------------------------------------------------------------------------
173 typedef enum
174 {
176  ///< Unknow or Unspecified language.
178  ///< English language.
180  ///< French language.
182  ///< Spanish language.
184  ///< Japanese language.
186  ///< Korean language.
188  ///< Chinese language.
190  ///< Hebrew language.
191  LE_SMS_LANGUAGE_MAX = 8
192  ///<
193 }
195 
196 
197 //--------------------------------------------------------------------------------------------------
198 /**
199  * CDMA Cell broadcast Service Categories.
200  */
201 //--------------------------------------------------------------------------------------------------
202 typedef enum
203 {
205  ///< Unknown or Unspecified.
207  ///< Emergency Broadcast.
209  ///< Administrative.
211  ///< Maintenance.
213  ///< General News Local.
215  ///< General News Regional.
217  ///< General News National.
219  ///< General News International.
221  ///< Business News Local.
223  ///< Business News Regional.
225  ///< Business News National.
227  ///< Business News International.
229  ///< Sports News Local.
231  ///< Sports News Regional.
233  ///< Sports News National.
235  ///< Sports News International.
237  ///< Entertainment News Local.
239  ///< Entertainment News Regional.
241  ///< Entertainment News National.
243  ///< Entertainment News International.
245  ///< Local weather.
247  ///< Area Traffic Reports.
249  ///< Local Airplane Flight Schedules.
251  ///< Restaurants.
253  ///< Lodgings.
255  ///< Retail Directory.
257  ///< Advertisements.
259  ///< Stock Quotes.
261  ///< Employment Opportunities.
263  ///< Medical/Health/Hospitals.
265  ///< Technology News.
267  ///< Multicategory.
269  ///< Card Application Toolkit Protocol Teleservice.
270  LE_SMS_CDMA_SVC_CAT_MAX = 33
271  ///<
272 }
274 
275 
276 //--------------------------------------------------------------------------------------------------
277 /**
278  * SMS storage area.
279  */
280 //--------------------------------------------------------------------------------------------------
281 typedef enum
282 {
284  ///< Non volatile memory storage.
286  ///< Sim SMS storage.
288  ///< Undefined storage.
289 }
291 
292 
293 //--------------------------------------------------------------------------------------------------
294 /**
295  * 3GPP2 Message Error code when the message sending has failed.
296  */
297 //--------------------------------------------------------------------------------------------------
298 typedef enum
299 {
301  ///< The SMS Destination Address is valid but is not.
302  ///< currently allocated to an SMS terminal.
304  ///< The SMS Destination Address is invalid.
306  ///< The network transmission failed due to lack of
307  ///< a network resource or link capacity.
309  ///< A network node failed, a link failed, or a
310  ///< required operation failed.
312  ///< The SMS_TeleserviceIdentifier is not known, is
313  ///< not supported, or is not authorized by an
314  ///< addressed functional entity.
316  ///< A network problem other than identified above.
318  ///< The addressed MS-based SME is known, but it
319  ///< does not respond to a page.
321  ///< The destination MS-based SME is SMS capable,
322  ///< but is currently engaged in a call, a service,
323  ///< or a call mode that precludes the use of SMS,
324  ///< or the destination SME is congested.
326  ///< The destination SME does not acknowledge receipt
327  ///< of the SMS delivery.
329  ///< A required terminal resource is not available to
330  ///< process this message.
332  ///< Delivery is not currently possible.
334  ///< The addressed destination is out of
335  ///< service for an extended period of time.
337  ///< The MS-based SME is no longer at the
338  ///< temporary SMS routing address.
340  ///< A terminal problem other than described above.
342  ///< There is no channel available or there is
343  ///< radio congestion at this time.
345  ///< The MS for an MS-based SME is operating in a
346  ///< mode that does not support SMS at this time.
348  ///< A radio interface problem to an MS-based SME
349  ///< other than described above.
351  ///< The size of a parameter or field is not
352  ///< what is expected.
354  ///< The originating MIN is not recognized.
356  ///< The destination is not authorized to receive
357  ///< the SMS message.
359  ///< The originating supplementary service is
360  ///< not known or supported.
362  ///< The originating supplementary service is
363  ///< not known or supported.
365  ///< An optional parameter that is required
366  ///< for a particular function.
368  ///< A parameter is missing that is mandatory.
369  ///< for a particular message.
371  ///< A known parameter has an unknown or
372  ///< unsupported value.
374  ///< A known parameter has a known but unexpected
375  ///< value.
377  ///< The User Data size is too large for access
378  ///< technology, transport network, or call
379  ///< mode, etc
381  ///< Other general problems.
383  ///< Platform specific code.
385  ///< Undefined reason.
386 }
388 
389 
390 //--------------------------------------------------------------------------------------------------
391 /**
392  * Message Error code when the message sending has failed.
393  */
394 //--------------------------------------------------------------------------------------------------
395 typedef enum
396 {
398  ///< Unassigned (unallocated) number
400  ///< Operator determined barring
402  ///< Call barred
404  ///< Reserved
406  ///< Short message transfer rejected
408  ///< Memory capacity exceeded
410  ///< Destination out of order
412  ///< Unidentified subscriber
414  ///< Facility rejected
416  ///< Unknown subscriber
418  ///< Network out of order
420  ///< Temporary failure
422  ///< Congestion
424  ///< Resources unavailable, unspecified
426  ///< Resources facility not subscribed
428  ///< Resources facility not implemented
430  ///< Invalid short message transfer
431  ///< reference value
433  ///< Sementically incorect message
435  ///< Invalid mandatory information
437  ///< Message type nonexistent or not implemented
439  ///< Message not compatible with short message
440  ///< protocol state
442  ///< Information element nonexistent
443  ///< or not implemented
445  ///< Protocol error, unspecified
447  ///< Interworking, unspecified
449  ///< Telematic interworking not supported
451  ///< Short Message Type 0 not supported
453  ///< Cannot replace short message
455  ///< Unspecified TP-PID error
457  ///< Data coding scheme (alphabet)
458  ///< not supported
460  ///< Message class not supported
462  ///< Unspecified TP-DCS error
464  ///< Command cannot be actioned
466  ///< Command unsupported
468  ///< Unspecified TP-Command error
470  ///< TPDU not supported
472  ///< SC busy
474  ///< No SC subscription
476  ///< SC system failure
478  ///< Invalid SME address
480  ///< Destination SME barred
482  ///< SM Rejected-Duplicate SM
484  ///< TP-VPF not supported
486  ///< TP-VP not supporte
488  ///< (U)SIM SMS storage full
490  ///< No SMS storage capability in (U)SIM
492  ///< Error in MS
494  ///< Memory capacity exceeded
496  ///< (U)SIM Application Toolkit busy
498  ///< (U)SIM data download error
500  ///< Unspecified error cause
502  ///< Platform specific code.
504  ///< Undefined reason.
505 }
507 
508 
509 //--------------------------------------------------------------------------------------------------
510 /**
511  * Declare a reference type for referring to SMS Message objects.
512  */
513 //--------------------------------------------------------------------------------------------------
514 typedef struct le_sms_Msg* le_sms_MsgRef_t;
515 
516 
517 //--------------------------------------------------------------------------------------------------
518 /**
519  * Opaque type for SMS Message Listing.
520  */
521 //--------------------------------------------------------------------------------------------------
522 typedef struct le_sms_MsgList* le_sms_MsgListRef_t;
523 
524 
525 //--------------------------------------------------------------------------------------------------
526 /**
527  * Reference type used by Add/Remove functions for EVENT 'le_sms_RxMessage'
528  */
529 //--------------------------------------------------------------------------------------------------
530 typedef struct le_sms_RxMessageHandler* le_sms_RxMessageHandlerRef_t;
531 
532 
533 //--------------------------------------------------------------------------------------------------
534 /**
535  * Reference type used by Add/Remove functions for EVENT 'le_sms_FullStorageEvent'
536  */
537 //--------------------------------------------------------------------------------------------------
538 typedef struct le_sms_FullStorageEventHandler* le_sms_FullStorageEventHandlerRef_t;
539 
540 
541 //--------------------------------------------------------------------------------------------------
542 /**
543  * Handler for Sending result.
544  */
545 //--------------------------------------------------------------------------------------------------
546 typedef void (*le_sms_CallbackResultFunc_t)
547 (
548  le_sms_MsgRef_t msgRef,
549  ///< Reference to the message object.
550  le_sms_Status_t status,
551  ///< Status result.
552  void* contextPtr
553  ///<
554 );
555 
556 //--------------------------------------------------------------------------------------------------
557 /**
558  * Handler for New Message.
559  *
560  */
561 //--------------------------------------------------------------------------------------------------
562 typedef void (*le_sms_RxMessageHandlerFunc_t)
563 (
564  le_sms_MsgRef_t msgRef,
565  ///< Message reference.
566  void* contextPtr
567  ///<
568 );
569 
570 //--------------------------------------------------------------------------------------------------
571 /**
572  * Handler for full storage indication.
573  *
574  */
575 //--------------------------------------------------------------------------------------------------
576 typedef void (*le_sms_FullStorageHandlerFunc_t)
577 (
578  le_sms_Storage_t storage,
579  ///< storage parameter.
580  void* contextPtr
581  ///<
582 );
583 
584 
585 //--------------------------------------------------------------------------------------------------
586 /**
587  * Get if this client bound locally.
588  */
589 //--------------------------------------------------------------------------------------------------
590 LE_SHARED bool ifgen_le_sms_HasLocalBinding
591 (
592  void
593 );
594 
595 
596 //--------------------------------------------------------------------------------------------------
597 /**
598  * Init data that is common across all threads
599  */
600 //--------------------------------------------------------------------------------------------------
601 LE_SHARED void ifgen_le_sms_InitCommonData
602 (
603  void
604 );
605 
606 
607 //--------------------------------------------------------------------------------------------------
608 /**
609  * Perform common initialization and open a session
610  */
611 //--------------------------------------------------------------------------------------------------
612 LE_SHARED le_result_t ifgen_le_sms_OpenSession
613 (
614  le_msg_SessionRef_t _ifgen_sessionRef,
615  bool isBlocking
616 );
617 
618 //--------------------------------------------------------------------------------------------------
619 /**
620  * Add handler function for EVENT 'le_sms_RxMessage'
621  *
622  * This event provides information on new received messages.
623  *
624  */
625 //--------------------------------------------------------------------------------------------------
626 LE_SHARED le_sms_RxMessageHandlerRef_t ifgen_le_sms_AddRxMessageHandler
627 (
628  le_msg_SessionRef_t _ifgen_sessionRef,
630  ///< [IN]
631  void* contextPtr
632  ///< [IN]
633 );
634 
635 //--------------------------------------------------------------------------------------------------
636 /**
637  * Remove handler function for EVENT 'le_sms_RxMessage'
638  */
639 //--------------------------------------------------------------------------------------------------
640 LE_SHARED void ifgen_le_sms_RemoveRxMessageHandler
641 (
642  le_msg_SessionRef_t _ifgen_sessionRef,
644  ///< [IN]
645 );
646 
647 //--------------------------------------------------------------------------------------------------
648 /**
649  * Add handler function for EVENT 'le_sms_FullStorageEvent'
650  *
651  * This event provides information on full storage indication.
652  *
653  */
654 //--------------------------------------------------------------------------------------------------
655 LE_SHARED le_sms_FullStorageEventHandlerRef_t ifgen_le_sms_AddFullStorageEventHandler
656 (
657  le_msg_SessionRef_t _ifgen_sessionRef,
659  ///< [IN]
660  void* contextPtr
661  ///< [IN]
662 );
663 
664 //--------------------------------------------------------------------------------------------------
665 /**
666  * Remove handler function for EVENT 'le_sms_FullStorageEvent'
667  */
668 //--------------------------------------------------------------------------------------------------
669 LE_SHARED void ifgen_le_sms_RemoveFullStorageEventHandler
670 (
671  le_msg_SessionRef_t _ifgen_sessionRef,
673  ///< [IN]
674 );
675 
676 //--------------------------------------------------------------------------------------------------
677 /**
678  * Create an SMS Message data structure.
679  *
680  * @return Reference to the new Message object.
681  *
682  * @note
683  * On failure, the process exits, so you don't have to worry about checking the returned
684  * reference for validity.
685  */
686 //--------------------------------------------------------------------------------------------------
687 LE_SHARED le_sms_MsgRef_t ifgen_le_sms_Create
688 (
689  le_msg_SessionRef_t _ifgen_sessionRef
690 );
691 
692 //--------------------------------------------------------------------------------------------------
693 /**
694  * Set the Telephone destination number.
695  *
696  * Telephone number is defined in ITU-T recommendations E.164/E.163.
697  * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
698  *
699  * @return LE_NOT_PERMITTED Message is Read-Only.
700  * @return LE_BAD_PARAMETER Telephone destination number length is equal to zero.
701  * @return LE_OK Function succeeded.
702  *
703  * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN
704  * digits), it is a fatal error, the function will not return.
705  *
706  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
707  * function will not return.
708  */
709 //--------------------------------------------------------------------------------------------------
710 LE_SHARED le_result_t ifgen_le_sms_SetDestination
711 (
712  le_msg_SessionRef_t _ifgen_sessionRef,
713  le_sms_MsgRef_t msgRef,
714  ///< [IN] Reference to the message object.
715  const char* LE_NONNULL dest
716  ///< [IN] Telephone number string.
717 );
718 
719 //--------------------------------------------------------------------------------------------------
720 /**
721  * This function must be called to set the Text Message content.
722  *
723  * @return LE_NOT_PERMITTED Message is Read-Only.
724  * @return LE_BAD_PARAMETER Text message length is equal to zero.
725  * @return LE_OK Function succeeded.
726  *
727  * @note Text Message is encoded in ASCII format (ISO8859-15) and characters have to exist in
728  * the GSM 23.038 7 bit alphabet.
729  *
730  * @note If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the
731  * function will not return.
732  *
733  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
734  * function will not return.
735  */
736 //--------------------------------------------------------------------------------------------------
737 LE_SHARED le_result_t ifgen_le_sms_SetText
738 (
739  le_msg_SessionRef_t _ifgen_sessionRef,
740  le_sms_MsgRef_t msgRef,
741  ///< [IN] Reference to the message object.
742  const char* LE_NONNULL text
743  ///< [IN] SMS text.
744 );
745 
746 //--------------------------------------------------------------------------------------------------
747 /**
748  * Set the binary message content.
749  *
750  * @return LE_NOT_PERMITTED Message is Read-Only.
751  * @return LE_BAD_PARAMETER Length of the data is equal to zero.
752  * @return LE_OK Function succeeded.
753  *
754  * @note If length of the data is too long (max LE_SMS_BINARY_MAX_BYTES bytes), it is a fatal
755  * error, the function will not return.
756  *
757  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
758  * function will not return.
759  */
760 //--------------------------------------------------------------------------------------------------
761 LE_SHARED le_result_t ifgen_le_sms_SetBinary
762 (
763  le_msg_SessionRef_t _ifgen_sessionRef,
764  le_sms_MsgRef_t msgRef,
765  ///< [IN] Reference to the message object.
766  const uint8_t* binPtr,
767  ///< [IN] Binary data.
768  size_t binSize
769  ///< [IN]
770 );
771 
772 //--------------------------------------------------------------------------------------------------
773 /**
774  * Set the UCS2 message content (16-bit format).
775  *
776  * @return
777  * - LE_NOT_PERMITTED Message is Read-Only.
778  * - LE_BAD_PARAMETER Length of the data is equal to zero.
779  * - LE_OK Function succeeded.
780  *
781  * @note If length of the data is too long (max LE_SMS_UCS2_MAX_CHARS), it is a fatal
782  * error, the function will not return.
783  *
784  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
785  * function will not return.
786  */
787 //--------------------------------------------------------------------------------------------------
788 LE_SHARED le_result_t ifgen_le_sms_SetUCS2
789 (
790  le_msg_SessionRef_t _ifgen_sessionRef,
791  le_sms_MsgRef_t msgRef,
792  ///< [IN] Reference to the message object.
793  const uint16_t* ucs2Ptr,
794  ///< [IN] UCS2 message.
795  size_t ucs2Size
796  ///< [IN]
797 );
798 
799 //--------------------------------------------------------------------------------------------------
800 /**
801  * Set the PDU message content.
802  *
803  * @return LE_NOT_PERMITTED Message is Read-Only.
804  * @return LE_BAD_PARAMETER Length of the data is equal to zero.
805  * @return LE_OK Function succeeded.
806  *
807  * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,
808  * the function will not return.
809  *
810  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
811  * function will not return.
812  */
813 //--------------------------------------------------------------------------------------------------
814 LE_SHARED le_result_t ifgen_le_sms_SetPDU
815 (
816  le_msg_SessionRef_t _ifgen_sessionRef,
817  le_sms_MsgRef_t msgRef,
818  ///< [IN] Reference to the message object.
819  const uint8_t* pduPtr,
820  ///< [IN] PDU message.
821  size_t pduSize
822  ///< [IN]
823 );
824 
825 //--------------------------------------------------------------------------------------------------
826 /**
827  * Send an SMS message.
828  *
829  * Verifies first if the parameters are valid, then it checks the modem state can support
830  * message sending.
831  *
832  * @return LE_FORMAT_ERROR Message content is invalid.
833  * @return LE_FAULT Function failed to send the message.
834  * @return LE_OK Function succeeded.
835  * @return LE_TIMEOUT Timeout before the complete sending.
836  *
837  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
838  * function will not return.
839  */
840 //--------------------------------------------------------------------------------------------------
841 LE_SHARED le_result_t ifgen_le_sms_Send
842 (
843  le_msg_SessionRef_t _ifgen_sessionRef,
844  le_sms_MsgRef_t msgRef
845  ///< [IN] Reference to the message object.
846 );
847 
848 //--------------------------------------------------------------------------------------------------
849 /**
850  * Send an asynchronous SMS message.
851  *
852  * Verifies first if the parameters are valid, then it checks the modem state can support
853  * message sending.
854  *
855  * @return LE_FORMAT_ERROR Message content is invalid.
856  * @return LE_FAULT Function failed to send the message.
857  * @return LE_OK Function succeeded.
858  * @return LE_TIMEOUT Timeout before the complete sending.
859  *
860  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
861  * function will not return.
862  */
863 //--------------------------------------------------------------------------------------------------
864 LE_SHARED le_result_t ifgen_le_sms_SendAsync
865 (
866  le_msg_SessionRef_t _ifgen_sessionRef,
867  le_sms_MsgRef_t msgRef,
868  ///< [IN] Reference to the message object.
869  le_sms_CallbackResultFunc_t handlerPtr,
870  ///< [IN] CallBack for sending result.
871  void* contextPtr
872  ///< [IN]
873 );
874 
875 //--------------------------------------------------------------------------------------------------
876 /**
877  * Get the error code when a 3GPP2 message sending has Failed.
878  *
879  * @return The error code
880  *
881  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
882  * function will not return.
883  *
884  * @note It is only applicable for 3GPP2 message sending failure, otherwise
885  * LE_SMS_ERROR_3GPP2_MAX is returned.
886  */
887 //--------------------------------------------------------------------------------------------------
888 LE_SHARED le_sms_ErrorCode3GPP2_t ifgen_le_sms_Get3GPP2ErrorCode
889 (
890  le_msg_SessionRef_t _ifgen_sessionRef,
891  le_sms_MsgRef_t msgRef
892  ///< [IN] Reference to the message object.
893 );
894 
895 //--------------------------------------------------------------------------------------------------
896 /**
897  * Get the Radio Protocol and the Transfer Protocol error code when a 3GPP message sending has
898  * failed.
899  *
900  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
901  * function will not return.
902  *
903  * @note It is only applicable for 3GPP message sending failure, otherwise
904  * LE_SMS_ERROR_3GPP_MAX is returned.
905  */
906 //--------------------------------------------------------------------------------------------------
907 LE_SHARED void ifgen_le_sms_GetErrorCode
908 (
909  le_msg_SessionRef_t _ifgen_sessionRef,
910  le_sms_MsgRef_t msgRef,
911  ///< [IN] Reference to the message object.
912  le_sms_ErrorCode_t* rpCausePtr,
913  ///< [OUT] Radio Protocol cause code.
914  le_sms_ErrorCode_t* tpCausePtr
915  ///< [OUT] Transfer Protocol cause code.
916 );
917 
918 //--------------------------------------------------------------------------------------------------
919 /**
920  * Called to get the platform specific error code.
921  *
922  * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific error code description.
923  *
924  * @return The platform specific error code.
925  *
926  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
927  * function will not return.
928  */
929 //--------------------------------------------------------------------------------------------------
930 LE_SHARED int32_t ifgen_le_sms_GetPlatformSpecificErrorCode
931 (
932  le_msg_SessionRef_t _ifgen_sessionRef,
933  le_sms_MsgRef_t msgRef
934  ///< [IN] Reference to the message object.
935 );
936 
937 //--------------------------------------------------------------------------------------------------
938 /**
939  * Create and asynchronously send a text message.
940  *
941  * @return
942  * - le_sms_Msg Reference to the new Message object pooled.
943  * - NULL Not possible to pool a new message.
944  *
945  * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN
946  * digits), it is a fatal error, the function will not return.
947  * @note If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the
948  * function will not return.
949  */
950 //--------------------------------------------------------------------------------------------------
951 LE_SHARED le_sms_MsgRef_t ifgen_le_sms_SendText
952 (
953  le_msg_SessionRef_t _ifgen_sessionRef,
954  const char* LE_NONNULL destStr,
955  ///< [IN] Telephone number string.
956  const char* LE_NONNULL textStr,
957  ///< [IN] SMS text.
958  le_sms_CallbackResultFunc_t handlerPtr,
959  ///< [IN] CallBack for sending result.
960  void* contextPtr
961  ///< [IN]
962 );
963 
964 //--------------------------------------------------------------------------------------------------
965 /**
966  * Create and asynchronously send a PDU message.
967  *
968  * @return
969  * - le_sms_Msg Reference to the new Message object pooled.
970  * - NULL Not possible to pool a new message.
971  *
972  */
973 //--------------------------------------------------------------------------------------------------
974 LE_SHARED le_sms_MsgRef_t ifgen_le_sms_SendPdu
975 (
976  le_msg_SessionRef_t _ifgen_sessionRef,
977  const uint8_t* pduPtr,
978  ///< [IN] PDU message.
979  size_t pduSize,
980  ///< [IN]
981  le_sms_CallbackResultFunc_t handlerPtr,
982  ///< [IN] CallBack for sending result.
983  void* contextPtr
984  ///< [IN]
985 );
986 
987 //--------------------------------------------------------------------------------------------------
988 /**
989  * Delete a Message data structure.
990  *
991  * It deletes the Message data structure and all the allocated memory is freed. If several
992  * users own the Message object (e.g., several handler functions registered for
993  * SMS message reception), the Message object will only be deleted if one User
994  * owns the Message object.
995  *
996  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
997  * function will not return.
998  */
999 //--------------------------------------------------------------------------------------------------
1000 LE_SHARED void ifgen_le_sms_Delete
1001 (
1002  le_msg_SessionRef_t _ifgen_sessionRef,
1003  le_sms_MsgRef_t msgRef
1004  ///< [IN] Reference to the message object.
1005 );
1006 
1007 //--------------------------------------------------------------------------------------------------
1008 /**
1009  * Get the message format.
1010  *
1011  * @return Message format.
1012  *
1013  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1014  * function will not return.
1015  *
1016  */
1017 //--------------------------------------------------------------------------------------------------
1018 LE_SHARED le_sms_Format_t ifgen_le_sms_GetFormat
1019 (
1020  le_msg_SessionRef_t _ifgen_sessionRef,
1021  le_sms_MsgRef_t msgRef
1022  ///< [IN] Reference to the message object.
1023 );
1024 
1025 //--------------------------------------------------------------------------------------------------
1026 /**
1027  * Get the message type.
1028  *
1029  * @return Message type.
1030  *
1031  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1032  * function will not return.
1033  */
1034 //--------------------------------------------------------------------------------------------------
1035 LE_SHARED le_sms_Type_t ifgen_le_sms_GetType
1036 (
1037  le_msg_SessionRef_t _ifgen_sessionRef,
1038  le_sms_MsgRef_t msgRef
1039  ///< [IN] Reference to the message object.
1040 );
1041 
1042 //--------------------------------------------------------------------------------------------------
1043 /**
1044  * Get the Cell Broadcast Message Identifier.
1045  *
1046  * @return
1047  * - LE_FAULT Message is not a cell broadcast type.
1048  * - LE_OK Function succeeded.
1049  *
1050  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1051  * function will not return.
1052  */
1053 //--------------------------------------------------------------------------------------------------
1054 LE_SHARED le_result_t ifgen_le_sms_GetCellBroadcastId
1055 (
1056  le_msg_SessionRef_t _ifgen_sessionRef,
1057  le_sms_MsgRef_t msgRef,
1058  ///< [IN] Reference to the message object.
1059  uint16_t* messageIdPtr
1060  ///< [OUT] Cell Broadcast Message Identifier.
1061 );
1062 
1063 //--------------------------------------------------------------------------------------------------
1064 /**
1065  * Get the Cell Broadcast Message Serial Number.
1066  *
1067  * @return
1068  * - LE_FAULT Message is not a cell broadcast type.
1069  * - LE_OK Function succeeded.
1070  *
1071  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1072  * function will not return.
1073  */
1074 //--------------------------------------------------------------------------------------------------
1075 LE_SHARED le_result_t ifgen_le_sms_GetCellBroadcastSerialNumber
1076 (
1077  le_msg_SessionRef_t _ifgen_sessionRef,
1078  le_sms_MsgRef_t msgRef,
1079  ///< [IN] Reference to the message object.
1080  uint16_t* serialNumberPtr
1081  ///< [OUT] Cell Broadcast Serial Number.
1082 );
1083 
1084 //--------------------------------------------------------------------------------------------------
1085 /**
1086  * Get the Sender Telephone number.
1087  *
1088  * Output parameter is updated with the Telephone number. If the Telephone number string exceeds
1089  * the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until
1090  * 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
1091  *
1092  * @return LE_NOT_PERMITTED Message is not a received message.
1093  * @return LE_OVERFLOW Telephone number length exceed the maximum length.
1094  * @return LE_OK Function succeeded.
1095  *
1096  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1097  * function will not return.
1098  */
1099 //--------------------------------------------------------------------------------------------------
1100 LE_SHARED le_result_t ifgen_le_sms_GetSenderTel
1101 (
1102  le_msg_SessionRef_t _ifgen_sessionRef,
1103  le_sms_MsgRef_t msgRef,
1104  ///< [IN] Reference to the message object.
1105  char* tel,
1106  ///< [OUT] Telephone number string.
1107  size_t telSize
1108  ///< [IN]
1109 );
1110 
1111 //--------------------------------------------------------------------------------------------------
1112 /**
1113  * Get the Service Center Time Stamp string.
1114  *
1115  * Output parameter is updated with the Time Stamp string. If the Time Stamp string exceeds the
1116  * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until
1117  * 'len-1' characters and a null-character is implicitly appended at the end of 'timestamp'.
1118  *
1119  * @return LE_NOT_PERMITTED Message is not a received message.
1120  * @return LE_OVERFLOW Timestamp number length exceed the maximum length.
1121  * @return LE_OK Function succeeded.
1122  *
1123  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1124  * function will not return.
1125  */
1126 //--------------------------------------------------------------------------------------------------
1127 LE_SHARED le_result_t ifgen_le_sms_GetTimeStamp
1128 (
1129  le_msg_SessionRef_t _ifgen_sessionRef,
1130  le_sms_MsgRef_t msgRef,
1131  ///< [IN] Reference to the message object.
1132  char* timestamp,
1133  ///< [OUT] Message time stamp (in text mode).
1134  ///< string format: "yy/MM/dd,hh:mm:ss+/-zz"
1135  ///< (Year/Month/Day,Hour:Min:Seconds+/-TimeZone)
1136  ///< The time zone indicates the difference, expressed
1137  ///< in quarters of an hours between the local time
1138  ///< and GMT.
1139  size_t timestampSize
1140  ///< [IN]
1141 );
1142 
1143 //--------------------------------------------------------------------------------------------------
1144 /**
1145  * Get the message Length value.
1146  *
1147  * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for
1148  * raw binary messages.
1149  *
1150  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1151  * function will not return.
1152  */
1153 //--------------------------------------------------------------------------------------------------
1154 LE_SHARED size_t ifgen_le_sms_GetUserdataLen
1155 (
1156  le_msg_SessionRef_t _ifgen_sessionRef,
1157  le_sms_MsgRef_t msgRef
1158  ///< [IN] Reference to the message object.
1159 );
1160 
1161 //--------------------------------------------------------------------------------------------------
1162 /**
1163  * Get the text Message.
1164  *
1165  * Output parameter is updated with the text string encoded in ASCII format. If the text string
1166  * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled
1167  * until 'len-1' characters and a null-character is implicitly appended at the end of 'text'.
1168  *
1169  * @return LE_OVERFLOW Message length exceed the maximum length.
1170  * @return LE_OK Function succeeded.
1171  *
1172  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1173  * function will not return.
1174  */
1175 //--------------------------------------------------------------------------------------------------
1176 LE_SHARED le_result_t ifgen_le_sms_GetText
1177 (
1178  le_msg_SessionRef_t _ifgen_sessionRef,
1179  le_sms_MsgRef_t msgRef,
1180  ///< [IN] Reference to the message object.
1181  char* text,
1182  ///< [OUT] SMS text.
1183  size_t textSize
1184  ///< [IN]
1185 );
1186 
1187 //--------------------------------------------------------------------------------------------------
1188 /**
1189  * Get the binary Message.
1190  *
1191  * Output parameters are updated with the binary message content and the length of the raw
1192  * binary message in bytes. If the binary data exceed the value of 'len' input parameter, a
1193  * LE_OVERFLOW error code is returned and 'raw' is filled until 'len' bytes.
1194  *
1195  * @return LE_FORMAT_ERROR Message is not in binary format
1196  * @return LE_OVERFLOW Message length exceed the maximum length.
1197  * @return LE_OK Function succeeded.
1198  *
1199  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1200  * function will not return.
1201  */
1202 //--------------------------------------------------------------------------------------------------
1203 LE_SHARED le_result_t ifgen_le_sms_GetBinary
1204 (
1205  le_msg_SessionRef_t _ifgen_sessionRef,
1206  le_sms_MsgRef_t msgRef,
1207  ///< [IN] Reference to the message object.
1208  uint8_t* binPtr,
1209  ///< [OUT] Binary message.
1210  size_t* binSizePtr
1211  ///< [INOUT]
1212 );
1213 
1214 //--------------------------------------------------------------------------------------------------
1215 /**
1216  * Get the UCS2 Message (16-bit format).
1217  *
1218  * Output parameters are updated with the UCS2 message content and the number of characters. If
1219  * the UCS2 data exceed the value of the length input parameter, a LE_OVERFLOW error
1220  * code is returned and 'ucs2Ptr' is filled until of the number of chars specified.
1221  *
1222  * @return
1223  * - LE_FORMAT_ERROR Message is not in binary format
1224  * - LE_OVERFLOW Message length exceed the maximum length.
1225  * - LE_OK Function succeeded.
1226  *
1227  */
1228 //--------------------------------------------------------------------------------------------------
1229 LE_SHARED le_result_t ifgen_le_sms_GetUCS2
1230 (
1231  le_msg_SessionRef_t _ifgen_sessionRef,
1232  le_sms_MsgRef_t msgRef,
1233  ///< [IN] Reference to the message object.
1234  uint16_t* ucs2Ptr,
1235  ///< [OUT] UCS2 message.
1236  size_t* ucs2SizePtr
1237  ///< [INOUT]
1238 );
1239 
1240 //--------------------------------------------------------------------------------------------------
1241 /**
1242  * Get the PDU message.
1243  *
1244  * Output parameters are updated with the PDU message content and the length of the PDU message
1245  * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is
1246  * returned and 'pdu' is filled until 'len' bytes.
1247  *
1248  * @return LE_FORMAT_ERROR Unable to encode the message in PDU (only for outgoing messages).
1249  * @return LE_OVERFLOW Message length exceed the maximum length.
1250  * @return LE_OK Function succeeded.
1251  *
1252  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1253  * function will not return.
1254  */
1255 //--------------------------------------------------------------------------------------------------
1256 LE_SHARED le_result_t ifgen_le_sms_GetPDU
1257 (
1258  le_msg_SessionRef_t _ifgen_sessionRef,
1259  le_sms_MsgRef_t msgRef,
1260  ///< [IN] Reference to the message object.
1261  uint8_t* pduPtr,
1262  ///< [OUT] PDU message.
1263  size_t* pduSizePtr
1264  ///< [INOUT]
1265 );
1266 
1267 //--------------------------------------------------------------------------------------------------
1268 /**
1269  * Get the message Length value.
1270  *
1271  * @return Length of the data in bytes of the PDU message.
1272  *
1273  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1274  * function will not return.
1275  */
1276 //--------------------------------------------------------------------------------------------------
1277 LE_SHARED size_t ifgen_le_sms_GetPDULen
1278 (
1279  le_msg_SessionRef_t _ifgen_sessionRef,
1280  le_sms_MsgRef_t msgRef
1281  ///< [IN] Reference to the message object.
1282 );
1283 
1284 //--------------------------------------------------------------------------------------------------
1285 /**
1286  * Delete an SMS message from the storage area.
1287  *
1288  * Verifies first if the parameter is valid, then it checks the modem state can support
1289  * message deleting.
1290  *
1291  * @return LE_FAULT Function failed to perform the deletion.
1292  * @return LE_NO_MEMORY The message is not present in storage area.
1293  * @return LE_OK Function succeeded.
1294  *
1295  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1296  * function will not return.
1297  */
1298 //--------------------------------------------------------------------------------------------------
1299 LE_SHARED le_result_t ifgen_le_sms_DeleteFromStorage
1300 (
1301  le_msg_SessionRef_t _ifgen_sessionRef,
1302  le_sms_MsgRef_t msgRef
1303  ///< [IN] Reference to the message object.
1304 );
1305 
1306 //--------------------------------------------------------------------------------------------------
1307 /**
1308  * Create an object's reference of the list of received messages
1309  * saved in the SMS message storage area.
1310  *
1311  * @return
1312  * Reference to the List object. Null pointer if no messages have been retrieved.
1313  */
1314 //--------------------------------------------------------------------------------------------------
1315 LE_SHARED le_sms_MsgListRef_t ifgen_le_sms_CreateRxMsgList
1316 (
1317  le_msg_SessionRef_t _ifgen_sessionRef
1318 );
1319 
1320 //--------------------------------------------------------------------------------------------------
1321 /**
1322  * Delete the list of the Messages retrieved from the message
1323  * storage.
1324  *
1325  * @note
1326  * On failure, the process exits, so you don't have to worry about checking the returned
1327  * reference for validity.
1328  */
1329 //--------------------------------------------------------------------------------------------------
1330 LE_SHARED void ifgen_le_sms_DeleteList
1331 (
1332  le_msg_SessionRef_t _ifgen_sessionRef,
1333  le_sms_MsgListRef_t msgListRef
1334  ///< [IN] Messages list.
1335 );
1336 
1337 //--------------------------------------------------------------------------------------------------
1338 /**
1339  * Get the first Message object reference in the list of messages
1340  * retrieved with le_sms_CreateRxMsgList().
1341  *
1342  * @return NULL No message found.
1343  * @return Msg Message object reference.
1344  *
1345  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1346  * function will not return.
1347  */
1348 //--------------------------------------------------------------------------------------------------
1349 LE_SHARED le_sms_MsgRef_t ifgen_le_sms_GetFirst
1350 (
1351  le_msg_SessionRef_t _ifgen_sessionRef,
1352  le_sms_MsgListRef_t msgListRef
1353  ///< [IN] Messages list.
1354 );
1355 
1356 //--------------------------------------------------------------------------------------------------
1357 /**
1358  * Get the next Message object reference in the list of messages
1359  * retrieved with le_sms_CreateRxMsgList().
1360  *
1361  * @return NULL No message found.
1362  * @return Msg Message object reference.
1363  *
1364  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1365  * function will not return.
1366  */
1367 //--------------------------------------------------------------------------------------------------
1368 LE_SHARED le_sms_MsgRef_t ifgen_le_sms_GetNext
1369 (
1370  le_msg_SessionRef_t _ifgen_sessionRef,
1371  le_sms_MsgListRef_t msgListRef
1372  ///< [IN] Messages list.
1373 );
1374 
1375 //--------------------------------------------------------------------------------------------------
1376 /**
1377  * Read the Message status (Received Read, Received Unread, Stored
1378  * Sent, Stored Unsent).
1379  *
1380  * @return Status of the message.
1381  *
1382  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1383  * function will not return.
1384  */
1385 //--------------------------------------------------------------------------------------------------
1386 LE_SHARED le_sms_Status_t ifgen_le_sms_GetStatus
1387 (
1388  le_msg_SessionRef_t _ifgen_sessionRef,
1389  le_sms_MsgRef_t msgRef
1390  ///< [IN] Messages list.
1391 );
1392 
1393 //--------------------------------------------------------------------------------------------------
1394 /**
1395  * Mark a message as 'read'.
1396  *
1397  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1398  * function will not return.
1399  */
1400 //--------------------------------------------------------------------------------------------------
1401 LE_SHARED void ifgen_le_sms_MarkRead
1402 (
1403  le_msg_SessionRef_t _ifgen_sessionRef,
1404  le_sms_MsgRef_t msgRef
1405  ///< [IN] Messages list.
1406 );
1407 
1408 //--------------------------------------------------------------------------------------------------
1409 /**
1410  * Mark a message as 'unread'.
1411  *
1412  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1413  * function will not return.
1414  */
1415 //--------------------------------------------------------------------------------------------------
1416 LE_SHARED void ifgen_le_sms_MarkUnread
1417 (
1418  le_msg_SessionRef_t _ifgen_sessionRef,
1419  le_sms_MsgRef_t msgRef
1420  ///< [IN] Messages list.
1421 );
1422 
1423 //--------------------------------------------------------------------------------------------------
1424 /**
1425  * Get the SMS center address.
1426  *
1427  * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds
1428  * the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until
1429  * 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
1430  *
1431  * @return
1432  * - LE_FAULT Service is not available.
1433  * - LE_OVERFLOW Telephone number length exceed the maximum length.
1434  * - LE_OK Function succeeded.
1435  *
1436  */
1437 //--------------------------------------------------------------------------------------------------
1438 LE_SHARED le_result_t ifgen_le_sms_GetSmsCenterAddress
1439 (
1440  le_msg_SessionRef_t _ifgen_sessionRef,
1441  char* tel,
1442  ///< [OUT] SMS center address number string.
1443  size_t telSize
1444  ///< [IN]
1445 );
1446 
1447 //--------------------------------------------------------------------------------------------------
1448 /**
1449  * Set the SMS center address.
1450  *
1451  * SMS center address number is defined in ITU-T recommendations E.164/E.163.
1452  * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
1453  *
1454  * @return
1455  * - LE_FAULT Service is not available..
1456  * - LE_OK Function succeeded.
1457  *
1458  * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it
1459  * is a fatal error, the function will not return.
1460  */
1461 //--------------------------------------------------------------------------------------------------
1462 LE_SHARED le_result_t ifgen_le_sms_SetSmsCenterAddress
1463 (
1464  le_msg_SessionRef_t _ifgen_sessionRef,
1465  const char* LE_NONNULL tel
1466  ///< [IN] SMS center address number string.
1467 );
1468 
1469 //--------------------------------------------------------------------------------------------------
1470 /**
1471  * Set the preferred SMS storage for incoming messages.
1472  * @return
1473  * - LE_FAULT Function failed.
1474  * - LE_OK Function succeeded.
1475  */
1476 //--------------------------------------------------------------------------------------------------
1477 LE_SHARED le_result_t ifgen_le_sms_SetPreferredStorage
1478 (
1479  le_msg_SessionRef_t _ifgen_sessionRef,
1480  le_sms_Storage_t prefStorage
1481  ///< [IN] storage parameter.
1482 );
1483 
1484 //--------------------------------------------------------------------------------------------------
1485 /**
1486  * Get the preferred SMS storage for incoming messages.
1487  * @return
1488  * - LE_FAULT Function failed.
1489  * - LE_OK Function succeeded.
1490  */
1491 //--------------------------------------------------------------------------------------------------
1492 LE_SHARED le_result_t ifgen_le_sms_GetPreferredStorage
1493 (
1494  le_msg_SessionRef_t _ifgen_sessionRef,
1495  le_sms_Storage_t* prefStoragePtr
1496  ///< [OUT] storage parameter.
1497 );
1498 
1499 //--------------------------------------------------------------------------------------------------
1500 /**
1501  * Activate Cell Broadcast message notification
1502  *
1503  * @return
1504  * - LE_FAULT Function failed.
1505  * - LE_OK Function succeeded.
1506  */
1507 //--------------------------------------------------------------------------------------------------
1508 LE_SHARED le_result_t ifgen_le_sms_ActivateCellBroadcast
1509 (
1510  le_msg_SessionRef_t _ifgen_sessionRef
1511 );
1512 
1513 //--------------------------------------------------------------------------------------------------
1514 /**
1515  * Deactivate Cell Broadcast message notification
1516  *
1517  * @return
1518  * - LE_FAULT Function failed.
1519  * - LE_OK Function succeeded.
1520  */
1521 //--------------------------------------------------------------------------------------------------
1522 LE_SHARED le_result_t ifgen_le_sms_DeactivateCellBroadcast
1523 (
1524  le_msg_SessionRef_t _ifgen_sessionRef
1525 );
1526 
1527 //--------------------------------------------------------------------------------------------------
1528 /**
1529  * Activate CDMA Cell Broadcast message notification
1530  *
1531  * @return
1532  * - LE_FAULT Function failed.
1533  * - LE_OK Function succeeded.
1534  */
1535 //--------------------------------------------------------------------------------------------------
1536 LE_SHARED le_result_t ifgen_le_sms_ActivateCdmaCellBroadcast
1537 (
1538  le_msg_SessionRef_t _ifgen_sessionRef
1539 );
1540 
1541 //--------------------------------------------------------------------------------------------------
1542 /**
1543  * Deactivate CDMA Cell Broadcast message notification
1544  *
1545  * @return
1546  * - LE_FAULT Function failed.
1547  * - LE_OK Function succeeded.
1548  */
1549 //--------------------------------------------------------------------------------------------------
1550 LE_SHARED le_result_t ifgen_le_sms_DeactivateCdmaCellBroadcast
1551 (
1552  le_msg_SessionRef_t _ifgen_sessionRef
1553 );
1554 
1555 //--------------------------------------------------------------------------------------------------
1556 /**
1557  * Add Cell Broadcast message Identifiers range.
1558  *
1559  * @return
1560  * - LE_FAULT Function failed.
1561  * - LE_OK Function succeeded.
1562  */
1563 //--------------------------------------------------------------------------------------------------
1564 LE_SHARED le_result_t ifgen_le_sms_AddCellBroadcastIds
1565 (
1566  le_msg_SessionRef_t _ifgen_sessionRef,
1567  uint16_t fromId,
1568  ///< [IN] Starting point of the range of cell broadcast message identifier.
1569  uint16_t toId
1570  ///< [IN] Ending point of the range of cell broadcast message identifier.
1571 );
1572 
1573 //--------------------------------------------------------------------------------------------------
1574 /**
1575  * Remove Cell Broadcast message Identifiers range.
1576  *
1577  * @return
1578  * - LE_FAULT Function failed.
1579  * - LE_OK Function succeeded.
1580  */
1581 //--------------------------------------------------------------------------------------------------
1582 LE_SHARED le_result_t ifgen_le_sms_RemoveCellBroadcastIds
1583 (
1584  le_msg_SessionRef_t _ifgen_sessionRef,
1585  uint16_t fromId,
1586  ///< [IN] Starting point of the range of cell broadcast message identifier.
1587  uint16_t toId
1588  ///< [IN] Ending point of the range of cell broadcast message identifier.
1589 );
1590 
1591 //--------------------------------------------------------------------------------------------------
1592 /**
1593  * Clear Cell Broadcast message Identifiers.
1594  *
1595  * @return
1596  * - LE_FAULT Function failed.
1597  * - LE_OK Function succeeded.
1598  */
1599 //--------------------------------------------------------------------------------------------------
1600 LE_SHARED le_result_t ifgen_le_sms_ClearCellBroadcastIds
1601 (
1602  le_msg_SessionRef_t _ifgen_sessionRef
1603 );
1604 
1605 //--------------------------------------------------------------------------------------------------
1606 /**
1607  * Add CDMA Cell Broadcast category services.
1608  *
1609  * @return
1610  * - LE_FAULT Function failed.
1611  * - LE_BAD_PARAMETER Parameter is invalid.
1612  * - LE_OK Function succeeded.
1613  */
1614 //--------------------------------------------------------------------------------------------------
1615 LE_SHARED le_result_t ifgen_le_sms_AddCdmaCellBroadcastServices
1616 (
1617  le_msg_SessionRef_t _ifgen_sessionRef,
1618  le_sms_CdmaServiceCat_t serviceCat,
1619  ///< [IN] Service category assignment. Reference to 3GPP2 C.R1001-D
1620  ///< v1.0 Section 9.3.1 Standard Service Category Assignments.
1621  le_sms_Languages_t language
1622  ///< [IN] Language Indicator. Reference to
1623  ///< 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator
1624  ///< Value Assignments
1625 );
1626 
1627 //--------------------------------------------------------------------------------------------------
1628 /**
1629  * Remove CDMA Cell Broadcast category services.
1630  *
1631  * @return
1632  * - LE_FAULT Function failed.
1633  * - LE_BAD_PARAMETER Parameter is invalid.
1634  * - LE_OK Function succeeded.
1635  */
1636 //--------------------------------------------------------------------------------------------------
1637 LE_SHARED le_result_t ifgen_le_sms_RemoveCdmaCellBroadcastServices
1638 (
1639  le_msg_SessionRef_t _ifgen_sessionRef,
1640  le_sms_CdmaServiceCat_t serviceCat,
1641  ///< [IN] Service category assignment. Reference to 3GPP2 C.R1001-D
1642  ///< v1.0 Section 9.3.1 Standard Service Category Assignments.
1643  le_sms_Languages_t language
1644  ///< [IN] Language Indicator. Reference to
1645  ///< 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator
1646  ///< Value Assignments
1647 );
1648 
1649 //--------------------------------------------------------------------------------------------------
1650 /**
1651  * Clear CDMA Cell Broadcast category services.
1652  *
1653  * @return
1654  * - LE_FAULT Function failed.
1655  * - LE_OK Function succeeded.
1656  */
1657 //--------------------------------------------------------------------------------------------------
1658 LE_SHARED le_result_t ifgen_le_sms_ClearCdmaCellBroadcastServices
1659 (
1660  le_msg_SessionRef_t _ifgen_sessionRef
1661 );
1662 
1663 //--------------------------------------------------------------------------------------------------
1664 /**
1665  * Get the number of messages successfully received or sent since last counter reset.
1666  *
1667  * @return
1668  * - LE_OK Function succeeded.
1669  * - LE_BAD_PARAMETER A parameter is invalid.
1670  *
1671  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1672  * function will not return.
1673  */
1674 //--------------------------------------------------------------------------------------------------
1675 LE_SHARED le_result_t ifgen_le_sms_GetCount
1676 (
1677  le_msg_SessionRef_t _ifgen_sessionRef,
1678  le_sms_Type_t messageType,
1679  ///< [IN] Message type
1680  int32_t* messageCountPtr
1681  ///< [OUT] Number of messages
1682 );
1683 
1684 //--------------------------------------------------------------------------------------------------
1685 /**
1686  * Start to count the messages successfully received and sent.
1687  */
1688 //--------------------------------------------------------------------------------------------------
1689 LE_SHARED void ifgen_le_sms_StartCount
1690 (
1691  le_msg_SessionRef_t _ifgen_sessionRef
1692 );
1693 
1694 //--------------------------------------------------------------------------------------------------
1695 /**
1696  * Stop to count the messages successfully received and sent.
1697  */
1698 //--------------------------------------------------------------------------------------------------
1699 LE_SHARED void ifgen_le_sms_StopCount
1700 (
1701  le_msg_SessionRef_t _ifgen_sessionRef
1702 );
1703 
1704 //--------------------------------------------------------------------------------------------------
1705 /**
1706  * Reset the count of messages successfully received and sent.
1707  */
1708 //--------------------------------------------------------------------------------------------------
1709 LE_SHARED void ifgen_le_sms_ResetCount
1710 (
1711  le_msg_SessionRef_t _ifgen_sessionRef
1712 );
1713 
1714 //--------------------------------------------------------------------------------------------------
1715 /**
1716  * Enable SMS Status Report for outgoing messages.
1717  *
1718  * @return
1719  * - LE_OK Function succeeded.
1720  * - LE_FAULT Function failed.
1721  */
1722 //--------------------------------------------------------------------------------------------------
1723 LE_SHARED le_result_t ifgen_le_sms_EnableStatusReport
1724 (
1725  le_msg_SessionRef_t _ifgen_sessionRef
1726 );
1727 
1728 //--------------------------------------------------------------------------------------------------
1729 /**
1730  * Disable SMS Status Report for outgoing messages.
1731  *
1732  * @return
1733  * - LE_OK Function succeeded.
1734  * - LE_FAULT Function failed.
1735  */
1736 //--------------------------------------------------------------------------------------------------
1737 LE_SHARED le_result_t ifgen_le_sms_DisableStatusReport
1738 (
1739  le_msg_SessionRef_t _ifgen_sessionRef
1740 );
1741 
1742 //--------------------------------------------------------------------------------------------------
1743 /**
1744  * Get SMS Status Report activation state.
1745  *
1746  * @return
1747  * - LE_OK Function succeeded.
1748  * - LE_BAD_PARAMETER Parameter is invalid.
1749  * - LE_FAULT Function failed.
1750  */
1751 //--------------------------------------------------------------------------------------------------
1752 LE_SHARED le_result_t ifgen_le_sms_IsStatusReportEnabled
1753 (
1754  le_msg_SessionRef_t _ifgen_sessionRef,
1755  bool* enabledPtr
1756  ///< [OUT] True when SMS Status Report is enabled, false otherwise.
1757 );
1758 
1759 //--------------------------------------------------------------------------------------------------
1760 /**
1761  * Get TP-Message-Reference of a message. Message type should be either a SMS Status Report or an
1762  * outgoing SMS.
1763  * TP-Message-Reference is defined in 3GPP TS 23.040 section 9.2.3.6.
1764  *
1765  * @return
1766  * - LE_OK Function succeeded.
1767  * - LE_BAD_PARAMETER Parameter is invalid.
1768  * - LE_FAULT Function failed.
1769  * - LE_UNAVAILABLE Outgoing SMS message is not sent.
1770  */
1771 //--------------------------------------------------------------------------------------------------
1772 LE_SHARED le_result_t ifgen_le_sms_GetTpMr
1773 (
1774  le_msg_SessionRef_t _ifgen_sessionRef,
1775  le_sms_MsgRef_t msgRef,
1776  ///< [IN] Reference to the message object.
1777  uint8_t* tpMrPtr
1778  ///< [OUT] 3GPP TS 23.040 TP-Message-Reference.
1779 );
1780 
1781 //--------------------------------------------------------------------------------------------------
1782 /**
1783  * Get TP-Recipient-Address of SMS Status Report.
1784  * TP-Recipient-Address is defined in 3GPP TS 23.040 section 9.2.3.14.
1785  * TP-Recipient-Address Type-of-Address is defined in 3GPP TS 24.011 section 8.2.5.2.
1786  *
1787  * @return
1788  * - LE_OK Function succeeded.
1789  * - LE_BAD_PARAMETER A parameter is invalid.
1790  * - LE_OVERFLOW The Recipient Address length exceeds the length of the provided buffer.
1791  * - LE_FAULT Function failed.
1792  */
1793 //--------------------------------------------------------------------------------------------------
1794 LE_SHARED le_result_t ifgen_le_sms_GetTpRa
1795 (
1796  le_msg_SessionRef_t _ifgen_sessionRef,
1797  le_sms_MsgRef_t msgRef,
1798  ///< [IN] Reference to the message object.
1799  uint8_t* toraPtr,
1800  ///< [OUT] 3GPP TS 24.011 TP-Recipient-Address
1801  ///< Type-of-Address.
1802  char* ra,
1803  ///< [OUT] 3GPP TS 23.040 TP-Recipient-Address.
1804  size_t raSize
1805  ///< [IN]
1806 );
1807 
1808 //--------------------------------------------------------------------------------------------------
1809 /**
1810  * Get TP-Service-Centre-Time-Stamp of SMS Status Report.
1811  * TP-Service-Centre-Time-Stamp is defined in 3GPP TS 23.040 section 9.2.3.11.
1812  *
1813  * @return
1814  * - LE_OK Function succeeded.
1815  * - LE_BAD_PARAMETER A parameter is invalid.
1816  * - LE_OVERFLOW The SC Timestamp length exceeds the length of the provided buffer.
1817  * - LE_FAULT Function failed.
1818  */
1819 //--------------------------------------------------------------------------------------------------
1820 LE_SHARED le_result_t ifgen_le_sms_GetTpScTs
1821 (
1822  le_msg_SessionRef_t _ifgen_sessionRef,
1823  le_sms_MsgRef_t msgRef,
1824  ///< [IN] Reference to the message object.
1825  char* scts,
1826  ///< [OUT] 3GPP TS 23.040 TP-Service-Centre-Time-Stamp.
1827  size_t sctsSize
1828  ///< [IN]
1829 );
1830 
1831 //--------------------------------------------------------------------------------------------------
1832 /**
1833  * Get TP-Discharge-Time of SMS Status Report.
1834  * TP-Discharge-Time is defined in 3GPP TS 23.040 section 9.2.3.13.
1835  *
1836  * @return
1837  * - LE_OK Function succeeded.
1838  * - LE_BAD_PARAMETER A parameter is invalid.
1839  * - LE_OVERFLOW The Discharge Time length exceeds the length of the provided buffer.
1840  * - LE_FAULT Function failed.
1841  */
1842 //--------------------------------------------------------------------------------------------------
1843 LE_SHARED le_result_t ifgen_le_sms_GetTpDt
1844 (
1845  le_msg_SessionRef_t _ifgen_sessionRef,
1846  le_sms_MsgRef_t msgRef,
1847  ///< [IN] Reference to the message object.
1848  char* dt,
1849  ///< [OUT] 3GPP TS 23.040 TP-Discharge-Time.
1850  size_t dtSize
1851  ///< [IN]
1852 );
1853 
1854 //--------------------------------------------------------------------------------------------------
1855 /**
1856  * Get TP-Status of SMS Status Report.
1857  * TP-Status is defined in 3GPP TS 23.040 section 9.2.3.15.
1858  *
1859  * @return
1860  * - LE_OK Function succeeded.
1861  * - LE_BAD_PARAMETER A parameter is invalid.
1862  * - LE_FAULT Function failed.
1863  */
1864 //--------------------------------------------------------------------------------------------------
1865 LE_SHARED le_result_t ifgen_le_sms_GetTpSt
1866 (
1867  le_msg_SessionRef_t _ifgen_sessionRef,
1868  le_sms_MsgRef_t msgRef,
1869  ///< [IN] Reference to the message object.
1870  uint8_t* stPtr
1871  ///< [OUT] 3GPP TS 23.040 TP-Status.
1872 );
1873 /** @} **/
1874 #endif // LE_SMS_COMMON_H_INCLUDE_GUARD
Area Traffic Reports.
Definition: le_sms_common.h:246
Error in MS.
Definition: le_sms_common.h:491
Entertainment News National.
Definition: le_sms_common.h:240
Message present in the message storage has been read.
Definition: le_sms_common.h:144
Message saved in the message storage has been sent.
Definition: le_sms_common.h:148
Business News International.
Definition: le_sms_common.h:226
Undefined storage.
Definition: le_sms_common.h:287
TPDU not supported.
Definition: le_sms_common.h:469
Employment Opportunities.
Definition: le_sms_common.h:260
A terminal problem other than described above.
Definition: le_sms_common.h:339
Message has been in the sending pool.
Definition: le_sms_common.h:154
#define LE_SHARED
Definition: le_basics.h:300
Message sending has Failed due to timeout.
Definition: le_sms_common.h:160
Unspecified TP-Command error.
Definition: le_sms_common.h:467
General News Regional.
Definition: le_sms_common.h:214
SC busy.
Definition: le_sms_common.h:471
Definition: le_sms_common.h:305
Definition: le_sms_common.h:364
le_result_t
Definition: le_basics.h:46
Business News National.
Definition: le_sms_common.h:224
Interworking, unspecified.
Definition: le_sms_common.h:446
Definition: le_sms_common.h:320
(U)SIM data download error
Definition: le_sms_common.h:497
Definition: le_sms_common.h:350
Card Application Toolkit Protocol Teleservice.
Definition: le_sms_common.h:268
Undefined reason.
Definition: le_sms_common.h:384
Sim SMS storage.
Definition: le_sms_common.h:285
Multicategory.
Definition: le_sms_common.h:266
Medical/Health/Hospitals.
Definition: le_sms_common.h:262
Protocol error, unspecified.
Definition: le_sms_common.h:444
le_sms_Status_t
Definition: le_sms_common.h:142
(U)SIM SMS storage full
Definition: le_sms_common.h:487
Resources facility not subscribed.
Definition: le_sms_common.h:425
Definition: le_sms_common.h:325
Definition: le_sms_common.h:336
Unspecified TP-PID error.
Definition: le_sms_common.h:454
SMS mobile originated message.
Definition: le_sms_common.h:127
Korean language.
Definition: le_sms_common.h:185
No SMS storage capability in (U)SIM.
Definition: le_sms_common.h:489
struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_t
Definition: le_sms_common.h:530
Definition: le_sms_common.h:333
Command unsupported.
Definition: le_sms_common.h:465
Definition: le_sms_common.h:341
Definition: le_sms_common.h:328
Unspecified error cause.
Definition: le_sms_common.h:499
Command cannot be actioned.
Definition: le_sms_common.h:463
Definition: le_sms_common.h:344
SM Rejected-Duplicate SM.
Definition: le_sms_common.h:481
Sementically incorect message.
Definition: le_sms_common.h:432
Call barred.
Definition: le_sms_common.h:401
A network problem other than identified above.
Definition: le_sms_common.h:315
TP-VPF not supported.
Definition: le_sms_common.h:483
Definition: le_sms_common.h:358
struct le_sms_Msg * le_sms_MsgRef_t
Definition: le_sms_common.h:514
Definition: le_sms_common.h:456
Sports News International.
Definition: le_sms_common.h:234
Message present in the message storage has not been read.
Definition: le_sms_common.h:146
Resources facility not implemented.
Definition: le_sms_common.h:427
Platform specific code.
Definition: le_sms_common.h:382
Reserved.
Definition: le_sms_common.h:403
Definition: le_sms_common.h:317
Definition: le_sms_common.h:367
Destination SME barred.
Definition: le_sms_common.h:479
English language.
Definition: le_sms_common.h:177
Short Message Type 0 not supported.
Definition: le_sms_common.h:450
Entertainment News Regional.
Definition: le_sms_common.h:238
Sports News Local.
Definition: le_sms_common.h:228
Definition: le_sms_common.h:361
Unknown message status.
Definition: le_sms_common.h:162
Resources unavailable, unspecified.
Definition: le_sms_common.h:423
Undefined reason.
Definition: le_sms_common.h:503
Network out of order.
Definition: le_sms_common.h:417
le_sms_ErrorCode3GPP2_t
Definition: le_sms_common.h:298
Unassigned (unallocated) number.
Definition: le_sms_common.h:397
Non volatile memory storage.
Definition: le_sms_common.h:283
Memory capacity exceeded.
Definition: le_sms_common.h:493
Message has been sent.
Definition: le_sms_common.h:152
Memory capacity exceeded.
Definition: le_sms_common.h:407
Destination out of order.
Definition: le_sms_common.h:409
Operator determined barring.
Definition: le_sms_common.h:399
Invalid mandatory information.
Definition: le_sms_common.h:434
SMS mobile terminated message.
Definition: le_sms_common.h:125
Definition: le_sms_common.h:376
Japanese language.
Definition: le_sms_common.h:183
SMS Cell Broadcast message.
Definition: le_sms_common.h:129
Text message format.
Definition: le_sms_common.h:106
SC system failure.
Definition: le_sms_common.h:475
Business News Regional.
Definition: le_sms_common.h:222
PDU message format.
Definition: le_sms_common.h:104
TP-VP not supporte.
Definition: le_sms_common.h:485
Telematic interworking not supported.
Definition: le_sms_common.h:448
Technology News.
Definition: le_sms_common.h:264
le_sms_Storage_t
Definition: le_sms_common.h:281
Platform specific code.
Definition: le_sms_common.h:501
Unknown subscriber.
Definition: le_sms_common.h:415
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860
Unknown message format.
Definition: le_sms_common.h:112
The originating MIN is not recognized.
Definition: le_sms_common.h:353
Short message transfer rejected.
Definition: le_sms_common.h:405
Retail Directory.
Definition: le_sms_common.h:254
Unknow or Unspecified language.
Definition: le_sms_common.h:175
UCS2 message format.
Definition: le_sms_common.h:110
Delivery is not currently possible.
Definition: le_sms_common.h:331
Other general problems.
Definition: le_sms_common.h:380
le_sms_Type_t
Definition: le_sms_common.h:123
Definition: le_sms_common.h:373
The SMS Destination Address is invalid.
Definition: le_sms_common.h:303
Chinese language.
Definition: le_sms_common.h:187
Local weather.
Definition: le_sms_common.h:244
SMS Status Report.
Definition: le_sms_common.h:131
Cannot replace short message.
Definition: le_sms_common.h:452
Lodgings.
Definition: le_sms_common.h:252
Unknown or Unspecified.
Definition: le_sms_common.h:204
Entertainment News Local.
Definition: le_sms_common.h:236
Definition: le_sms_common.h:370
Definition: le_sms_common.h:300
void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)
Definition: le_sms_common.h:563
Invalid SME address.
Definition: le_sms_common.h:477
Congestion.
Definition: le_sms_common.h:421
struct le_sms_MsgList * le_sms_MsgListRef_t
Definition: le_sms_common.h:522
Message has not been sent.
Definition: le_sms_common.h:156
Message class not supported.
Definition: le_sms_common.h:459
Message sending has Failed.
Definition: le_sms_common.h:158
le_sms_ErrorCode_t
Definition: le_sms_common.h:395
Administrative.
Definition: le_sms_common.h:208
Maintenance.
Definition: le_sms_common.h:210
Message type nonexistent or not implemented.
Definition: le_sms_common.h:436
Definition: le_sms_common.h:347
void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)
Definition: le_sms_common.h:577
Advertisements.
Definition: le_sms_common.h:256
Spanish language.
Definition: le_sms_common.h:181
Sports News National.
Definition: le_sms_common.h:232
No SC subscription.
Definition: le_sms_common.h:473
le_sms_Format_t
Definition: le_sms_common.h:102
Entertainment News International.
Definition: le_sms_common.h:242
Emergency Broadcast.
Definition: le_sms_common.h:206
Temporary failure.
Definition: le_sms_common.h:419
Hebrew language.
Definition: le_sms_common.h:189
Unidentified subscriber.
Definition: le_sms_common.h:411
Facility rejected.
Definition: le_sms_common.h:413
Sports News Regional.
Definition: le_sms_common.h:230
Stock Quotes.
Definition: le_sms_common.h:258
Binary message format.
Definition: le_sms_common.h:108
General News National.
Definition: le_sms_common.h:216
(U)SIM Application Toolkit busy
Definition: le_sms_common.h:495
Unspecified TP-DCS error.
Definition: le_sms_common.h:461
Business News Local.
Definition: le_sms_common.h:220
Definition: le_sms_common.h:441
Message saved in the message storage has not been sent.
Definition: le_sms_common.h:150
void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)
Definition: le_sms_common.h:547
Restaurants.
Definition: le_sms_common.h:250
Local Airplane Flight Schedules.
Definition: le_sms_common.h:248
French language.
Definition: le_sms_common.h:179
General News International.
Definition: le_sms_common.h:218
Definition: le_sms_common.h:311
Definition: le_sms_common.h:308
struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_t
Definition: le_sms_common.h:538
General News Local.
Definition: le_sms_common.h:212
le_sms_CdmaServiceCat_t
Definition: le_sms_common.h:202
le_sms_Languages_t
Definition: le_sms_common.h:173
Definition: le_sms_common.h:355