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