le_sms_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_sms SMS
14  *
15  * @ref le_sms_interface.h "API Reference"
16  *
17  * <HR>
18  *
19  * This file contains data structures and prototypes definitions for high level SMS APIs.
20  *
21  * SMS is a common way to communicate in the M2M world.
22  *
23  * It's an easy, fast way to send a small amount of data (e.g., sensor values for gas telemetry).
24  * Usually, the radio module requests small power resources to send or receive a message.
25  * It's often a good way to wake-up a device that was disconnected from the network or that was
26  * operating in low power mode.
27  *
28  * @section le_sms_binding IPC interfaces binding
29  *
30  * All the functions of this API are provided by the @b modemService.
31  *
32  * Here's a code sample binding to modem services:
33  * @verbatim
34  bindings:
35  {
36  clientExe.clientComponent.le_sms -> modemService.le_sms
37  }
38  @endverbatim
39  *
40  * @section le_sms_ops_creating_msg Creating a Message object
41  * There are 3 kinds of supported messages: text messages, binary messages, and PDU messages.
42  *
43  * You must create a Message object by calling @c le_sms_Create() before using the message
44  * APIs. It automatically allocates needed resources for the Message object, which is referenced by
45  * @c le_sms_MsgRef_t type.
46  *
47  * When the Message object is no longer needed, call @c le_sms_Delete() to free all
48  * allocated resources associated with the object.
49  *
50  * @section le_sms_ops_deleting_msg Deleting a Message object
51  * To delete a Message object, call le_sms_Delete(). This frees all the
52  * resources allocated for the Message object. If several users own the Message object
53  * (e.g., several handler functions registered for SMS message reception), the
54  * Message object will be deleted only after the last user deletes the Message object.
55  *
56  * @section le_sms_ops_sending Sending a message
57  * To send a message, create an @c le_sms_MsgRef_t object by calling the
58  * @c le_sms_Create() function. Then, set all the needed parameters for the message:
59  * - Destination telephone number with le_sms_SetDestination();
60  * - Text content with le_sms_SetText(), the total length are set as well with this API, maximum
61  * 160 characters as only the 7-bit alphabet is supported.
62  * - Binary content with le_sms_SetBinary(), total length is set with this API, maximum 140 bytes.
63  * - PDU content with le_sms_SetPDU(), total length is set with this API, max 36 (header) + 140
64  * (payload) bytes long.
65  * - UCS2 content (16-bit format) with le_sms_SetUCS2(), total length is set with this API, maximum
66  * 70 characters (140 bytes).
67  *
68  * - A specific timeout value can be used with le_sms_SetTimeout() API.
69  *
70  * After the Msg object is ready, call @c le_sms_Send().
71  *
72  * @c le_sms_Send() is a blocking function, it will return once the Modem has given back a
73  * positive or negative answer to the sending operation. The return of @c le_sms_Send() API
74  * provides definitive status of the sending operation.
75  * TP-Validity-Period(TP-VP) parameter value indicates the time period for which the short message
76  * is valid, i.e. for how long the Service Center (SC) shall guarantee its existence in the SC
77  * memory before delivery to the recipient has been carried out. The default validity period(TP-VP)
78  * is set to 7 days for MO SMS.
79  *
80  * When a message sending has failed and returned LE_FAULT, call le_sms_GetErrorCode() to retrieve
81  * the 3GPP message error code or le_sms_Get3GPP2ErrorCode() to retrieve the 3GPP2 message error
82  * code. If LE_SMS_ERROR_3GPP_PLATFORM_SPECIFIC or LE_SMS_ERROR_3GPP2_PLATFORM_SPECIFIC values is
83  * returned, call le_sms_GetPlatformSpecificErrorCode() to retrieve the platform specific error
84  * code.
85  *
86  * Please refer to @ref c_smsSampleMO page to get an example of SMS message sending.
87  *
88  * @section le_sms_ops_async_sending Sending asynchronously a message
89  *
90  * To send an asynchronous message, le_sms_SendAsync() API can be called instead of le_sms_Send()
91  * and a specific timeout value can be used with le_sms_SetTimeout() API.
92  * The default validity period(TP-VP) is set to 7 days for MO SMS.
93  *
94  * A text message can be sent with one simple function: le_sms_SendText(). You only have to pass
95  * the three following parameters:
96  * - the destination telephone number.
97  * - the text message, the total length are set as well with this function, maximum 160
98  * characters as only the 7-bit alphabet is supported.
99  * - the callback function to get a notification indicating the sending result: LE_SMS_SENT,
100  * LE_SMS_SENDING_FAILED or LE_SMS_SENDING_TIMEOUT.
101  * The default validity period(TP-VP) is set to 7 days for MO SMS.
102  *
103  * A PDU message can be sent using the le_sms_SendPdu() functions. The parameters to give are:
104  * - the PDU content, total length is set with this API, maximum 176 bytes long = 36 (header) +
105  * 140 (payload).
106  * - the callback function to get a notification indicating the sending result: LE_SMS_SENT,
107  * LE_SMS_SENDING_FAILED or LE_SMS_SENDING_TIMEOUT.
108  * The default validity period(TP-VP) is set to 7 days for MO SMS.
109  *
110  * When a message sending has failed, call le_sms_GetErrorCode() to retrieve the 3GPP message error
111  * code or le_sms_Get3GPP2ErrorCode() to retrieve the 3GPP2 message error code.
112  * If LE_SMS_ERROR_3GPP_PLATFORM_SPECIFIC or LE_SMS_ERROR_3GPP2_PLATFORM_SPECIFIC values is
113  * returned, call le_sms_GetPlatformSpecificErrorCode() to retrieve the platform specific error
114  * code.
115  *
116  * Message object is never deleted regardless of the sending result. Caller has to
117  * delete it. Message object once used for sending the message can not be reused to
118  * send another message regardless of success or failure. New object has to be created
119  * for new message.
120  *
121  * @section le_sms_ops_receiving Receiving a message
122  * To receive SMS messages, register a handler function to obtain incoming
123  * messages. Use @c le_sms_AddRxMessageHandler() to register that handler.
124  *
125  * The handler must satisfy the following prototype:
126  * @c typedef void (*le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msg).
127  *
128  * When a new incoming message is received, a Message object is automatically created and the
129  * handler is called. This Message object is Read-Only, any calls of a le_sms_SetXXX API will
130  * return a LE_NOT_PERMITTED error.
131  *
132  * Use the following APIs to retrieve message information and data from the Message
133  * object:
134  * - le_sms_GetFormat() - determine if it is a binary or a text message.
135  * - le_sms_GetSenderTel() - get the sender's Telephone number.
136  * - le_sms_GetTimeStamp() - get the timestamp sets by the Service Center.
137  * - le_sms_GetUserdataLen() - get the message content (text, binary or UCS2) length.
138  * - le_sms_GetPDULen() - get the PDU message length.
139  * - le_sms_GetText() - get the message text.
140  * - le_sms_GetUCS2() - get the UCS2 message content (16-bit format).
141  * - le_sms_GetBinary() - get the message binary content.
142  * - le_sms_GetPDU() - get the message PDU data.
143  * - le_sms_GetType() - get the message type.
144  *
145  * @note - If two (or more) registered handler functions exist, they are
146  * all called and get a different message object reference.
147  *
148  * @note - For incoming SMS, if the returned format is LE_SMS_FORMAT_PDU, the PDU length can be
149  * retrieved by calling le_sms_GetPDULen() and the content can be read by le_sms_GetPDU().
150  *
151  * If a succession of messages is received, a new Message object is created for each, and
152  * the handler is called for each new message.
153  *
154  * Uninstall the handler function by calling @c le_sms_RemoveRxMessageHandler().
155  * @note @c le_sms_RemoveRxMessageHandler() API does not delete the Message Object.
156  * The caller has to delete it.
157  *
158  * Please refer to @ref c_smsSampleMT page to get an example of SMS message reception handling.
159  *
160  * @section le_sms_ops_sms_storage Receiving a full SMS storage indication
161  * To receive a SMS full storage status, the application has to register a handler function.
162  * Use @c le_sms_AddFullStorageEventHandler() to register that handler.
163  *
164  * The handler must satisfy the following prototype:
165  * @c typedef void (*le_sms_FullStorageEventFunc_t)(le_sms_Storage_t storage).
166  *
167  * Uninstall the handler function by calling @c le_sms_RemoveFullStorageEventHandler().
168  *
169  * Please refer to @ref c_smsSampleMT page to get an example of SMS storage indication
170  * handling.
171  *
172  * @section le_sms_ops_listing Listing messages recorded in storage area
173  *
174  * Call @c le_sms_CreateRxMsgList() to create a List object that lists the received
175  * messages present in the storage area, which is referenced by @c le_sms_MsgListRef_t
176  * type.
177  *
178  * If messages are not present, the le_sms_CreateRxMsgList() returns NULL.
179  *
180  * Once the list is available, call @c le_sms_GetFirst() to get the first
181  * message from the list, and then call @c le_sms_GetNext() API to get the next message.
182  *
183  * Call @c le_sms_DeleteList() to free all allocated
184  * resources associated with the List object.
185  *
186  * Call @c le_sms_GetStatus() to read the status of a message (Received
187  * Read, Received Unread).
188  *
189  * To finish, you can also modify the received status of a message with
190  * @c le_sms_MarkRead() and @c le_sms_MarkUnread().
191  *
192  * @section le_sms_ops_deleting Deleting a message from the storage area
193  *
194  * @c le_sms_DeleteFromStorage() deletes the message from the storage area. Message is
195  * identified with @c le_sms_MsgRef_t object. The API returns an error if the deletion cannot be
196  * performed or if it is a broadcast or a non stored message.
197  *
198  * @note If several users own the Message object on new reception
199  * (e.g., several handler functions registered for SMS message reception), the
200  * Message will be deleted from the storage area only after the last user deletes
201  * the Message object reference (not necessary from storage). API returns always LE_OK in this case.
202  *
203  * @note If one client creates a list and deletes all sms from storage, other clients won’t see sms
204  * stored If they have not created a sms list too. Sms List creation locks and
205  * delays sms deletion from storage until all references have been deleted.
206  *
207  * @section le_sms_ops_broadcast SMS Cell Broadcast
208  *
209  * The Cell Broadcast service permits a number of unacknowledged general messages to be broadcast
210  * to all receivers within a particular region. Cell Broadcast messages are broadcast to defined
211  * geographical areas known as cell broadcast areas. These areas may comprise of one or more cells,
212  * or may comprise the entire PLMN.
213  *
214  * GSM or UMTS SMS cell broadcast service can be activated or deactivated with
215  * le_sms_ActivateCellBroadcast() and le_sms_DeactivateCellBroadcast() APIs.
216  *
217  * CDMA cell broadcast service can be activated or deactivated with
218  * le_sms_ActivateCdmaCellBroadcast() and le_sms_DeactivateCdmaCellBroadcast() APIs.
219  *
220  * Cell broadcast message receptions are notify by the SMS handler like a SMS message reception,
221  * but there are neither stored in SIM nor in the modem. So le_sms_DeleteFromStorage()
222  * can't be used but the message reference shall be delete with le_sms_Delete().
223  *
224  * - le_sms_GetFormat() - determine if it is a binary or a text message.
225  * - le_sms_GetUserdataLen() - get the message content (text, binary or UCS2) length.
226  * - le_sms_GetPDULen() - get the PDU message received length.
227  * - le_sms_GetText() - get the message text.
228  * - le_sms_GetBinary() - get the message binary content.
229  * - le_sms_GetUCS2() - get the UCS2 message content (16-bit format).
230  * - le_sms_GetPDU() - get the message PDU data received length.
231  * - le_sms_GetCellBroadcastId() - get the message identifier received (3GPP 23.41).
232  * - le_sms_GetCellBroadcastSerialNumber() get the message Serial Number received (3GPP 23.41).
233  *
234  * A sample code that implements a function for SMS Cell Broadcast reception can be found in
235  * \b smsCBTest.c file (please refer to @ref c_smsCbSample page).
236  *
237  * @b Serial @b Number
238  *
239  * Cell Broadcast Serial Number parameter is a 16-bit integer which identifies a particular
240  * CBS message from the source and type indicated by the Message Identifier and is altered every
241  * time the CBS message with a given Message Identifier is changed.
242  *
243  * The two bytes of the Serial Number field are divided into a 2-bit Geographical Scope (GS)
244  * indicator, a 10-bit Message Code and a 4-bit Update Number as shown below:
245  *
246  * - GS code (bit 14 and 15): The Geographical Scope (GS) indicates the geographical area over
247  * which the Message Code is unique, and the display mode.
248  *
249  * - Message Code (bit 4 to 13) : The Message Code differentiates between CBS messages from
250  * the same source and type (i.e. with the same Message Identifier). Message Codes are for
251  * allocation by PLMN operators. The Message Code identifies different message themes.
252  * For example, let the value for the Message Identifier be "Automotive Association" (= source),
253  * "Traffic Reports" (= type). Then "Crash on A1 J5" could be one value for the message code,
254  * "Cow on A32 J4" could be another, and "Slow vehicle on M3 J3" yet another.
255  *
256  * - Update Number (bit 0 to 3) : The Update Number indicates a change of the message content of
257  * the same CBS message, i.e. the CBS message with the same Message Identifier, Geographical
258  * Scope, and Message Code.
259  *
260  * Serial Number fields meaning are defined in the 3GPP 23.041 (9.4.1.2.1 Serial Number).
261  *
262  * @b Message @b Identifier
263  *
264  * Message Identifier parameter identifies the source and type of the CBS message. For example,
265  * "Automotive Association" (= source), "Traffic Reports" (= type) could correspond to one value.
266  * A number of CBS messages may originate from the same source and/or be of the same type.
267  * These will be distinguished by the Serial Number.
268  *
269  * Message identifier meaning ranges are defined in the 3GPP 23.041 (9.4.1.2.2 Message Identifier).
270  *
271  * @section le_sms_ops_broadcast_configuration SMS Cell Broadcast configuration
272  *
273  * GSM or UMTS Cell broadcast Message identifiers range can be added or removed with
274  * le_sms_AddCellBroadcastIds() and le_sms_RemoveCellBroadcastIds() APIs. All Message identifiers
275  * can be removed with le_sms_ClearCellBroadcastIds() API.
276  *
277  * CDMA Cell broadcast Service categories can be added or removed with
278  * le_sms_AddCdmaCellBroadcastServices() and le_sms_RemoveCdmaCellBroadcastServices() APIs. All
279  * Service categories can be removed with le_sms_ClearCdmaCellBroadcastServices() API.
280  *
281  * @section le_sms_ops_statusReport SMS Status Report
282  *
283  * SMS Status Report may be sent by the SMS Center (SMSC) to inform the originating device about the
284  * final outcome of the message delivery.
285  *
286  * SMS Status Report can be activated or deactivated for outgoing messages with
287  * le_sms_EnableStatusReport() and le_sms_DisableStatusReport(). The current activation state can
288  * be retrieved with le_sms_IsStatusReportEnabled().
289  *
290  * The reception of a SMS Status Report is notified by the SMS handler like a SMS message reception,
291  * but the message is neither stored in SIM nor in the modem. So le_sms_DeleteFromStorage()
292  * can't be used, but the message reference shall be delete with le_sms_Delete(). Received SMS
293  * Status Reports are identified by a specific type: @ref LE_SMS_TYPE_STATUS_REPORT.
294  *
295  * The different elements of the SMS Status Report can be retrieved with the following APIs:
296  * - le_sms_GetTpMr() gives the Message Reference, defined in 3GPP TS 23.040 section 9.2.3.6.
297  * - le_sms_GetTpRa() gives the Recipient Address, defined in 3GPP TS 23.040 section 9.2.3.14, and
298  * the Recipient Address Type of Address, defined in 3GPP TS 24.011 section 8.2.5.2.
299  * - le_sms_GetTpScTs() gives the Service Centre Time Stamp, defined in 3GPP TS 23.040
300  * section 9.2.3.11.
301  * - le_sms_GetTpDt() gives the Discharge Time, defined in 3GPP TS 23.040 section 9.2.3.13.
302  * - le_sms_GetTpSt() gives the Status, defined in 3GPP TS 23.040 section 9.2.3.15.
303  *
304  * @section le_sms_ops_configuration SMS configuration
305  *
306  * Modem SMS Center Address can be set or get with le_sms_SetSmsCenterAddress() and
307  * le_sms_GetSmsCenterAddress() functions
308  *
309  * @section le_sms_ops_storage_configuration Preferred SMS storage configuration
310  *
311  * Preferred SMS storage for incoming messages can be set or get with le_sms_SetPreferredStorage()
312  * and le_sms_GetPreferredStorage() functions.
313  *
314  * @section le_sms_ops_statistics SMS statistics
315  *
316  * The number of SMS successfully sent or received through the Legato API can be counted.
317  * This feature is activated by default. le_sms_GetCount() allows retrieving the message count
318  * for each SMS type (cf. @ref le_sms_Type_t).
319  *
320  * le_sms_StopCount() stops the message counting and le_sms_StartCount() restarts it.
321  * le_sms_ResetCount() can be used to reset the message counters.
322  *
323  * @note The activation state of this feature is persistent even after a reboot of the platform.
324  *
325  * @section le_sms_ops_samples Sample codes
326  * A sample code that implements a function for Mobile Originated SMS message can be found in
327  * \b smsMO.c file (please refer to @ref c_smsSampleMO page).
328  *
329  * A sample code that implements a function for Mobile Terminated SMS message can be found in
330  * \b smsMT.c file (please refer to @ref c_smsSampleMT page).
331  *
332  * These two samples can be easily compiled and run into the \b sms app, to install and use
333  * this app:
334  *
335  * @verbatim
336  $ make ar7
337  $ bin/instapp build/ar7/bin/samples/sms.ar7 <ipaddress>
338  @endverbatim
339  * where ipaddress is the address of your target device.
340  *
341  * Then on your target, just run:
342  * @verbatim
343  $ app start sms
344  @endverbatim
345  *
346  * The sample replies to the sender by the message "Message from <phone number> received". Where
347  * "phone number" is the sender's phone number.
348  *
349  * Sample code for that application can be seen in the following pages:
350  * - @subpage c_smsSampleMO <br>
351  * - @subpage c_smsSampleMT
352  *
353  * <HR>
354  *
355  * Copyright (C) Sierra Wireless Inc.
356  */
357 /**
358  * @file le_sms_interface.h
359  *
360  * Legato @ref c_sms include file.
361  *
362  * Copyright (C) Sierra Wireless Inc.
363  */
364 /**
365  * @page c_smsSampleMO Sample code for Mobile Originated SMS message
366  *
367  * @include "apps/sample/sms/smsClient/smsMO.c"
368  */
369 /**
370  * @page c_smsSampleMT Sample code for Mobile Terminated SMS message
371  *
372  * @include "apps/sample/sms/smsClient/smsMT.c"
373  */
374 /**
375  * @page c_smsCbSample Sample code for SMS Cell Broadcast reception
376  *
377  * @include "apps/test/modemServices/sms/smsIntegrationTest/smsCBTest/smsCBTest.c"
378  */
379 
380 #ifndef LE_SMS_INTERFACE_H_INCLUDE_GUARD
381 #define LE_SMS_INTERFACE_H_INCLUDE_GUARD
382 
383 
384 #include "legato.h"
385 
386 // Interface specific includes
387 #include "le_mdmDefs_interface.h"
388 
389 
390 //--------------------------------------------------------------------------------------------------
391 /**
392  * Type for handler called when a server disconnects.
393  */
394 //--------------------------------------------------------------------------------------------------
395 typedef void (*le_sms_DisconnectHandler_t)(void *);
396 
397 //--------------------------------------------------------------------------------------------------
398 /**
399  *
400  * Connect the current client thread to the service providing this API. Block until the service is
401  * available.
402  *
403  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
404  * called before any other functions in this API. Normally, ConnectService is automatically called
405  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
406  *
407  * This function is created automatically.
408  */
409 //--------------------------------------------------------------------------------------------------
411 (
412  void
413 );
414 
415 //--------------------------------------------------------------------------------------------------
416 /**
417  *
418  * Try to connect the current client thread to the service providing this API. Return with an error
419  * if the service is not available.
420  *
421  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
422  * called before any other functions in this API. Normally, ConnectService is automatically called
423  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
424  *
425  * This function is created automatically.
426  *
427  * @return
428  * - LE_OK if the client connected successfully to the service.
429  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
430  * bound.
431  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
432  * - LE_COMM_ERROR if the Service Directory cannot be reached.
433  */
434 //--------------------------------------------------------------------------------------------------
436 (
437  void
438 );
439 
440 //--------------------------------------------------------------------------------------------------
441 /**
442  * Set handler called when server disconnection is detected.
443  *
444  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
445  * to continue without exiting, it should call longjmp() from inside the handler.
446  */
447 //--------------------------------------------------------------------------------------------------
449 (
450  le_sms_DisconnectHandler_t disconnectHandler,
451  void *contextPtr
452 );
453 
454 //--------------------------------------------------------------------------------------------------
455 /**
456  *
457  * Disconnect the current client thread from the service providing this API.
458  *
459  * Normally, this function doesn't need to be called. After this function is called, there's no
460  * longer a connection to the service, and the functions in this API can't be used. For details, see
461  * @ref apiFilesC_client.
462  *
463  * This function is created automatically.
464  */
465 //--------------------------------------------------------------------------------------------------
467 (
468  void
469 );
470 
471 
472 //--------------------------------------------------------------------------------------------------
473 /**
474  * Time stamp string length.
475  * The string format is "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone).
476  * One extra byte is added for the null character.
477  */
478 //--------------------------------------------------------------------------------------------------
479 #define LE_SMS_TIMESTAMP_MAX_LEN 20
480 
481 //--------------------------------------------------------------------------------------------------
482 /**
483  * Time stamp string length (including the null-terminator).
484  */
485 //--------------------------------------------------------------------------------------------------
486 #define LE_SMS_TIMESTAMP_MAX_BYTES 21
487 
488 //--------------------------------------------------------------------------------------------------
489 /**
490  * The text message can be up to 160 characters long.
491  * One extra byte is added for the null character.
492  */
493 //--------------------------------------------------------------------------------------------------
494 #define LE_SMS_TEXT_MAX_LEN 160
495 
496 //--------------------------------------------------------------------------------------------------
497 /**
498  * Test message string length (including the null-terminator).
499  */
500 //--------------------------------------------------------------------------------------------------
501 #define LE_SMS_TEXT_MAX_BYTES 161
502 
503 //--------------------------------------------------------------------------------------------------
504 /**
505  * The raw binary message can be up to 140 bytes long.
506  */
507 //--------------------------------------------------------------------------------------------------
508 #define LE_SMS_BINARY_MAX_BYTES 140
509 
510 //--------------------------------------------------------------------------------------------------
511 /**
512  * The UCS2 message can be up to 140 bytes long (70 characters).
513  */
514 //--------------------------------------------------------------------------------------------------
515 #define LE_SMS_UCS2_MAX_BYTES 140
516 
517 //--------------------------------------------------------------------------------------------------
518 /**
519  * The UCS2 message can be up to 70 characters (140 bytes long).
520  */
521 //--------------------------------------------------------------------------------------------------
522 #define LE_SMS_UCS2_MAX_CHARS 70
523 
524 //--------------------------------------------------------------------------------------------------
525 /**
526  * The PDU payload bytes long.
527  */
528 //--------------------------------------------------------------------------------------------------
529 #define LE_SMS_PDU_MAX_PAYLOAD 140
530 
531 //--------------------------------------------------------------------------------------------------
532 /**
533  * The PDU message can be up to 36 (header) + 140 (payload) bytes long.
534  */
535 //--------------------------------------------------------------------------------------------------
536 #define LE_SMS_PDU_MAX_BYTES 176
537 
538 //--------------------------------------------------------------------------------------------------
539 /**
540  * Message Format.
541  */
542 //--------------------------------------------------------------------------------------------------
543 typedef enum
544 {
546  ///< PDU message format.
548  ///< Text message format.
550  ///< Binary message format.
552  ///< UCS2 message format.
554  ///< Unknown message format.
555 }
557 
558 
559 //--------------------------------------------------------------------------------------------------
560 /**
561  * Message Type.
562  */
563 //--------------------------------------------------------------------------------------------------
564 typedef enum
565 {
567  ///< SMS mobile terminated message.
569  ///< SMS mobile originated message.
571  ///< SMS Cell Broadcast message.
573  ///< SMS Status Report.
574 }
576 
577 
578 //--------------------------------------------------------------------------------------------------
579 /**
580  * Message Status.
581  */
582 //--------------------------------------------------------------------------------------------------
583 typedef enum
584 {
586  ///< Message present in the message storage has been read.
588  ///< Message present in the message storage has not been read.
590  ///< Message saved in the message storage has been sent.
592  ///< Message saved in the message storage has not been sent.
594  ///< Message has been sent.
596  ///< Message has been in the sending pool.
598  ///< Message has not been sent.
600  ///< Message sending has Failed.
602  ///< Message sending has Failed due to timeout.
604  ///< Unknown message status.
605 }
607 
608 
609 //--------------------------------------------------------------------------------------------------
610 /**
611  * CDMA Cell broadcast message languages.
612  */
613 //--------------------------------------------------------------------------------------------------
614 typedef enum
615 {
617  ///< Unknow or Unspecified language.
619  ///< English language.
621  ///< French language.
623  ///< Spanish language.
625  ///< Japanese language.
627  ///< Korean language.
629  ///< Chinese language.
631  ///< Hebrew language.
632  LE_SMS_LANGUAGE_MAX = 8
633  ///<
634 }
636 
637 
638 //--------------------------------------------------------------------------------------------------
639 /**
640  * CDMA Cell broadcast Service Categories.
641  */
642 //--------------------------------------------------------------------------------------------------
643 typedef enum
644 {
646  ///< Unknown or Unspecified.
648  ///< Emergency Broadcast.
650  ///< Administrative.
652  ///< Maintenance.
654  ///< General News Local.
656  ///< General News Regional.
658  ///< General News National.
660  ///< General News International.
662  ///< Business News Local.
664  ///< Business News Regional.
666  ///< Business News National.
668  ///< Business News International.
670  ///< Sports News Local.
672  ///< Sports News Regional.
674  ///< Sports News National.
676  ///< Sports News International.
678  ///< Entertainment News Local.
680  ///< Entertainment News Regional.
682  ///< Entertainment News National.
684  ///< Entertainment News International.
686  ///< Local weather.
688  ///< Area Traffic Reports.
690  ///< Local Airplane Flight Schedules.
692  ///< Restaurants.
694  ///< Lodgings.
696  ///< Retail Directory.
698  ///< Advertisements.
700  ///< Stock Quotes.
702  ///< Employment Opportunities.
704  ///< Medical/Health/Hospitals.
706  ///< Technology News.
708  ///< Multicategory.
710  ///< Card Application Toolkit Protocol Teleservice.
711  LE_SMS_CDMA_SVC_CAT_MAX = 33
712  ///<
713 }
715 
716 
717 //--------------------------------------------------------------------------------------------------
718 /**
719  * SMS storage area.
720  */
721 //--------------------------------------------------------------------------------------------------
722 typedef enum
723 {
725  ///< Non volatile memory storage.
727  ///< Sim SMS storage.
729  ///< Undefined storage.
730 }
732 
733 
734 //--------------------------------------------------------------------------------------------------
735 /**
736  * 3GPP2 Message Error code when the message sending has failed.
737  */
738 //--------------------------------------------------------------------------------------------------
739 typedef enum
740 {
742  ///< The SMS Destination Address is valid but is not.
743  ///< currently allocated to an SMS terminal.
745  ///< The SMS Destination Address is invalid.
747  ///< The network transmission failed due to lack of
748  ///< a network resource or link capacity.
750  ///< A network node failed, a link failed, or a
751  ///< required operation failed.
753  ///< The SMS_TeleserviceIdentifier is not known, is
754  ///< not supported, or is not authorized by an
755  ///< addressed functional entity.
757  ///< A network problem other than identified above.
759  ///< The addressed MS-based SME is known, but it
760  ///< does not respond to a page.
762  ///< The destination MS-based SME is SMS capable,
763  ///< but is currently engaged in a call, a service,
764  ///< or a call mode that precludes the use of SMS,
765  ///< or the destination SME is congested.
767  ///< The destination SME does not acknowledge receipt
768  ///< of the SMS delivery.
770  ///< A required terminal resource is not available to
771  ///< process this message.
773  ///< Delivery is not currently possible.
775  ///< The addressed destination is out of
776  ///< service for an extended period of time.
778  ///< The MS-based SME is no longer at the
779  ///< temporary SMS routing address.
781  ///< A terminal problem other than described above.
783  ///< There is no channel available or there is
784  ///< radio congestion at this time.
786  ///< The MS for an MS-based SME is operating in a
787  ///< mode that does not support SMS at this time.
789  ///< A radio interface problem to an MS-based SME
790  ///< other than described above.
792  ///< The size of a parameter or field is not
793  ///< what is expected.
795  ///< The originating MIN is not recognized.
797  ///< The destination is not authorized to receive
798  ///< the SMS message.
800  ///< The originating supplementary service is
801  ///< not known or supported.
803  ///< The originating supplementary service is
804  ///< not known or supported.
806  ///< An optional parameter that is required
807  ///< for a particular function.
809  ///< A parameter is missing that is mandatory.
810  ///< for a particular message.
812  ///< A known parameter has an unknown or
813  ///< unsupported value.
815  ///< A known parameter has a known but unexpected
816  ///< value.
818  ///< The User Data size is too large for access
819  ///< technology, transport network, or call
820  ///< mode, etc
822  ///< Other general problems.
824  ///< Platform specific code.
826  ///< Undefined reason.
827 }
829 
830 
831 //--------------------------------------------------------------------------------------------------
832 /**
833  * Message Error code when the message sending has failed.
834  */
835 //--------------------------------------------------------------------------------------------------
836 typedef enum
837 {
839  ///< Unassigned (unallocated) number
841  ///< Operator determined barring
843  ///< Call barred
845  ///< Reserved
847  ///< Short message transfer rejected
849  ///< Memory capacity exceeded
851  ///< Destination out of order
853  ///< Unidentified subscriber
855  ///< Facility rejected
857  ///< Unknown subscriber
859  ///< Network out of order
861  ///< Temporary failure
863  ///< Congestion
865  ///< Resources unavailable, unspecified
867  ///< Resources facility not subscribed
869  ///< Resources facility not implemented
871  ///< Invalid short message transfer
872  ///< reference value
874  ///< Sementically incorect message
876  ///< Invalid mandatory information
878  ///< Message type nonexistent or not implemented
880  ///< Message not compatible with short message
881  ///< protocol state
883  ///< Information element nonexistent
884  ///< or not implemented
886  ///< Protocol error, unspecified
888  ///< Interworking, unspecified
890  ///< Telematic interworking not supported
892  ///< Short Message Type 0 not supported
894  ///< Cannot replace short message
896  ///< Unspecified TP-PID error
898  ///< Data coding scheme (alphabet)
899  ///< not supported
901  ///< Message class not supported
903  ///< Unspecified TP-DCS error
905  ///< Command cannot be actioned
907  ///< Command unsupported
909  ///< Unspecified TP-Command error
911  ///< TPDU not supported
913  ///< SC busy
915  ///< No SC subscription
917  ///< SC system failure
919  ///< Invalid SME address
921  ///< Destination SME barred
923  ///< SM Rejected-Duplicate SM
925  ///< TP-VPF not supported
927  ///< TP-VP not supporte
929  ///< (U)SIM SMS storage full
931  ///< No SMS storage capability in (U)SIM
933  ///< Error in MS
935  ///< Memory capacity exceeded
937  ///< (U)SIM Application Toolkit busy
939  ///< (U)SIM data download error
941  ///< Unspecified error cause
943  ///< Platform specific code.
945  ///< Undefined reason.
946 }
948 
949 
950 //--------------------------------------------------------------------------------------------------
951 /**
952  * Declare a reference type for referring to SMS Message objects.
953  */
954 //--------------------------------------------------------------------------------------------------
955 typedef struct le_sms_Msg* le_sms_MsgRef_t;
956 
957 
958 //--------------------------------------------------------------------------------------------------
959 /**
960  * Opaque type for SMS Message Listing.
961  */
962 //--------------------------------------------------------------------------------------------------
963 typedef struct le_sms_MsgList* le_sms_MsgListRef_t;
964 
965 
966 //--------------------------------------------------------------------------------------------------
967 /**
968  * Reference type used by Add/Remove functions for EVENT 'le_sms_RxMessage'
969  */
970 //--------------------------------------------------------------------------------------------------
971 typedef struct le_sms_RxMessageHandler* le_sms_RxMessageHandlerRef_t;
972 
973 
974 //--------------------------------------------------------------------------------------------------
975 /**
976  * Reference type used by Add/Remove functions for EVENT 'le_sms_FullStorageEvent'
977  */
978 //--------------------------------------------------------------------------------------------------
979 typedef struct le_sms_FullStorageEventHandler* le_sms_FullStorageEventHandlerRef_t;
980 
981 
982 //--------------------------------------------------------------------------------------------------
983 /**
984  * Handler for Sending result.
985  */
986 //--------------------------------------------------------------------------------------------------
987 typedef void (*le_sms_CallbackResultFunc_t)
988 (
989  le_sms_MsgRef_t msgRef,
990  ///< Reference to the message object.
991  le_sms_Status_t status,
992  ///< Status result.
993  void* contextPtr
994  ///<
995 );
996 
997 //--------------------------------------------------------------------------------------------------
998 /**
999  * Handler for New Message.
1000  *
1001  */
1002 //--------------------------------------------------------------------------------------------------
1003 typedef void (*le_sms_RxMessageHandlerFunc_t)
1005  le_sms_MsgRef_t msgRef,
1006  ///< Message reference.
1007  void* contextPtr
1008  ///<
1009 );
1010 
1011 //--------------------------------------------------------------------------------------------------
1012 /**
1013  * Handler for full storage indication.
1014  *
1015  */
1016 //--------------------------------------------------------------------------------------------------
1017 typedef void (*le_sms_FullStorageHandlerFunc_t)
1019  le_sms_Storage_t storage,
1020  ///< storage parameter.
1021  void* contextPtr
1022  ///<
1023 );
1024 
1025 //--------------------------------------------------------------------------------------------------
1026 /**
1027  * Add handler function for EVENT 'le_sms_RxMessage'
1028  *
1029  * This event provides information on new received messages.
1030  *
1031  */
1032 //--------------------------------------------------------------------------------------------------
1034 (
1035  le_sms_RxMessageHandlerFunc_t handlerPtr,
1036  ///< [IN]
1037  void* contextPtr
1038  ///< [IN]
1039 );
1040 
1041 //--------------------------------------------------------------------------------------------------
1042 /**
1043  * Remove handler function for EVENT 'le_sms_RxMessage'
1044  */
1045 //--------------------------------------------------------------------------------------------------
1047 (
1048  le_sms_RxMessageHandlerRef_t handlerRef
1049  ///< [IN]
1050 );
1051 
1052 //--------------------------------------------------------------------------------------------------
1053 /**
1054  * Add handler function for EVENT 'le_sms_FullStorageEvent'
1055  *
1056  * This event provides information on full storage indication.
1057  *
1058  */
1059 //--------------------------------------------------------------------------------------------------
1061 (
1063  ///< [IN]
1064  void* contextPtr
1065  ///< [IN]
1066 );
1067 
1068 //--------------------------------------------------------------------------------------------------
1069 /**
1070  * Remove handler function for EVENT 'le_sms_FullStorageEvent'
1071  */
1072 //--------------------------------------------------------------------------------------------------
1074 (
1076  ///< [IN]
1077 );
1078 
1079 //--------------------------------------------------------------------------------------------------
1080 /**
1081  * Create an SMS Message data structure.
1082  *
1083  * @return Reference to the new Message object.
1084  *
1085  * @note
1086  * On failure, the process exits, so you don't have to worry about checking the returned
1087  * reference for validity.
1088  */
1089 //--------------------------------------------------------------------------------------------------
1091 (
1092  void
1093 );
1094 
1095 //--------------------------------------------------------------------------------------------------
1096 /**
1097  * Set the timeout to send a SMS Message.
1098  *
1099  * @return
1100  * - LE_FAULT Message is not in UNSENT state or is Read-Only.
1101  * - LE_OK Function succeeded.
1102  *
1103  * @note
1104  * On failure, the process exits, so you don't have to worry about checking the returned
1105  * reference for validity.
1106  */
1107 //--------------------------------------------------------------------------------------------------
1109 (
1110  le_sms_MsgRef_t msgRef,
1111  ///< [IN] Reference to the message object.
1112  uint32_t timeout
1113  ///< [IN] Timeout in seconds.
1114 );
1115 
1116 //--------------------------------------------------------------------------------------------------
1117 /**
1118  * Set the Telephone destination number.
1119  *
1120  * Telephone number is defined in ITU-T recommendations E.164/E.163.
1121  * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
1122  *
1123  * @return LE_NOT_PERMITTED Message is Read-Only.
1124  * @return LE_BAD_PARAMETER Telephone destination number length is equal to zero.
1125  * @return LE_OK Function succeeded.
1126  *
1127  * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN
1128  * digits), it is a fatal error, the function will not return.
1129  *
1130  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1131  * function will not return.
1132  */
1133 //--------------------------------------------------------------------------------------------------
1135 (
1136  le_sms_MsgRef_t msgRef,
1137  ///< [IN] Reference to the message object.
1138  const char* LE_NONNULL dest
1139  ///< [IN] Telephone number string.
1140 );
1141 
1142 //--------------------------------------------------------------------------------------------------
1143 /**
1144  * This function must be called to set the Text Message content.
1145  *
1146  * @return LE_NOT_PERMITTED Message is Read-Only.
1147  * @return LE_BAD_PARAMETER Text message length is equal to zero.
1148  * @return LE_OK Function succeeded.
1149  *
1150  * @note Text Message is encoded in ASCII format (ISO8859-15) and characters have to exist in
1151  * the GSM 23.038 7 bit alphabet.
1152  *
1153  * @note If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the
1154  * function will not return.
1155  *
1156  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1157  * function will not return.
1158  */
1159 //--------------------------------------------------------------------------------------------------
1161 (
1162  le_sms_MsgRef_t msgRef,
1163  ///< [IN] Reference to the message object.
1164  const char* LE_NONNULL text
1165  ///< [IN] SMS text.
1166 );
1167 
1168 //--------------------------------------------------------------------------------------------------
1169 /**
1170  * Set the binary message content.
1171  *
1172  * @return LE_NOT_PERMITTED Message is Read-Only.
1173  * @return LE_BAD_PARAMETER Length of the data is equal to zero.
1174  * @return LE_OK Function succeeded.
1175  *
1176  * @note If length of the data is too long (max LE_SMS_BINARY_MAX_BYTES bytes), it is a fatal
1177  * error, the function will not return.
1178  *
1179  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1180  * function will not return.
1181  */
1182 //--------------------------------------------------------------------------------------------------
1184 (
1185  le_sms_MsgRef_t msgRef,
1186  ///< [IN] Reference to the message object.
1187  const uint8_t* binPtr,
1188  ///< [IN] Binary data.
1189  size_t binSize
1190  ///< [IN]
1191 );
1192 
1193 //--------------------------------------------------------------------------------------------------
1194 /**
1195  * Set the UCS2 message content (16-bit format).
1196  *
1197  * @return
1198  * - LE_NOT_PERMITTED Message is Read-Only.
1199  * - LE_BAD_PARAMETER Length of the data is equal to zero.
1200  * - LE_OK Function succeeded.
1201  *
1202  * @note If length of the data is too long (max LE_SMS_UCS2_MAX_CHARS), it is a fatal
1203  * error, the function will not return.
1204  *
1205  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1206  * function will not return.
1207  */
1208 //--------------------------------------------------------------------------------------------------
1210 (
1211  le_sms_MsgRef_t msgRef,
1212  ///< [IN] Reference to the message object.
1213  const uint16_t* ucs2Ptr,
1214  ///< [IN] UCS2 message.
1215  size_t ucs2Size
1216  ///< [IN]
1217 );
1218 
1219 //--------------------------------------------------------------------------------------------------
1220 /**
1221  * Set the PDU message content.
1222  *
1223  * @return LE_NOT_PERMITTED Message is Read-Only.
1224  * @return LE_BAD_PARAMETER Length of the data is equal to zero.
1225  * @return LE_OK Function succeeded.
1226  *
1227  * @note If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error,
1228  * the function will not return.
1229  *
1230  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1231  * function will not return.
1232  */
1233 //--------------------------------------------------------------------------------------------------
1235 (
1236  le_sms_MsgRef_t msgRef,
1237  ///< [IN] Reference to the message object.
1238  const uint8_t* pduPtr,
1239  ///< [IN] PDU message.
1240  size_t pduSize
1241  ///< [IN]
1242 );
1243 
1244 //--------------------------------------------------------------------------------------------------
1245 /**
1246  * Send an SMS message.
1247  *
1248  * Verifies first if the parameters are valid, then it checks the modem state can support
1249  * message sending.
1250  *
1251  * @return LE_FORMAT_ERROR Message content is invalid.
1252  * @return LE_FAULT Function failed to send the message.
1253  * @return LE_OK Function succeeded.
1254  * @return LE_TIMEOUT Timeout before the complete sending.
1255  *
1256  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1257  * function will not return.
1258  */
1259 //--------------------------------------------------------------------------------------------------
1261 (
1262  le_sms_MsgRef_t msgRef
1263  ///< [IN] Reference to the message object.
1264 );
1265 
1266 //--------------------------------------------------------------------------------------------------
1267 /**
1268  * Send an asynchronous SMS message.
1269  *
1270  * Verifies first if the parameters are valid, then it checks the modem state can support
1271  * message sending.
1272  *
1273  * @return LE_FORMAT_ERROR Message content is invalid.
1274  * @return LE_FAULT Function failed to send the message.
1275  * @return LE_OK Function succeeded.
1276  * @return LE_TIMEOUT Timeout before the complete sending.
1277  *
1278  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1279  * function will not return.
1280  */
1281 //--------------------------------------------------------------------------------------------------
1283 (
1284  le_sms_MsgRef_t msgRef,
1285  ///< [IN] Reference to the message object.
1286  le_sms_CallbackResultFunc_t handlerPtr,
1287  ///< [IN] CallBack for sending result.
1288  void* contextPtr
1289  ///< [IN]
1290 );
1291 
1292 //--------------------------------------------------------------------------------------------------
1293 /**
1294  * Get the error code when a 3GPP2 message sending has Failed.
1295  *
1296  * @return The error code
1297  *
1298  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1299  * function will not return.
1300  *
1301  * @note It is only applicable for 3GPP2 message sending failure, otherwise
1302  * LE_SMS_ERROR_3GPP2_MAX is returned.
1303  */
1304 //--------------------------------------------------------------------------------------------------
1306 (
1307  le_sms_MsgRef_t msgRef
1308  ///< [IN] Reference to the message object.
1309 );
1310 
1311 //--------------------------------------------------------------------------------------------------
1312 /**
1313  * Get the Radio Protocol and the Transfer Protocol error code when a 3GPP message sending has
1314  * failed.
1315  *
1316  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1317  * function will not return.
1318  *
1319  * @note It is only applicable for 3GPP message sending failure, otherwise
1320  * LE_SMS_ERROR_3GPP_MAX is returned.
1321  */
1322 //--------------------------------------------------------------------------------------------------
1324 (
1325  le_sms_MsgRef_t msgRef,
1326  ///< [IN] Reference to the message object.
1327  le_sms_ErrorCode_t* rpCausePtr,
1328  ///< [OUT] Radio Protocol cause code.
1329  le_sms_ErrorCode_t* tpCausePtr
1330  ///< [OUT] Transfer Protocol cause code.
1331 );
1332 
1333 //--------------------------------------------------------------------------------------------------
1334 /**
1335  * Called to get the platform specific error code.
1336  *
1337  * @return The platform specific error code.
1338  *
1339  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1340  * function will not return.
1341  */
1342 //--------------------------------------------------------------------------------------------------
1344 (
1345  le_sms_MsgRef_t msgRef
1346  ///< [IN] Reference to the message object.
1347 );
1348 
1349 //--------------------------------------------------------------------------------------------------
1350 /**
1351  * Create and asynchronously send a text message.
1352  *
1353  * @return
1354  * - le_sms_Msg Reference to the new Message object pooled.
1355  * - NULL Not possible to pool a new message.
1356  *
1357  * @note If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN
1358  * digits), it is a fatal error, the function will not return.
1359  * @note If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the
1360  * function will not return.
1361  */
1362 //--------------------------------------------------------------------------------------------------
1364 (
1365  const char* LE_NONNULL destStr,
1366  ///< [IN] Telephone number string.
1367  const char* LE_NONNULL textStr,
1368  ///< [IN] SMS text.
1369  le_sms_CallbackResultFunc_t handlerPtr,
1370  ///< [IN] CallBack for sending result.
1371  void* contextPtr
1372  ///< [IN]
1373 );
1374 
1375 //--------------------------------------------------------------------------------------------------
1376 /**
1377  * Create and asynchronously send a PDU message.
1378  *
1379  * @return
1380  * - le_sms_Msg Reference to the new Message object pooled.
1381  * - NULL Not possible to pool a new message.
1382  *
1383  */
1384 //--------------------------------------------------------------------------------------------------
1386 (
1387  const uint8_t* pduPtr,
1388  ///< [IN] PDU message.
1389  size_t pduSize,
1390  ///< [IN]
1391  le_sms_CallbackResultFunc_t handlerPtr,
1392  ///< [IN] CallBack for sending result.
1393  void* contextPtr
1394  ///< [IN]
1395 );
1396 
1397 //--------------------------------------------------------------------------------------------------
1398 /**
1399  * Delete a Message data structure.
1400  *
1401  * It deletes the Message data structure and all the allocated memory is freed. If several
1402  * users own the Message object (e.g., several handler functions registered for
1403  * SMS message reception), the Message object will only be deleted if one User
1404  * owns the Message object.
1405  *
1406  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1407  * function will not return.
1408  */
1409 //--------------------------------------------------------------------------------------------------
1410 void le_sms_Delete
1411 (
1412  le_sms_MsgRef_t msgRef
1413  ///< [IN] Reference to the message object.
1414 );
1415 
1416 //--------------------------------------------------------------------------------------------------
1417 /**
1418  * Get the message format.
1419  *
1420  * @return Message format.
1421  *
1422  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1423  * function will not return.
1424  *
1425  */
1426 //--------------------------------------------------------------------------------------------------
1428 (
1429  le_sms_MsgRef_t msgRef
1430  ///< [IN] Reference to the message object.
1431 );
1432 
1433 //--------------------------------------------------------------------------------------------------
1434 /**
1435  * Get the message type.
1436  *
1437  * @return Message type.
1438  *
1439  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1440  * function will not return.
1441  */
1442 //--------------------------------------------------------------------------------------------------
1444 (
1445  le_sms_MsgRef_t msgRef
1446  ///< [IN] Reference to the message object.
1447 );
1448 
1449 //--------------------------------------------------------------------------------------------------
1450 /**
1451  * Get the Cell Broadcast Message Identifier.
1452  *
1453  * @return
1454  * - LE_FAULT Message is not a cell broadcast type.
1455  * - LE_OK Function succeeded.
1456  *
1457  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1458  * function will not return.
1459  */
1460 //--------------------------------------------------------------------------------------------------
1462 (
1463  le_sms_MsgRef_t msgRef,
1464  ///< [IN] Reference to the message object.
1465  uint16_t* messageIdPtr
1466  ///< [OUT] Cell Broadcast Message Identifier.
1467 );
1468 
1469 //--------------------------------------------------------------------------------------------------
1470 /**
1471  * Get the Cell Broadcast Message Serial Number.
1472  *
1473  * @return
1474  * - LE_FAULT Message is not a cell broadcast type.
1475  * - LE_OK Function succeeded.
1476  *
1477  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1478  * function will not return.
1479  */
1480 //--------------------------------------------------------------------------------------------------
1482 (
1483  le_sms_MsgRef_t msgRef,
1484  ///< [IN] Reference to the message object.
1485  uint16_t* serialNumberPtr
1486  ///< [OUT] Cell Broadcast Serial Number.
1487 );
1488 
1489 //--------------------------------------------------------------------------------------------------
1490 /**
1491  * Get the Sender Telephone number.
1492  *
1493  * Output parameter is updated with the Telephone number. If the Telephone number string exceeds
1494  * the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until
1495  * 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
1496  *
1497  * @return LE_NOT_PERMITTED Message is not a received message.
1498  * @return LE_OVERFLOW Telephone number length exceed the maximum length.
1499  * @return LE_OK Function succeeded.
1500  *
1501  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1502  * function will not return.
1503  */
1504 //--------------------------------------------------------------------------------------------------
1506 (
1507  le_sms_MsgRef_t msgRef,
1508  ///< [IN] Reference to the message object.
1509  char* tel,
1510  ///< [OUT] Telephone number string.
1511  size_t telSize
1512  ///< [IN]
1513 );
1514 
1515 //--------------------------------------------------------------------------------------------------
1516 /**
1517  * Get the Service Center Time Stamp string.
1518  *
1519  * Output parameter is updated with the Time Stamp string. If the Time Stamp string exceeds the
1520  * value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until
1521  * 'len-1' characters and a null-character is implicitly appended at the end of 'timestamp'.
1522  *
1523  * @return LE_NOT_PERMITTED Message is not a received message.
1524  * @return LE_OVERFLOW Timestamp number length exceed the maximum length.
1525  * @return LE_OK Function succeeded.
1526  *
1527  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1528  * function will not return.
1529  */
1530 //--------------------------------------------------------------------------------------------------
1532 (
1533  le_sms_MsgRef_t msgRef,
1534  ///< [IN] Reference to the message object.
1535  char* timestamp,
1536  ///< [OUT] Message time stamp (in text mode).
1537  ///< string format: "yy/MM/dd,hh:mm:ss+/-zz"
1538  ///< (Year/Month/Day,Hour:Min:Seconds+/-TimeZone)
1539  ///< The time zone indicates the difference, expressed
1540  ///< in quarters of an hours between the local time
1541  ///< and GMT.
1542  size_t timestampSize
1543  ///< [IN]
1544 );
1545 
1546 //--------------------------------------------------------------------------------------------------
1547 /**
1548  * Get the message Length value.
1549  *
1550  * @return Number of characters for text and UCS2 messages, or the length of the data in bytes for
1551  * raw binary messages.
1552  *
1553  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1554  * function will not return.
1555  */
1556 //--------------------------------------------------------------------------------------------------
1557 size_t le_sms_GetUserdataLen
1558 (
1559  le_sms_MsgRef_t msgRef
1560  ///< [IN] Reference to the message object.
1561 );
1562 
1563 //--------------------------------------------------------------------------------------------------
1564 /**
1565  * Get the text Message.
1566  *
1567  * Output parameter is updated with the text string encoded in ASCII format. If the text string
1568  * exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled
1569  * until 'len-1' characters and a null-character is implicitly appended at the end of 'text'.
1570  *
1571  * @return LE_OVERFLOW Message length exceed the maximum length.
1572  * @return LE_OK Function succeeded.
1573  *
1574  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1575  * function will not return.
1576  */
1577 //--------------------------------------------------------------------------------------------------
1579 (
1580  le_sms_MsgRef_t msgRef,
1581  ///< [IN] Reference to the message object.
1582  char* text,
1583  ///< [OUT] SMS text.
1584  size_t textSize
1585  ///< [IN]
1586 );
1587 
1588 //--------------------------------------------------------------------------------------------------
1589 /**
1590  * Get the binary Message.
1591  *
1592  * Output parameters are updated with the binary message content and the length of the raw
1593  * binary message in bytes. If the binary data exceed the value of 'len' input parameter, a
1594  * LE_OVERFLOW error code is returned and 'raw' is filled until 'len' bytes.
1595  *
1596  * @return LE_FORMAT_ERROR Message is not in binary format
1597  * @return LE_OVERFLOW Message length exceed the maximum length.
1598  * @return LE_OK Function succeeded.
1599  *
1600  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1601  * function will not return.
1602  */
1603 //--------------------------------------------------------------------------------------------------
1605 (
1606  le_sms_MsgRef_t msgRef,
1607  ///< [IN] Reference to the message object.
1608  uint8_t* binPtr,
1609  ///< [OUT] Binary message.
1610  size_t* binSizePtr
1611  ///< [INOUT]
1612 );
1613 
1614 //--------------------------------------------------------------------------------------------------
1615 /**
1616  * Get the UCS2 Message (16-bit format).
1617  *
1618  * Output parameters are updated with the UCS2 message content and the number of characters. If
1619  * the UCS2 data exceed the value of the length input parameter, a LE_OVERFLOW error
1620  * code is returned and 'ucs2Ptr' is filled until of the number of chars specified.
1621  *
1622  * @return
1623  * - LE_FORMAT_ERROR Message is not in binary format
1624  * - LE_OVERFLOW Message length exceed the maximum length.
1625  * - LE_OK Function succeeded.
1626  *
1627  */
1628 //--------------------------------------------------------------------------------------------------
1630 (
1631  le_sms_MsgRef_t msgRef,
1632  ///< [IN] Reference to the message object.
1633  uint16_t* ucs2Ptr,
1634  ///< [OUT] UCS2 message.
1635  size_t* ucs2SizePtr
1636  ///< [INOUT]
1637 );
1638 
1639 //--------------------------------------------------------------------------------------------------
1640 /**
1641  * Get the PDU message.
1642  *
1643  * Output parameters are updated with the PDU message content and the length of the PDU message
1644  * in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is
1645  * returned and 'pdu' is filled until 'len' bytes.
1646  *
1647  * @return LE_FORMAT_ERROR Unable to encode the message in PDU (only for outgoing messages).
1648  * @return LE_OVERFLOW Message length exceed the maximum length.
1649  * @return LE_OK Function succeeded.
1650  *
1651  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1652  * function will not return.
1653  */
1654 //--------------------------------------------------------------------------------------------------
1656 (
1657  le_sms_MsgRef_t msgRef,
1658  ///< [IN] Reference to the message object.
1659  uint8_t* pduPtr,
1660  ///< [OUT] PDU message.
1661  size_t* pduSizePtr
1662  ///< [INOUT]
1663 );
1664 
1665 //--------------------------------------------------------------------------------------------------
1666 /**
1667  * Get the message Length value.
1668  *
1669  * @return Length of the data in bytes of the PDU message.
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 size_t le_sms_GetPDULen
1676 (
1677  le_sms_MsgRef_t msgRef
1678  ///< [IN] Reference to the message object.
1679 );
1680 
1681 //--------------------------------------------------------------------------------------------------
1682 /**
1683  * Delete an SMS message from the storage area.
1684  *
1685  * Verifies first if the parameter is valid, then it checks the modem state can support
1686  * message deleting.
1687  *
1688  * @return LE_FAULT Function failed to perform the deletion.
1689  * @return LE_NO_MEMORY The message is not present in storage area.
1690  * @return LE_OK Function succeeded.
1691  *
1692  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1693  * function will not return.
1694  */
1695 //--------------------------------------------------------------------------------------------------
1697 (
1698  le_sms_MsgRef_t msgRef
1699  ///< [IN] Reference to the message object.
1700 );
1701 
1702 //--------------------------------------------------------------------------------------------------
1703 /**
1704  * Create an object's reference of the list of received messages
1705  * saved in the SMS message storage area.
1706  *
1707  * @return
1708  * Reference to the List object. Null pointer if no messages have been retrieved.
1709  */
1710 //--------------------------------------------------------------------------------------------------
1712 (
1713  void
1714 );
1715 
1716 //--------------------------------------------------------------------------------------------------
1717 /**
1718  * Delete the list of the Messages retrieved from the message
1719  * storage.
1720  *
1721  * @note
1722  * On failure, the process exits, so you don't have to worry about checking the returned
1723  * reference for validity.
1724  */
1725 //--------------------------------------------------------------------------------------------------
1726 void le_sms_DeleteList
1727 (
1728  le_sms_MsgListRef_t msgListRef
1729  ///< [IN] Messages list.
1730 );
1731 
1732 //--------------------------------------------------------------------------------------------------
1733 /**
1734  * Get the first Message object reference in the list of messages
1735  * retrieved with le_sms_CreateRxMsgList().
1736  *
1737  * @return NULL No message found.
1738  * @return Msg Message object reference.
1739  *
1740  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1741  * function will not return.
1742  */
1743 //--------------------------------------------------------------------------------------------------
1745 (
1746  le_sms_MsgListRef_t msgListRef
1747  ///< [IN] Messages list.
1748 );
1749 
1750 //--------------------------------------------------------------------------------------------------
1751 /**
1752  * Get the next Message object reference in the list of messages
1753  * retrieved with le_sms_CreateRxMsgList().
1754  *
1755  * @return NULL No message found.
1756  * @return Msg Message object reference.
1757  *
1758  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1759  * function will not return.
1760  */
1761 //--------------------------------------------------------------------------------------------------
1763 (
1764  le_sms_MsgListRef_t msgListRef
1765  ///< [IN] Messages list.
1766 );
1767 
1768 //--------------------------------------------------------------------------------------------------
1769 /**
1770  * Read the Message status (Received Read, Received Unread, Stored
1771  * Sent, Stored Unsent).
1772  *
1773  * @return Status of the message.
1774  *
1775  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1776  * function will not return.
1777  */
1778 //--------------------------------------------------------------------------------------------------
1780 (
1781  le_sms_MsgRef_t msgRef
1782  ///< [IN] Messages list.
1783 );
1784 
1785 //--------------------------------------------------------------------------------------------------
1786 /**
1787  * Mark a message as 'read'.
1788  *
1789  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1790  * function will not return.
1791  */
1792 //--------------------------------------------------------------------------------------------------
1793 void le_sms_MarkRead
1794 (
1795  le_sms_MsgRef_t msgRef
1796  ///< [IN] Messages list.
1797 );
1798 
1799 //--------------------------------------------------------------------------------------------------
1800 /**
1801  * Mark a message as 'unread'.
1802  *
1803  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1804  * function will not return.
1805  */
1806 //--------------------------------------------------------------------------------------------------
1807 void le_sms_MarkUnread
1808 (
1809  le_sms_MsgRef_t msgRef
1810  ///< [IN] Messages list.
1811 );
1812 
1813 //--------------------------------------------------------------------------------------------------
1814 /**
1815  * Get the SMS center address.
1816  *
1817  * Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds
1818  * the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until
1819  * 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.
1820  *
1821  * @return
1822  * - LE_FAULT Service is not available.
1823  * - LE_OVERFLOW Telephone number length exceed the maximum length.
1824  * - LE_OK Function succeeded.
1825  *
1826  */
1827 //--------------------------------------------------------------------------------------------------
1829 (
1830  char* tel,
1831  ///< [OUT] SMS center address number string.
1832  size_t telSize
1833  ///< [IN]
1834 );
1835 
1836 //--------------------------------------------------------------------------------------------------
1837 /**
1838  * Set the SMS center address.
1839  *
1840  * SMS center address number is defined in ITU-T recommendations E.164/E.163.
1841  * E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.
1842  *
1843  * @return
1844  * - LE_FAULT Service is not available..
1845  * - LE_OK Function succeeded.
1846  *
1847  * @note If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it
1848  * is a fatal error, the function will not return.
1849  */
1850 //--------------------------------------------------------------------------------------------------
1852 (
1853  const char* LE_NONNULL tel
1854  ///< [IN] SMS center address number string.
1855 );
1856 
1857 //--------------------------------------------------------------------------------------------------
1858 /**
1859  * Set the preferred SMS storage for incoming messages.
1860  * @return
1861  * - LE_FAULT Function failed.
1862  * - LE_OK Function succeeded.
1863  */
1864 //--------------------------------------------------------------------------------------------------
1866 (
1867  le_sms_Storage_t prefStorage
1868  ///< [IN] storage parameter.
1869 );
1870 
1871 //--------------------------------------------------------------------------------------------------
1872 /**
1873  * Get the preferred SMS storage for incoming messages.
1874  * @return
1875  * - LE_FAULT Function failed.
1876  * - LE_OK Function succeeded.
1877  */
1878 //--------------------------------------------------------------------------------------------------
1880 (
1881  le_sms_Storage_t* prefStoragePtr
1882  ///< [OUT] storage parameter.
1883 );
1884 
1885 //--------------------------------------------------------------------------------------------------
1886 /**
1887  * Activate Cell Broadcast message notification
1888  *
1889  * @return
1890  * - LE_FAULT Function failed.
1891  * - LE_OK Function succeeded.
1892  */
1893 //--------------------------------------------------------------------------------------------------
1895 (
1896  void
1897 );
1898 
1899 //--------------------------------------------------------------------------------------------------
1900 /**
1901  * Deactivate Cell Broadcast message notification
1902  *
1903  * @return
1904  * - LE_FAULT Function failed.
1905  * - LE_OK Function succeeded.
1906  */
1907 //--------------------------------------------------------------------------------------------------
1909 (
1910  void
1911 );
1912 
1913 //--------------------------------------------------------------------------------------------------
1914 /**
1915  * Activate CDMA Cell Broadcast message notification
1916  *
1917  * @return
1918  * - LE_FAULT Function failed.
1919  * - LE_OK Function succeeded.
1920  */
1921 //--------------------------------------------------------------------------------------------------
1923 (
1924  void
1925 );
1926 
1927 //--------------------------------------------------------------------------------------------------
1928 /**
1929  * Deactivate CDMA Cell Broadcast message notification
1930  *
1931  * @return
1932  * - LE_FAULT Function failed.
1933  * - LE_OK Function succeeded.
1934  */
1935 //--------------------------------------------------------------------------------------------------
1937 (
1938  void
1939 );
1940 
1941 //--------------------------------------------------------------------------------------------------
1942 /**
1943  * Add Cell Broadcast message Identifiers range.
1944  *
1945  * @return
1946  * - LE_FAULT Function failed.
1947  * - LE_OK Function succeeded.
1948  */
1949 //--------------------------------------------------------------------------------------------------
1951 (
1952  uint16_t fromId,
1953  ///< [IN] Starting point of the range of cell broadcast message identifier.
1954  uint16_t toId
1955  ///< [IN] Ending point of the range of cell broadcast message identifier.
1956 );
1957 
1958 //--------------------------------------------------------------------------------------------------
1959 /**
1960  * Remove Cell Broadcast message Identifiers range.
1961  *
1962  * @return
1963  * - LE_FAULT Function failed.
1964  * - LE_OK Function succeeded.
1965  */
1966 //--------------------------------------------------------------------------------------------------
1968 (
1969  uint16_t fromId,
1970  ///< [IN] Starting point of the range of cell broadcast message identifier.
1971  uint16_t toId
1972  ///< [IN] Ending point of the range of cell broadcast message identifier.
1973 );
1974 
1975 //--------------------------------------------------------------------------------------------------
1976 /**
1977  * Clear Cell Broadcast message Identifiers.
1978  *
1979  * @return
1980  * - LE_FAULT Function failed.
1981  * - LE_OK Function succeeded.
1982  */
1983 //--------------------------------------------------------------------------------------------------
1985 (
1986  void
1987 );
1988 
1989 //--------------------------------------------------------------------------------------------------
1990 /**
1991  * Add CDMA Cell Broadcast category services.
1992  *
1993  * @return
1994  * - LE_FAULT Function failed.
1995  * - LE_BAD_PARAMETER Parameter is invalid.
1996  * - LE_OK Function succeeded.
1997  */
1998 //--------------------------------------------------------------------------------------------------
2000 (
2001  le_sms_CdmaServiceCat_t serviceCat,
2002  ///< [IN] Service category assignment. Reference to 3GPP2 C.R1001-D
2003  ///< v1.0 Section 9.3.1 Standard Service Category Assignments.
2004  le_sms_Languages_t language
2005  ///< [IN] Language Indicator. Reference to
2006  ///< 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator
2007  ///< Value Assignments
2008 );
2009 
2010 //--------------------------------------------------------------------------------------------------
2011 /**
2012  * Remove CDMA Cell Broadcast category services.
2013  *
2014  * @return
2015  * - LE_FAULT Function failed.
2016  * - LE_BAD_PARAMETER Parameter is invalid.
2017  * - LE_OK Function succeeded.
2018  */
2019 //--------------------------------------------------------------------------------------------------
2021 (
2022  le_sms_CdmaServiceCat_t serviceCat,
2023  ///< [IN] Service category assignment. Reference to 3GPP2 C.R1001-D
2024  ///< v1.0 Section 9.3.1 Standard Service Category Assignments.
2025  le_sms_Languages_t language
2026  ///< [IN] Language Indicator. Reference to
2027  ///< 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator
2028  ///< Value Assignments
2029 );
2030 
2031 //--------------------------------------------------------------------------------------------------
2032 /**
2033  * Clear CDMA Cell Broadcast category services.
2034  *
2035  * @return
2036  * - LE_FAULT Function failed.
2037  * - LE_OK Function succeeded.
2038  */
2039 //--------------------------------------------------------------------------------------------------
2041 (
2042  void
2043 );
2044 
2045 //--------------------------------------------------------------------------------------------------
2046 /**
2047  * Get the number of messages successfully received or sent since last counter reset.
2048  *
2049  * @return
2050  * - LE_OK Function succeeded.
2051  * - LE_BAD_PARAMETER A parameter is invalid.
2052  *
2053  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
2054  * function will not return.
2055  */
2056 //--------------------------------------------------------------------------------------------------
2058 (
2059  le_sms_Type_t messageType,
2060  ///< [IN] Message type
2061  int32_t* messageCountPtr
2062  ///< [OUT] Number of messages
2063 );
2064 
2065 //--------------------------------------------------------------------------------------------------
2066 /**
2067  * Start to count the messages successfully received and sent.
2068  */
2069 //--------------------------------------------------------------------------------------------------
2070 void le_sms_StartCount
2071 (
2072  void
2073 );
2074 
2075 //--------------------------------------------------------------------------------------------------
2076 /**
2077  * Stop to count the messages successfully received and sent.
2078  */
2079 //--------------------------------------------------------------------------------------------------
2080 void le_sms_StopCount
2081 (
2082  void
2083 );
2084 
2085 //--------------------------------------------------------------------------------------------------
2086 /**
2087  * Reset the count of messages successfully received and sent.
2088  */
2089 //--------------------------------------------------------------------------------------------------
2090 void le_sms_ResetCount
2091 (
2092  void
2093 );
2094 
2095 //--------------------------------------------------------------------------------------------------
2096 /**
2097  * Enable SMS Status Report for outgoing messages.
2098  *
2099  * @return
2100  * - LE_OK Function succeeded.
2101  * - LE_FAULT Function failed.
2102  */
2103 //--------------------------------------------------------------------------------------------------
2105 (
2106  void
2107 );
2108 
2109 //--------------------------------------------------------------------------------------------------
2110 /**
2111  * Disable SMS Status Report for outgoing messages.
2112  *
2113  * @return
2114  * - LE_OK Function succeeded.
2115  * - LE_FAULT Function failed.
2116  */
2117 //--------------------------------------------------------------------------------------------------
2119 (
2120  void
2121 );
2122 
2123 //--------------------------------------------------------------------------------------------------
2124 /**
2125  * Get SMS Status Report activation state.
2126  *
2127  * @return
2128  * - LE_OK Function succeeded.
2129  * - LE_BAD_PARAMETER Parameter is invalid.
2130  * - LE_FAULT Function failed.
2131  */
2132 //--------------------------------------------------------------------------------------------------
2134 (
2135  bool* enabledPtr
2136  ///< [OUT] True when SMS Status Report is enabled, false otherwise.
2137 );
2138 
2139 //--------------------------------------------------------------------------------------------------
2140 /**
2141  * Get TP-Message-Reference of SMS Status Report.
2142  * TP-Message-Reference is defined in 3GPP TS 23.040 section 9.2.3.6.
2143  *
2144  * @return
2145  * - LE_OK Function succeeded.
2146  * - LE_BAD_PARAMETER Parameter is invalid.
2147  * - LE_FAULT Function failed.
2148  */
2149 //--------------------------------------------------------------------------------------------------
2151 (
2152  le_sms_MsgRef_t msgRef,
2153  ///< [IN] Reference to the message object.
2154  uint8_t* tpMrPtr
2155  ///< [OUT] 3GPP TS 23.040 TP-Message-Reference.
2156 );
2157 
2158 //--------------------------------------------------------------------------------------------------
2159 /**
2160  * Get TP-Recipient-Address of SMS Status Report.
2161  * TP-Recipient-Address is defined in 3GPP TS 23.040 section 9.2.3.14.
2162  * TP-Recipient-Address Type-of-Address is defined in 3GPP TS 24.011 section 8.2.5.2.
2163  *
2164  * @return
2165  * - LE_OK Function succeeded.
2166  * - LE_BAD_PARAMETER A parameter is invalid.
2167  * - LE_OVERFLOW The Recipient Address length exceeds the length of the provided buffer.
2168  * - LE_FAULT Function failed.
2169  */
2170 //--------------------------------------------------------------------------------------------------
2172 (
2173  le_sms_MsgRef_t msgRef,
2174  ///< [IN] Reference to the message object.
2175  uint8_t* toraPtr,
2176  ///< [OUT] 3GPP TS 24.011 TP-Recipient-Address
2177  ///< Type-of-Address.
2178  char* ra,
2179  ///< [OUT] 3GPP TS 23.040 TP-Recipient-Address.
2180  size_t raSize
2181  ///< [IN]
2182 );
2183 
2184 //--------------------------------------------------------------------------------------------------
2185 /**
2186  * Get TP-Service-Centre-Time-Stamp of SMS Status Report.
2187  * TP-Service-Centre-Time-Stamp is defined in 3GPP TS 23.040 section 9.2.3.11.
2188  *
2189  * @return
2190  * - LE_OK Function succeeded.
2191  * - LE_BAD_PARAMETER A parameter is invalid.
2192  * - LE_OVERFLOW The SC Timestamp length exceeds the length of the provided buffer.
2193  * - LE_FAULT Function failed.
2194  */
2195 //--------------------------------------------------------------------------------------------------
2197 (
2198  le_sms_MsgRef_t msgRef,
2199  ///< [IN] Reference to the message object.
2200  char* scts,
2201  ///< [OUT] 3GPP TS 23.040 TP-Service-Centre-Time-Stamp.
2202  size_t sctsSize
2203  ///< [IN]
2204 );
2205 
2206 //--------------------------------------------------------------------------------------------------
2207 /**
2208  * Get TP-Discharge-Time of SMS Status Report.
2209  * TP-Discharge-Time is defined in 3GPP TS 23.040 section 9.2.3.13.
2210  *
2211  * @return
2212  * - LE_OK Function succeeded.
2213  * - LE_BAD_PARAMETER A parameter is invalid.
2214  * - LE_OVERFLOW The Discharge Time length exceeds the length of the provided buffer.
2215  * - LE_FAULT Function failed.
2216  */
2217 //--------------------------------------------------------------------------------------------------
2219 (
2220  le_sms_MsgRef_t msgRef,
2221  ///< [IN] Reference to the message object.
2222  char* dt,
2223  ///< [OUT] 3GPP TS 23.040 TP-Discharge-Time.
2224  size_t dtSize
2225  ///< [IN]
2226 );
2227 
2228 //--------------------------------------------------------------------------------------------------
2229 /**
2230  * Get TP-Status of SMS Status Report.
2231  * TP-Status is defined in 3GPP TS 23.040 section 9.2.3.15.
2232  *
2233  * @return
2234  * - LE_OK Function succeeded.
2235  * - LE_BAD_PARAMETER A parameter is invalid.
2236  * - LE_FAULT Function failed.
2237  */
2238 //--------------------------------------------------------------------------------------------------
2240 (
2241  le_sms_MsgRef_t msgRef,
2242  ///< [IN] Reference to the message object.
2243  uint8_t* stPtr
2244  ///< [OUT] 3GPP TS 23.040 TP-Status.
2245 );
2246 
2247 #endif // LE_SMS_INTERFACE_H_INCLUDE_GUARD
General News Regional.
Definition: le_sms_interface.h:655
French language.
Definition: le_sms_interface.h:620
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:838
Definition: le_sms_interface.h:785
le_result_t le_sms_GetCellBroadcastId(le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)
Unknown message status.
Definition: le_sms_interface.h:603
le_sms_CdmaServiceCat_t
Definition: le_sms_interface.h:643
Definition: le_sms_interface.h:796
TP-VPF not supported.
Definition: le_sms_interface.h:924
Unidentified subscriber.
Definition: le_sms_interface.h:852
UCS2 message format.
Definition: le_sms_interface.h:551
Card Application Toolkit Protocol Teleservice.
Definition: le_sms_interface.h:709
Definition: le_sms_interface.h:782
Spanish language.
Definition: le_sms_interface.h:622
Restaurants.
Definition: le_sms_interface.h:691
le_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:591
General News Local.
Definition: le_sms_interface.h:653
General News International.
Definition: le_sms_interface.h:659
(U)SIM data download error
Definition: le_sms_interface.h:938
Administrative.
Definition: le_sms_interface.h:649
Command cannot be actioned.
Definition: le_sms_interface.h:904
Memory capacity exceeded.
Definition: le_sms_interface.h:848
Area Traffic Reports.
Definition: le_sms_interface.h:687
void le_sms_StartCount(void)
le_sms_ErrorCode_t
Definition: le_sms_interface.h:836
Unspecified TP-PID error.
Definition: le_sms_interface.h:895
Short Message Type 0 not supported.
Definition: le_sms_interface.h:891
le_result_t
Definition: le_basics.h:35
struct le_sms_MsgList * le_sms_MsgListRef_t
Definition: le_sms_interface.h:963
le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode(le_sms_MsgRef_t msgRef)
Maintenance.
Definition: le_sms_interface.h:651
struct le_sms_Msg * le_sms_MsgRef_t
Definition: le_sms_interface.h:955
Business News Local.
Definition: le_sms_interface.h:661
SC busy.
Definition: le_sms_interface.h:912
(U)SIM SMS storage full
Definition: le_sms_interface.h:928
Definition: le_sms_interface.h:897
le_result_t le_sms_ClearCellBroadcastIds(void)
Definition: le_sms_interface.h:777
void le_sms_MarkUnread(le_sms_MsgRef_t msgRef)
le_sms_MsgRef_t le_sms_Create(void)
Entertainment News Regional.
Definition: le_sms_interface.h:679
Definition: le_sms_interface.h:758
Interworking, unspecified.
Definition: le_sms_interface.h:887
Definition: le_sms_interface.h:769
le_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:908
Definition: le_sms_interface.h:749
Unknown or Unspecified.
Definition: le_sms_interface.h:645
Hebrew language.
Definition: le_sms_interface.h:630
Destination out of order.
Definition: le_sms_interface.h:850
A terminal problem other than described above.
Definition: le_sms_interface.h:780
Definition: le_sms_interface.h:788
size_t le_sms_GetUserdataLen(le_sms_MsgRef_t msgRef)
le_result_t le_sms_GetTpRa(le_sms_MsgRef_t msgRef, uint8_t *toraPtr, char *ra, size_t raSize)
Definition: le_sms_interface.h:808
le_result_t le_sms_SetTimeout(le_sms_MsgRef_t msgRef, uint32_t timeout)
Call barred.
Definition: le_sms_interface.h:842
Text message format.
Definition: le_sms_interface.h:547
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:395
Destination SME barred.
Definition: le_sms_interface.h:920
Local weather.
Definition: le_sms_interface.h:685
Local Airplane Flight Schedules.
Definition: le_sms_interface.h:689
void le_sms_GetErrorCode(le_sms_MsgRef_t msgRef, le_sms_ErrorCode_t *rpCausePtr, le_sms_ErrorCode_t *tpCausePtr)
Unspecified TP-DCS error.
Definition: le_sms_interface.h:902
A network problem other than identified above.
Definition: le_sms_interface.h:756
SMS mobile terminated message.
Definition: le_sms_interface.h:566
le_result_t le_sms_ActivateCellBroadcast(void)
Resources unavailable, unspecified.
Definition: le_sms_interface.h:864
le_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:746
le_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)
PDU message format.
Definition: le_sms_interface.h:545
le_sms_Format_t
Definition: le_sms_interface.h:543
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:794
le_sms_Status_t
Definition: le_sms_interface.h:583
Definition: le_sms_interface.h:761
le_result_t le_sms_ActivateCdmaCellBroadcast(void)
Advertisements.
Definition: le_sms_interface.h:697
Facility rejected.
Definition: le_sms_interface.h:854
Sim SMS storage.
Definition: le_sms_interface.h:726
The SMS Destination Address is invalid.
Definition: le_sms_interface.h:744
Resources facility not implemented.
Definition: le_sms_interface.h:868
Message present in the message storage has not been read.
Definition: le_sms_interface.h:587
Invalid mandatory information.
Definition: le_sms_interface.h:875
Cannot replace short message.
Definition: le_sms_interface.h:893
void(* le_sms_CallbackResultFunc_t)(le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)
Definition: le_sms_interface.h:988
void(* le_sms_FullStorageHandlerFunc_t)(le_sms_Storage_t storage, void *contextPtr)
Definition: le_sms_interface.h:1018
le_sms_Type_t
Definition: le_sms_interface.h:564
Definition: le_sms_interface.h:879
SMS Status Report.
Definition: le_sms_interface.h:572
le_sms_FullStorageEventHandlerRef_t le_sms_AddFullStorageEventHandler(le_sms_FullStorageHandlerFunc_t handlerPtr, void *contextPtr)
Congestion.
Definition: le_sms_interface.h:862
le_sms_Languages_t
Definition: le_sms_interface.h:614
Undefined reason.
Definition: le_sms_interface.h:825
le_result_t le_sms_DeactivateCellBroadcast(void)
English language.
Definition: le_sms_interface.h:618
Business News Regional.
Definition: le_sms_interface.h:663
struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_t
Definition: le_sms_interface.h:979
le_result_t le_sms_GetCellBroadcastSerialNumber(le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)
Message sending has Failed due to timeout.
Definition: le_sms_interface.h:601
Entertainment News International.
Definition: le_sms_interface.h:683
le_result_t le_sms_DisableStatusReport(void)
Lodgings.
Definition: le_sms_interface.h:693
void le_sms_DisconnectService(void)
Network out of order.
Definition: le_sms_interface.h:858
Unknow or Unspecified language.
Definition: le_sms_interface.h:616
le_result_t le_sms_TryConnectService(void)
Temporary failure.
Definition: le_sms_interface.h:860
le_result_t le_sms_AddCellBroadcastIds(uint16_t fromId, uint16_t toId)
le_result_t le_sms_SetText(le_sms_MsgRef_t msgRef, const char *LE_NONNULL text)
le_result_t le_sms_SetBinary(le_sms_MsgRef_t msgRef, const uint8_t *binPtr, size_t binSize)
Reserved.
Definition: le_sms_interface.h:844
Medical/Health/Hospitals.
Definition: le_sms_interface.h:703
Memory capacity exceeded.
Definition: le_sms_interface.h:934
Technology News.
Definition: le_sms_interface.h:705
le_result_t le_sms_SetPreferredStorage(le_sms_Storage_t prefStorage)
le_result_t le_sms_DeleteFromStorage(le_sms_MsgRef_t msgRef)
Stock Quotes.
Definition: le_sms_interface.h:699
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:840
le_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:866
Platform specific code.
Definition: le_sms_interface.h:942
Definition: le_sms_interface.h:814
Business News National.
Definition: le_sms_interface.h:665
Message has been in the sending pool.
Definition: le_sms_interface.h:595
Definition: le_sms_interface.h:802
le_result_t le_sms_GetPreferredStorage(le_sms_Storage_t *prefStoragePtr)
Definition: le_sms_interface.h:741
Protocol error, unspecified.
Definition: le_sms_interface.h:885
Invalid SME address.
Definition: le_sms_interface.h:918
Sports News Regional.
Definition: le_sms_interface.h:671
size_t le_sms_GetPDULen(le_sms_MsgRef_t msgRef)
TP-VP not supporte.
Definition: le_sms_interface.h:926
le_result_t le_sms_DeactivateCdmaCellBroadcast(void)
No SMS storage capability in (U)SIM.
Definition: le_sms_interface.h:930
struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_t
Definition: le_sms_interface.h:971
le_result_t le_sms_RemoveCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)
SM Rejected-Duplicate SM.
Definition: le_sms_interface.h:922
le_result_t le_sms_SetSmsCenterAddress(const char *LE_NONNULL tel)
le_sms_ErrorCode3GPP2_t
Definition: le_sms_interface.h:739
le_sms_MsgRef_t le_sms_GetFirst(le_sms_MsgListRef_t msgListRef)
Definition: le_sms_interface.h:882
void(* le_sms_RxMessageHandlerFunc_t)(le_sms_MsgRef_t msgRef, void *contextPtr)
Definition: le_sms_interface.h:1004
Delivery is not currently possible.
Definition: le_sms_interface.h:772
Definition: le_sms_interface.h:752
Message sending has Failed.
Definition: le_sms_interface.h:599
Unknown message format.
Definition: le_sms_interface.h:553
Undefined reason.
Definition: le_sms_interface.h:944
void le_sms_ResetCount(void)
Unknown subscriber.
Definition: le_sms_interface.h:856
Definition: le_sms_interface.h:799
SMS Cell Broadcast message.
Definition: le_sms_interface.h:570
le_result_t le_sms_SetPDU(le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)
SC system failure.
Definition: le_sms_interface.h:916
Non volatile memory storage.
Definition: le_sms_interface.h:724
Definition: le_sms_interface.h:811
Message class not supported.
Definition: le_sms_interface.h:900
le_result_t le_sms_RemoveCellBroadcastIds(uint16_t fromId, uint16_t toId)
void le_sms_ConnectService(void)
Binary message format.
Definition: le_sms_interface.h:549
No SC subscription.
Definition: le_sms_interface.h:914
Korean language.
Definition: le_sms_interface.h:626
le_sms_MsgRef_t le_sms_SendText(const char *LE_NONNULL destStr, const char *LE_NONNULL textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)
le_result_t le_sms_SetDestination(le_sms_MsgRef_t msgRef, const char *LE_NONNULL dest)
Other general problems.
Definition: le_sms_interface.h:821
Japanese language.
Definition: le_sms_interface.h:624
Definition: le_sms_interface.h:774
Retail Directory.
Definition: le_sms_interface.h:695
Message saved in the message storage has been sent.
Definition: le_sms_interface.h:589
le_result_t le_sms_GetTpDt(le_sms_MsgRef_t msgRef, char *dt, size_t dtSize)
Sementically incorect message.
Definition: le_sms_interface.h:873
Definition: le_sms_interface.h:805
le_result_t le_sms_AddCdmaCellBroadcastServices(le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)
Error in MS.
Definition: le_sms_interface.h:932
Multicategory.
Definition: le_sms_interface.h:707
(U)SIM Application Toolkit busy
Definition: le_sms_interface.h:936
le_result_t le_sms_GetTpMr(le_sms_MsgRef_t msgRef, uint8_t *tpMrPtr)
Unspecified error cause.
Definition: le_sms_interface.h:940
Business News International.
Definition: le_sms_interface.h:667
TPDU not supported.
Definition: le_sms_interface.h:910
Message has been sent.
Definition: le_sms_interface.h:593
Sports News Local.
Definition: le_sms_interface.h:669
le_result_t le_sms_EnableStatusReport(void)
Definition: le_sms_interface.h:817
Sports News National.
Definition: le_sms_interface.h:673
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:677
Definition: le_sms_interface.h:791
Employment Opportunities.
Definition: le_sms_interface.h:701
Chinese language.
Definition: le_sms_interface.h:628
le_result_t le_sms_GetCount(le_sms_Type_t messageType, int32_t *messageCountPtr)
le_sms_Type_t le_sms_GetType(le_sms_MsgRef_t msgRef)
Message has not been sent.
Definition: le_sms_interface.h:597
Emergency Broadcast.
Definition: le_sms_interface.h:647
void le_sms_RemoveFullStorageEventHandler(le_sms_FullStorageEventHandlerRef_t handlerRef)
le_result_t le_sms_GetTpSt(le_sms_MsgRef_t msgRef, uint8_t *stPtr)
Platform specific code.
Definition: le_sms_interface.h:823
Undefined storage.
Definition: le_sms_interface.h:728
Message present in the message storage has been read.
Definition: le_sms_interface.h:585
General News National.
Definition: le_sms_interface.h:657
le_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)
Command unsupported.
Definition: le_sms_interface.h:906
Telematic interworking not supported.
Definition: le_sms_interface.h:889
le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler(le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)
Definition: le_sms_interface.h:766
le_result_t le_sms_IsStatusReportEnabled(bool *enabledPtr)
Message type nonexistent or not implemented.
Definition: le_sms_interface.h:877
Entertainment News National.
Definition: le_sms_interface.h:681
Short message transfer rejected.
Definition: le_sms_interface.h:846
void le_sms_MarkRead(le_sms_MsgRef_t msgRef)
le_result_t le_sms_GetTpScTs(le_sms_MsgRef_t msgRef, char *scts, size_t sctsSize)
le_sms_Storage_t
Definition: le_sms_interface.h:722
Sports News International.
Definition: le_sms_interface.h:675
SMS mobile originated message.
Definition: le_sms_interface.h:568
void le_sms_StopCount(void)