le_info_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_info Modem Information
12  *
13  * @ref le_info_interface.h "API Reference"
14  *
15  * <HR>
16  *
17  * This file contains prototype definitions for Modem Information APIs.
18  *
19  * @section le_info_binding IPC interfaces binding
20  *
21  * All the functions of this API are provided by the @b modemService.
22  *
23  * Here's a code sample binding to modem services:
24  * @verbatim
25  bindings:
26  {
27  clientExe.clientComponent.le_info -> modemService.le_info
28  }
29  @endverbatim
30  *
31  * @section le_info_version Query Firmware Version
32  *
33  * le_info_GetFirmwareVersion() is used to query the current firmware version.
34  * le_info_GetBootloaderVersion() is used to query the current bootloader version.
35  * In both cases, the version is returned as a human readable string.
36  *
37  * The linux kernel version can be queried using standard linux methods, such as the uname
38  * command, or the uname() API.
39  *
40  * @section le_info_model Query Device information
41  *
42  * le_info_GetDeviceModel() is used to retrieve the target hardware platform identity.
43  *
44  * le_info_GetImei() is used to retrieve the International Mobile Equipment Identity (IMEI).
45  *
46  * le_info_GetMeid() is used to retrieve the CDMA device Mobile Equipment Identifier (MEID).
47  *
48  * le_info_GetEsn() is used to retrieve Electronic Serial Number (ESN) of the device.
49  *
50  * le_info_GetMdn() is used to retrieve the Mobile Directory Number (MDN) of the device.
51  *
52  * le_info_GetMin() is used to retrieve the CDMA Mobile Identification Number (MIN).
53  *
54  * le_info_GetPrlVersion() is used to retrieve the CDMA version of Preferred Roaming List (PRL).
55  *
56  * le_info_GetPrlOnlyPreference() is used to retrieve the CDMA Preferred Roaming List (PRL)
57  * only preferences status.
58  *
59  * le_info_GetNai() is used to retrieve the CDMA Network Access Identifier (NAI) string.
60  *
61  * le_info_GetManufacturerName() is used to retrieve the Manufacturer name.
62  *
63  * le_info_GetPriId() is used to retrieve the Product Requirement Information Identifier (PRI ID)
64  * Part Number and the Revision number.
65  * The Part number is a 7-digit string. Revision Number string contains 2-digit major
66  * version + '.' char + 2-digit minor version (xx.xx).
67  *
68  * le_info_GetPlatformSerialNumber() is used to retrieve the Platform Serial Number (PSN) string.
69  *
70  * <HR>
71  *
72  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
73  */
74 /**
75  * @file le_info_interface.h
76  *
77  * Legato @ref c_info include file.
78  *
79  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
80  */
81 
82 #ifndef LE_INFO_INTERFACE_H_INCLUDE_GUARD
83 #define LE_INFO_INTERFACE_H_INCLUDE_GUARD
84 
85 
86 #include "legato.h"
87 
88 //--------------------------------------------------------------------------------------------------
89 /**
90  *
91  * Connect the current client thread to the service providing this API. Block until the service is
92  * available.
93  *
94  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
95  * called before any other functions in this API. Normally, ConnectService is automatically called
96  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
97  *
98  * This function is created automatically.
99  */
100 //--------------------------------------------------------------------------------------------------
102 (
103  void
104 );
105 
106 //--------------------------------------------------------------------------------------------------
107 /**
108  *
109  * Try to connect the current client thread to the service providing this API. Return with an error
110  * if the service is not available.
111  *
112  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
113  * called before any other functions in this API. Normally, ConnectService is automatically called
114  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
115  *
116  * This function is created automatically.
117  *
118  * @return
119  * - LE_OK if the client connected successfully to the service.
120  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
121  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
122  * - LE_COMM_ERROR if the Service Directory cannot be reached.
123  */
124 //--------------------------------------------------------------------------------------------------
126 (
127  void
128 );
129 
130 //--------------------------------------------------------------------------------------------------
131 /**
132  *
133  * Disconnect the current client thread from the service providing this API.
134  *
135  * Normally, this function doesn't need to be called. After this function is called, there's no
136  * longer a connection to the service, and the functions in this API can't be used. For details, see
137  * @ref apiFilesC_client.
138  *
139  * This function is created automatically.
140  */
141 //--------------------------------------------------------------------------------------------------
143 (
144  void
145 );
146 
147 
148 //--------------------------------------------------------------------------------------------------
149 /**
150  * Maximum IMEI length (15 digits), excluding any termination character.
151  */
152 //--------------------------------------------------------------------------------------------------
153 #define LE_INFO_IMEI_MAX_LEN 15
154 
155 
156 //--------------------------------------------------------------------------------------------------
157 /**
158  * Maximum IMEI length (15 digits)
159  * One extra byte is added for the null character.
160  */
161 //--------------------------------------------------------------------------------------------------
162 #define LE_INFO_IMEI_MAX_BYTES 16
163 
164 
165 //--------------------------------------------------------------------------------------------------
166 /**
167  * Maximum length of a version string, excluding any termination character.
168  */
169 //--------------------------------------------------------------------------------------------------
170 #define LE_INFO_MAX_VERS_LEN 256
171 
172 
173 //--------------------------------------------------------------------------------------------------
174 /**
175  * Maximum length of a version string
176  * One extra byte is added for the null character.
177  */
178 //--------------------------------------------------------------------------------------------------
179 #define LE_INFO_MAX_VERS_BYTES 257
180 
181 
182 //--------------------------------------------------------------------------------------------------
183 /**
184  * Maximum length of a model string, excluding any termination character.
185  */
186 //--------------------------------------------------------------------------------------------------
187 #define LE_INFO_MAX_MODEL_LEN 256
188 
189 
190 //--------------------------------------------------------------------------------------------------
191 /**
192  * Maximum length of a model string
193  * One extra byte is added for the null character.
194  */
195 //--------------------------------------------------------------------------------------------------
196 #define LE_INFO_MAX_MODEL_BYTES 257
197 
198 
199 //--------------------------------------------------------------------------------------------------
200 /**
201  * Maximum length of an Electronic Serial Number (ESN) string, excluding any termination character.
202  */
203 //--------------------------------------------------------------------------------------------------
204 #define LE_INFO_MAX_ESN_LEN 32
205 
206 
207 //--------------------------------------------------------------------------------------------------
208 /**
209  * Maximum length of an Electronic Serial Number (ESN) string.
210  * One extra byte is added for the null character.
211  */
212 //--------------------------------------------------------------------------------------------------
213 #define LE_INFO_MAX_ESN_BYTES 33
214 
215 
216 //--------------------------------------------------------------------------------------------------
217 /**
218  * Maximum length of an Mobile Equipment Identifier (MEID) string, excluding any termination
219  * character.
220  */
221 //--------------------------------------------------------------------------------------------------
222 #define LE_INFO_MAX_MEID_LEN 32
223 
224 
225 //--------------------------------------------------------------------------------------------------
226 /**
227  * Maximum length of an Mobile Equipment Identifier (MEID) string.
228  * One extra byte is added for the null character.
229  */
230 //--------------------------------------------------------------------------------------------------
231 #define LE_INFO_MAX_MEID_BYTES 33
232 
233 
234 //--------------------------------------------------------------------------------------------------
235 /**
236  * Maximum length of an Mobile Directory Number (MDN) string, excluding any termination character.
237  */
238 //--------------------------------------------------------------------------------------------------
239 #define LE_INFO_MAX_MDN_LEN 32
240 
241 
242 //--------------------------------------------------------------------------------------------------
243 /**
244  * Maximum length of an Mobile Directory Number (MDN) string.
245  * One extra byte is added for the null character.
246  */
247 //--------------------------------------------------------------------------------------------------
248 #define LE_INFO_MAX_MDN_BYTES 33
249 
250 
251 //--------------------------------------------------------------------------------------------------
252 /**
253  * Maximum length of an Mobile Station ISDN Number (MSISDN) string, excluding any termination
254  * character.
255  */
256 //--------------------------------------------------------------------------------------------------
257 #define LE_INFO_MAX_MIN_LEN 32
258 
259 
260 //--------------------------------------------------------------------------------------------------
261 /**
262  * Maximum length of an Mobile Station ISDN Number (MSISDN) string.
263  * One extra byte is added for the null character.
264  */
265 //--------------------------------------------------------------------------------------------------
266 #define LE_INFO_MAX_MIN_BYTES 33
267 
268 
269 //--------------------------------------------------------------------------------------------------
270 /**
271  * Maximum length of an Mobile Station ISDN Number (NAI) string, excluding any termination
272  * character.
273  */
274 //--------------------------------------------------------------------------------------------------
275 #define LE_INFO_MAX_NAI_LEN 72
276 
277 
278 //--------------------------------------------------------------------------------------------------
279 /**
280  * Maximum length of an Mobile Station ISDN Number (NAI) string.
281  * One extra byte is added for the null character.
282  */
283 //--------------------------------------------------------------------------------------------------
284 #define LE_INFO_MAX_NAI_BYTES 73
285 
286 
287 //--------------------------------------------------------------------------------------------------
288 /**
289  * Maximum length of an Manufacturer Name string, excluding any termination character.
290  */
291 //--------------------------------------------------------------------------------------------------
292 #define LE_INFO_MAX_MFR_NAME_LEN 128
293 
294 
295 //--------------------------------------------------------------------------------------------------
296 /**
297  * Maximum length of an Manufacturer Name string.
298  * One extra byte is added for the null character.
299  */
300 //--------------------------------------------------------------------------------------------------
301 #define LE_INFO_MAX_MFR_NAME_BYTES 129
302 
303 
304 //--------------------------------------------------------------------------------------------------
305 /**
306  * Maximum length of the Product Requirement Information Identifier (PRI ID) Part Number string
307  * , excluding any termination character.
308  */
309 //--------------------------------------------------------------------------------------------------
310 #define LE_INFO_MAX_PRIID_PN_LEN 7
311 
312 
313 //--------------------------------------------------------------------------------------------------
314 /**
315  * Maximum length of the Product Requirement Information Identifier (PRI ID) Part Number string.
316  * One extra byte is added for the null character.
317  */
318 //--------------------------------------------------------------------------------------------------
319 #define LE_INFO_MAX_PRIID_PN_BYTES 8
320 
321 
322 //--------------------------------------------------------------------------------------------------
323 /**
324  * Maximum length of the Product Requirement Information Identifier (PRI ID) Revision Number string
325  * , excluding any termination character.
326  */
327 //--------------------------------------------------------------------------------------------------
328 #define LE_INFO_MAX_PRIID_REV_LEN 5
329 
330 
331 //--------------------------------------------------------------------------------------------------
332 /**
333  * Maximum length of the Product Requirement Information Identifier (PRI ID) Revision Number string.
334  * One extra byte is added for the null character.
335  */
336 //--------------------------------------------------------------------------------------------------
337 #define LE_INFO_MAX_PRIID_REV_BYTES 6
338 
339 
340 //--------------------------------------------------------------------------------------------------
341 /**
342  * Maximum length of an Platform Serial Number (PSN) string, excluding any termination character.
343  */
344 //--------------------------------------------------------------------------------------------------
345 #define LE_INFO_MAX_PSN_LEN 14
346 
347 
348 //--------------------------------------------------------------------------------------------------
349 /**
350  * Maximum length of an Platform Serial Number (PSN) string.
351  * One extra byte is added for the null character.
352  */
353 //--------------------------------------------------------------------------------------------------
354 #define LE_INFO_MAX_PSN_BYTES 15
355 
356 //--------------------------------------------------------------------------------------------------
357 /**
358  * Retrieve the International Mobile Equipment Identity (IMEI).
359  *
360  * @return LE_FAULT Function failed to retrieve the IMEI.
361  * @return LE_OVERFLOW IMEI length exceed the maximum length.
362  * @return LE_OK Function succeeded.
363  *
364  * @note If the caller passes a bad pointer into this function, it's a fatal error; the
365  * function will not return.
366  */
367 //--------------------------------------------------------------------------------------------------
369 (
370  char* imei,
371  ///< [OUT] IMEI string.
372 
373  size_t imeiNumElements
374  ///< [IN]
375 );
376 
377 //--------------------------------------------------------------------------------------------------
378 /**
379  * Get the firmware version string
380  *
381  * @return
382  * - LE_OK on success
383  * - LE_NOT_FOUND if the version string is not available
384  * - LE_OVERFLOW if version string to big to fit in provided buffer
385  * - LE_FAULT for any other errors
386  */
387 //--------------------------------------------------------------------------------------------------
389 (
390  char* version,
391  ///< [OUT] Firmware version string
392 
393  size_t versionNumElements
394  ///< [IN]
395 );
396 
397 //--------------------------------------------------------------------------------------------------
398 /**
399  * Get the bootloader version string
400  *
401  * @return
402  * - LE_OK on success
403  * - LE_NOT_FOUND if the version string is not available
404  * - LE_OVERFLOW if version string to big to fit in provided buffer
405  * - LE_FAULT for any other errors
406  */
407 //--------------------------------------------------------------------------------------------------
409 (
410  char* version,
411  ///< [OUT] Bootloader version string
412 
413  size_t versionNumElements
414  ///< [IN]
415 );
416 
417 //--------------------------------------------------------------------------------------------------
418 /**
419  * Get the device model identity (Target Hardware Platform).
420  *
421  * @return
422  * - LE_OK The function succeeded.
423  * - LE_FAULT The function failed to get the value.
424  * - LE_OVERFLOW The device model identity length exceed the maximum length.
425  */
426 //--------------------------------------------------------------------------------------------------
428 (
429  char* modelPtr,
430  ///< [OUT] The model identity string (null-terminated).
431 
432  size_t modelPtrNumElements
433  ///< [IN]
434 );
435 
436 //--------------------------------------------------------------------------------------------------
437 /**
438  * Get the CDMA device Mobile Equipment Identifier (MEID).
439  *
440  * @return
441  * - LE_OK The function succeeded.
442  * - LE_FAULT The function failed to get the value.
443  * - LE_OVERFLOW The device Mobile Equipment identifier length exceed the maximum length.
444  */
445 //--------------------------------------------------------------------------------------------------
447 (
448  char* meidStr,
449  ///< [OUT] The Mobile Equipment identifier (MEID)
450  ///< string (null-terminated).
451 
452  size_t meidStrNumElements
453  ///< [IN]
454 );
455 
456 //--------------------------------------------------------------------------------------------------
457 /**
458  * Get the CDMA Electronic Serial Number (ESN) of the device.
459  *
460  * @return
461  * - LE_OK The function succeeded.
462  * - LE_FAULT The function failed to get the value.
463  * - LE_OVERFLOW The Electronic Serial Number length exceed the maximum length.
464  */
465 //--------------------------------------------------------------------------------------------------
467 (
468  char* esnStr,
469  ///< [OUT] The Electronic Serial Number (ESN) of the device.
470  ///< string (null-terminated).
471 
472  size_t esnStrNumElements
473  ///< [IN]
474 );
475 
476 //--------------------------------------------------------------------------------------------------
477 /**
478  * Get the CDMA Mobile Directory Number (MDN) of the device.
479  *
480  * @return
481  * - LE_OK The function succeeded.
482  * - LE_FAULT The function failed to get the value.
483  * - LE_OVERFLOW The Mobile Directory Number length exceed the maximum length.
484  */
485 //--------------------------------------------------------------------------------------------------
487 (
488  char* mdnStr,
489  ///< [OUT] The Mobile Directory Number (MDN)
490  ///< string (null-terminated).
491 
492  size_t mdnStrNumElements
493  ///< [IN]
494 );
495 
496 //--------------------------------------------------------------------------------------------------
497 /**
498  * Get the CDMA version of Preferred Roaming List (PRL).
499  *
500  * @return
501  * - LE_OK The function succeeded.
502  * - LE_NOT_FOUND The information is not availble.
503  * - LE_FAULT The function failed to get the value.
504  */
505 //--------------------------------------------------------------------------------------------------
507 (
508  uint16_t* prlVersionPtr
509  ///< [OUT] The Preferred Roaming List (PRL) version.
510 );
511 
512 //--------------------------------------------------------------------------------------------------
513 /**
514  * Get the CDMA Preferred Roaming List (PRL) only preferences status.
515  *
516  * @return
517  * - LE_OK The function succeeded.
518  * - LE_NOT_FOUND The information is not availble.
519  * - LE_FAULT The function failed to get the value.
520  */
521 //--------------------------------------------------------------------------------------------------
523 (
524  bool* prlOnlyPreferencePtr
525  ///< [OUT] The CDMA Preferred Roaming List only preferences status.
526 );
527 
528 //--------------------------------------------------------------------------------------------------
529 /**
530  * Get the CDMA Mobile Identification Number (MIN).
531  *
532  * @return
533  * - LE_OK The function succeeded.
534  * - LE_FAULT The function failed to get the value.
535  * - LE_OVERFLOW The CDMA Mobile Identification Number length exceed the maximum length.
536  */
537 //--------------------------------------------------------------------------------------------------
539 (
540  char* msisdnStr,
541  ///< [OUT] The Mobile Identification Number (MIN)
542  ///< string (null-terminated).
543 
544  size_t msisdnStrNumElements
545  ///< [IN]
546 );
547 
548 //--------------------------------------------------------------------------------------------------
549 /**
550  * Get the CDMA Network Access Identifier (NAI) string in ASCII text.
551  *
552  * @return
553  * - LE_OK The function succeeded.
554  * - LE_FAULT The function failed to get the value.
555  * - LE_OVERFLOW The Network Access Identifier (NAI) length exceed the maximum length.
556  */
557 //--------------------------------------------------------------------------------------------------
559 (
560  char* naiStr,
561  ///< [OUT] The Network Access Identifier (NAI)
562  ///< string (null-terminated).
563 
564  size_t naiStrNumElements
565  ///< [IN]
566 );
567 
568 //--------------------------------------------------------------------------------------------------
569 /**
570  * Get the Manufacturer Name string in ASCII text.
571  *
572  * @return
573  * - LE_OK The function succeeded.
574  * - LE_FAULT The function failed to get the value.
575  * - LE_OVERFLOW The Manufacturer Name length exceed the maximum length.
576  */
577 //--------------------------------------------------------------------------------------------------
579 (
580  char* mfrNameStr,
581  ///< [OUT] The Manufacturer Name string (null-terminated).
582 
583  size_t mfrNameStrNumElements
584  ///< [IN]
585 );
586 
587 //--------------------------------------------------------------------------------------------------
588 /**
589  * Get the Product Requirement Information Part Number and Revision Number strings in ASCII text.
590  *
591  * @return
592  * - LE_OK The function succeeded.
593  * - LE_FAULT The function failed to get the value.
594  * - LE_OVERFLOW The Part or the Revision Number strings length exceed the maximum length.
595  */
596 //--------------------------------------------------------------------------------------------------
598 (
599  char* priIdPnStr,
600  ///< [OUT] The Product Requirement Information Identifier
601  ///< (PRI ID) Part Number string (null-terminated).
602 
603  size_t priIdPnStrNumElements,
604  ///< [IN]
605 
606  char* priIdRevStr,
607  ///< [OUT] The Product Requirement Information Identifier
608  ///< (PRI ID) Revision Number string
609  ///< (null-terminated).
610 
611  size_t priIdRevStrNumElements
612  ///< [IN]
613 );
614 
615 //--------------------------------------------------------------------------------------------------
616 /**
617  * Get the Platform Serial Number (PSN) string.
618  *
619  * @return
620  * - LE_OK on success
621  * - LE_OVERFLOW if Platform Serial Number to big to fit in provided buffer
622  * - LE_FAULT for any other errors
623  */
624 //--------------------------------------------------------------------------------------------------
626 (
627  char* platformSerialNumberStr,
628  ///< [OUT] Platform Serial Number string.
629 
630  size_t platformSerialNumberStrNumElements
631  ///< [IN]
632 );
633 
634 
635 #endif // LE_INFO_INTERFACE_H_INCLUDE_GUARD
636 
le_result_t le_info_GetPrlOnlyPreference(bool *prlOnlyPreferencePtr)
le_result_t le_info_GetNai(char *naiStr, size_t naiStrNumElements)
void le_info_DisconnectService(void)
le_result_t
Definition: le_basics.h:35
le_result_t le_info_GetManufacturerName(char *mfrNameStr, size_t mfrNameStrNumElements)
void le_info_ConnectService(void)
le_result_t le_info_GetPrlVersion(uint16_t *prlVersionPtr)
le_result_t le_info_GetEsn(char *esnStr, size_t esnStrNumElements)
le_result_t le_info_GetPlatformSerialNumber(char *platformSerialNumberStr, size_t platformSerialNumberStrNumElements)
le_result_t le_info_GetMin(char *msisdnStr, size_t msisdnStrNumElements)
le_result_t le_info_GetBootloaderVersion(char *version, size_t versionNumElements)
le_result_t le_info_GetPriId(char *priIdPnStr, size_t priIdPnStrNumElements, char *priIdRevStr, size_t priIdRevStrNumElements)
le_result_t le_info_GetDeviceModel(char *modelPtr, size_t modelPtrNumElements)
le_result_t le_info_GetMdn(char *mdnStr, size_t mdnStrNumElements)
le_result_t le_info_GetImei(char *imei, size_t imeiNumElements)
le_result_t le_info_TryConnectService(void)
le_result_t le_info_GetFirmwareVersion(char *version, size_t versionNumElements)
le_result_t le_info_GetMeid(char *meidStr, size_t meidStrNumElements)