le_sms_interface.h

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