le_avc_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_le_avc AirVantage Connector
12  *
13  * @ref le_avc_interface.h "API Reference" <br>
14  * @ref howToAVConnect "How To Connect"
15  *
16  * <HR>
17  *
18  * The AirVantage connector service provides an API to communicate with the AirVantage server.
19  *
20  * @section c_le_avc_update Firmware/Application Update
21  *
22  * The API for firmware/application update is divided into two parts:
23  * - Allow a control app to contact the server for pending updates. If available,
24  * can select to download or install the update.
25  * <br>
26  * - Allow an app to block an update from being installed. An app may need this if it's
27  * performing a critical operation that can't be interrupted (e.g., eCall). This is necessary
28  * as installing an update will cause the app to restart (either the app itself needs to restart
29  * or a firmware change causes the modem to reset).
30  *
31  * @subsection c_le_avc_update_control Update Control
32  *
33  * A control app can start a session with an AirVantage server to determine if there
34  * is a pending update. This is done with le_avc_StartSession(). The current session can be
35  * stopped using le_avc_StopSession(). This cancels any query for pending update, or suspends a
36  * download in progress; however, it <b>won't stop</b> an install in progress.
37  *
38  * The status of a pending update is sent to the control app using a notification.
39  * The control app can use le_avc_AddStatusEventHandler() to register a handler function to
40  * receive this notification. The notification will be received after a session is started using
41  * le_avc_StartSession(). Sometimes, the modem firmware may decide to start a session with
42  * the AirVantage server. In this case, the notification could also be received, even if the
43  * control app has not explicitly called le_avc_StartSession().
44  *
45  * There can only be one pending update. To query the type of update, use le_avc_GetUpdateType().
46  * If it's an app update, then le_avc_GetAppUpdateName() can be used to get the name of
47  * the app.
48  *
49  * If a download is pending, then le_avc_AcceptDownload() can be used to allow the update to be
50  * downloaded. If this API is called while no AirVantage session is active, calling this API will
51  * initiate an AirVantage session. To defer the decision, le_avc_DeferDownload() can be used
52  * to defer the download for the specified number of minutes. After the defer time has elapsed,
53  * the pending download notification will be re-sent, to allow the control app to make a
54  * new decision, or again defer.
55  *
56  * Once an update has been downloaded, a new notification will be received to indicate that an
57  * install is pending. The control app can then use le_avc_AcceptInstall() to allow the
58  * install to proceed. Note that even if the control app calls le_avc_AcceptInstall(),
59  * the install may still be blocked by an app using the @ref c_le_avc_update_app
60  * functions. To defer the decision, the control app can use le_avc_DeferInstall() to
61  * defer the install for the specified number of minutes. After the defer time has elapsed, the
62  * pending install notification will be re-sent to allow the control app to make a new
63  * decision, or again defer.
64  *
65  * If an uninstall is pending, then le_avc_AcceptUninstall() can be used to allow the uninstall to
66  * proceed. To defer the decision, le_avc_DeferUninstall() can be used to defer the uninstall for
67  * the specified number of minutes. In case of an upgrade, the existing application will not be
68  * uninstalled after le_avc_AcceptUninstall() is called. le_avc_AcceptUninstall() is only used to
69  * signal the server to start downloading the new application. During an upgrade process the
70  * control app has to accept the uninstall of the existing version followed by accepting the
71  * download and install of the new version.
72  *
73  * Accepting an app install or uninstall will not initiate an AirVantage session if no session
74  * is active. The control app should start an AirVantage session before accepting an app
75  * install/uninstall, to ensure the process is completed, and the server is updated.
76  *
77  * If a control app doesn't register for notifications using le_avc_AddStatusEventHandler(),
78  * then any pending downloads and installs will happen automatically, subject to any restrictions
79  * imposed by app using the @ref c_le_avc_update_app functions. Also, only the control app
80  * registered for notifications will be allowed to use the other update control API functions.
81  *
82  * Only one control app is allowed to register for notifications. Any subsequent attempts by
83  * either the same app, or a different app is treated as a fatal error (i.e. non-recoverable)
84  * and will result in the client app being terminated.
85  *
86  * In case of any error incurred during app download/install, an error code will be set and the
87  * control app can retrieve it by calling le_avc_GetErrorCode().
88  *
89  * @subsection c_le_avc_update_app Application Blocking
90  *
91  * When an app is about to perform a critical operation, it can block the installation of
92  * an update with le_avc_BlockInstall(), and after it's finished with the critical operation, it
93  * can unblock the install with le_avc_UnblockInstall().
94  *
95  * What constitutes a critical operation depends on the app. An eCall app might
96  * block installs for the duration that it runs. A data collection app that wakes up
97  * once an hour might block installs while it collects and stores and/or transmits a new data
98  * sample, and then unblock installs just before it goes to sleep again.
99  *
100  * If an install can't be applied because it's blocked, another attempt to apply the install
101  * will be made at a later time.
102  *
103  * The control app can add a session controller handler using le_avc_AddSessionRequestEventHandler().
104  * If the control app registers a session request event handler, requests by user apps to open or
105  * close session will be forwarded to the control app. If the control app doesn't register a session
106  * request handler, avms session can be opened anytime by user apps.
107  *
108  * @section c_le_avc_GetPollingTimer Polling Timer
109  *
110  * The embedded module will periodically initiate a connection to the Device Services server
111  * according to the polling timer. The device initates the connection periodically, so that it can
112  * poll the server if there are any pending jobs. Writing 0 to the polling timer disables polling
113  * mode. Polling timer values range from 0 to 525600 minutes. The polling timer value is persistent.
114  * le_avc_GetPollingTimer() reads the polling timer and le_avc_SetPollingTimer() writes the polling
115  * timer.
116  *
117  * @section c_le_avc_GetRetryTimers Retry Timers
118  *
119  * If an error occurs during a connection to the Device Services server (WWAN DATA establishment
120  * failed, http error code received), the embedded module will initiate a new connection according
121  * to the values defined in the retry timers. The timers are tried in sequence until a connection is
122  * established, or all enabled retry timers are exhausted. After all the enabled timers are
123  * exhausted, a connection will be initiated only on a command from user (le_avc_startSession() )
124  * or at the expiry of the polling timer. The retry timer values are persistent. Writing 0
125  * to one of the retry timers will disable it. Retry timer values range from 0 to 20160 minutes.
126  * The api le_avc_GetRetryTimers() reads the polling timers in an array and the api
127  * le_avc_SetRetryTimers() writes the polling timers. When writing to the retry timers, values of
128  * all the 8 timers have to be defined.
129  *
130  * @section le_avcService_configdb Service Configuration Tree
131  * @copydoc le_avcService_configdbPage_Hide
132  *
133  * <HR>
134  *
135  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
136  */
137 /**
138  * @interface le_avcService_configdbPage_Hide
139  *
140  * The configuration database path for the modemActivityTimeout is:
141  * @verbatim
142  /
143  apps/
144  avcService/
145  modemActivityTimeout
146  @endverbatim
147  *
148  *
149  * After an AirVantage session is started, if there's no activity from the modem within the timer interval,
150  * then LE_AVC_NO_UPDATE state will be returned to the app. However, this modem activity timeout can
151  * be overridden by setting an integer value at /apps/avcService/modemActivityTimeout. The modem
152  * activity timer is initialized only when the avcService starts. If a valid entry >0 is found,
153  * then it will be used instead of the default value of 20 seconds. The following steps should be
154  * used to set the modemActivtyTimeout.
155  *
156  *
157  * @verbatim
158  config set /apps/avcService/modemActivityTimeout xx
159  app restart avcService
160  @endverbatim
161  *
162  * @note
163  * Everytime a new value is written to modemActivityTimeout, the avcService needs to be
164  * restarted to read the new value.
165  *
166  *
167  */
168 /**
169  * @file le_avc_interface.h
170  *
171  * Legato @ref c_le_avc include file.
172  *
173  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
174  */
175 
176 #ifndef LE_AVC_INTERFACE_H_INCLUDE_GUARD
177 #define LE_AVC_INTERFACE_H_INCLUDE_GUARD
178 
179 
180 #include "legato.h"
181 
182 // Interface specific includes
183 #include "le_limit_interface.h"
184 
185 
186 //--------------------------------------------------------------------------------------------------
187 /**
188  *
189  * Connect the current client thread to the service providing this API. Block until the service is
190  * available.
191  *
192  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
193  * called before any other functions in this API. Normally, ConnectService is automatically called
194  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
195  *
196  * This function is created automatically.
197  */
198 //--------------------------------------------------------------------------------------------------
200 (
201  void
202 );
203 
204 //--------------------------------------------------------------------------------------------------
205 /**
206  *
207  * Try to connect the current client thread to the service providing this API. Return with an error
208  * if the service is not available.
209  *
210  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
211  * called before any other functions in this API. Normally, ConnectService is automatically called
212  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
213  *
214  * This function is created automatically.
215  *
216  * @return
217  * - LE_OK if the client connected successfully to the service.
218  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
219  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
220  * - LE_COMM_ERROR if the Service Directory cannot be reached.
221  */
222 //--------------------------------------------------------------------------------------------------
224 (
225  void
226 );
227 
228 //--------------------------------------------------------------------------------------------------
229 /**
230  *
231  * Disconnect the current client thread from the service providing this API.
232  *
233  * Normally, this function doesn't need to be called. After this function is called, there's no
234  * longer a connection to the service, and the functions in this API can't be used. For details, see
235  * @ref apiFilesC_client.
236  *
237  * This function is created automatically.
238  */
239 //--------------------------------------------------------------------------------------------------
241 (
242  void
243 );
244 
245 
246 //--------------------------------------------------------------------------------------------------
247 /**
248  * Maximum APN name length without NULL terminator.
249  */
250 //--------------------------------------------------------------------------------------------------
251 #define LE_AVC_APN_NAME_MAX_LEN 48
252 
253 
254 //--------------------------------------------------------------------------------------------------
255 /**
256  * Maximum APN name length including NULL terminator.
257  */
258 //--------------------------------------------------------------------------------------------------
259 #define LE_AVC_APN_NAME_MAX_LEN_BYTES 49
260 
261 
262 //--------------------------------------------------------------------------------------------------
263 /**
264  * Maximum user name length without NULL terminator.
265  */
266 //--------------------------------------------------------------------------------------------------
267 #define LE_AVC_USERNAME_MAX_LEN 28
268 
269 
270 //--------------------------------------------------------------------------------------------------
271 /**
272  * Maximum user name length including NULL terminator.
273  */
274 //--------------------------------------------------------------------------------------------------
275 #define LE_AVC_USERNAME_MAX_LEN_BYTES 29
276 
277 
278 //--------------------------------------------------------------------------------------------------
279 /**
280  * Maximum password length without NULL terminator..
281  */
282 //--------------------------------------------------------------------------------------------------
283 #define LE_AVC_PASSWORD_MAX_LEN 28
284 
285 
286 //--------------------------------------------------------------------------------------------------
287 /**
288  * Maximum password length including NULL terminator.
289  */
290 //--------------------------------------------------------------------------------------------------
291 #define LE_AVC_PASSWORD_MAX_LEN_BYTES 29
292 
293 
294 //--------------------------------------------------------------------------------------------------
295 /**
296  * Maximum number of retry timers.
297  */
298 //--------------------------------------------------------------------------------------------------
299 #define LE_AVC_NUM_RETRY_TIMERS 8
300 
301 
302 //--------------------------------------------------------------------------------------------------
303 /**
304  * Default HTTP status.
305  */
306 //--------------------------------------------------------------------------------------------------
307 #define LE_AVC_HTTP_STATUS_INVALID 65535
308 
309 
310 //--------------------------------------------------------------------------------------------------
311 /**
312  * Status of session or update
313  *
314  * If an update is pending, it must first be downloaded and then installed.
315  */
316 //--------------------------------------------------------------------------------------------------
317 typedef enum
318 {
320  ///< No updates pending
321 
323  ///< Update pending download
324 
326  ///< Download in progress
327 
329  ///< Download has completed
330 
332  ///< An error occurred downloading the update
333 
335  ///< Install is pending (implies download complete)
336 
338  ///< Install in progress
339 
341  ///< Update has been successfully installed
342 
344  ///< An error occurred installing the update
345 
347  ///< Uninstall is pending
348 
350  ///< Uninstall in progress
351 
353  ///< App has been successfully uninstalled
354 
356  ///< An error occurred uninstalling the update
357 
359  ///< Session with AV server started
360 
362  ///< Session with AV server stopped
363 }
365 
366 
367 //--------------------------------------------------------------------------------------------------
368 /**
369  * Request to open or close avms session.
370  */
371 //--------------------------------------------------------------------------------------------------
372 typedef enum
373 {
375  ///< Request by user app to open AV session
376 
378  ///< Request by user app to close AV session
379 }
381 
382 
383 //--------------------------------------------------------------------------------------------------
384 /**
385  * The type of pending update
386  */
387 //--------------------------------------------------------------------------------------------------
388 typedef enum
389 {
390  LE_AVC_UNKNOWN_UPDATE = 0,
391  LE_AVC_FIRMWARE_UPDATE = 1,
392  LE_AVC_FRAMEWORK_UPDATE = 2,
393  LE_AVC_APPLICATION_UPDATE = 3
394 }
396 
397 
398 //--------------------------------------------------------------------------------------------------
399 /**
400  * Error code used to provide diagnostic information after a failure (includes both download and
401  * install failure).
402  *
403  * @note
404  * Additional information may also be available in the target device's system log.
405  */
406 //--------------------------------------------------------------------------------------------------
407 typedef enum
408 {
410  ///< No error.
411 
413  ///< Encountered a bad package.
414 
416  ///< Something failed while doing install/download.
417 
419  ///< Security check failure while installing the package.
420 }
422 
423 
424 //--------------------------------------------------------------------------------------------------
425 /**
426  * Session type indicates whether the device is connected to the bootstrap server or the
427  * device management server.
428  */
429 //--------------------------------------------------------------------------------------------------
430 typedef enum
431 {
433  ///< Bootstrap session.
434 
436  ///< Device Management session.
437 
439  ///< Session type invalid.
440 }
442 
443 
444 //--------------------------------------------------------------------------------------------------
445 /**
446  * Reference type used by Add/Remove functions for EVENT 'le_avc_StatusEvent'
447  */
448 //--------------------------------------------------------------------------------------------------
449 typedef struct le_avc_StatusEventHandler* le_avc_StatusEventHandlerRef_t;
450 
451 
452 //--------------------------------------------------------------------------------------------------
453 /**
454  * Reference type used by Add/Remove functions for EVENT 'le_avc_SessionRequestEvent'
455  */
456 //--------------------------------------------------------------------------------------------------
457 typedef struct le_avc_SessionRequestEventHandler* le_avc_SessionRequestEventHandlerRef_t;
458 
459 
460 //--------------------------------------------------------------------------------------------------
461 /**
462  * Reference returned by BlockInstall function and used by UnblockInstall function
463  */
464 //--------------------------------------------------------------------------------------------------
465 typedef struct le_avc_BlockRequest* le_avc_BlockRequestRef_t;
466 
467 
468 //--------------------------------------------------------------------------------------------------
469 /**
470  * Handler for update availability status
471  *
472  * @param updateStatus
473  * status of pending update, if available
474  * @param totalNumBytes
475  * Total number of bytes to be downloaded
476  * only valid when updateStatus is one of
477  * DOWNLOAD_PENDING, DOWNLOAD_IN_PROGRESS or DOWNLOAD_COMPLETE.
478  * returns -1 if value is unknown
479  * @param dloadProgress
480  * download completion in percentage
481  * only valid when updateStatus is one of
482  * DOWNLOAD_PENDING, DOWNLOAD_IN_PROGRESS or DOWNLOAD_COMPLETE.
483  * returns -1 if value is unknown
484  * @param contextPtr
485  */
486 //--------------------------------------------------------------------------------------------------
487 typedef void (*le_avc_StatusHandlerFunc_t)
488 (
489  le_avc_Status_t updateStatus,
490  int32_t totalNumBytes,
491  int32_t dloadProgress,
492  void* contextPtr
493 );
494 
495 
496 //--------------------------------------------------------------------------------------------------
497 /**
498  * Handler for receiving session open or close request.
499  *
500  * @param request
501  * Request to open or close AV session
502  * @param contextPtr
503  */
504 //--------------------------------------------------------------------------------------------------
506 (
507  le_avc_SessionRequest_t request,
508  void* contextPtr
509 );
510 
511 //--------------------------------------------------------------------------------------------------
512 /**
513  * Add handler function for EVENT 'le_avc_StatusEvent'
514  *
515  * This event provides information on update availability status
516  */
517 //--------------------------------------------------------------------------------------------------
519 (
520  le_avc_StatusHandlerFunc_t handlerPtr,
521  ///< [IN]
522 
523  void* contextPtr
524  ///< [IN]
525 );
526 
527 //--------------------------------------------------------------------------------------------------
528 /**
529  * Remove handler function for EVENT 'le_avc_StatusEvent'
530  */
531 //--------------------------------------------------------------------------------------------------
533 (
534  le_avc_StatusEventHandlerRef_t addHandlerRef
535  ///< [IN]
536 );
537 
538 //--------------------------------------------------------------------------------------------------
539 /**
540  * Add handler function for EVENT 'le_avc_SessionRequestEvent'
541  *
542  * This event provides information on session open or close request.
543  */
544 //--------------------------------------------------------------------------------------------------
546 (
548  ///< [IN]
549 
550  void* contextPtr
551  ///< [IN]
552 );
553 
554 //--------------------------------------------------------------------------------------------------
555 /**
556  * Remove handler function for EVENT 'le_avc_SessionRequestEvent'
557  */
558 //--------------------------------------------------------------------------------------------------
560 (
562  ///< [IN]
563 );
564 
565 //--------------------------------------------------------------------------------------------------
566 /**
567  * Start a session with the AirVantage server
568  *
569  * This will cause a query to be sent to the server, for pending updates. If a download was
570  * previously suspended, then this resumes the download.
571  *
572  * @return
573  * - LE_OK on success
574  * - LE_FAULT on failure
575  */
576 //--------------------------------------------------------------------------------------------------
578 (
579  void
580 );
581 
582 //--------------------------------------------------------------------------------------------------
583 /**
584  * Stop a session with the AirVantage server
585  *
586  * If a download is in progress, then this suspends the download.
587  *
588  * @return
589  * - LE_OK on success
590  * - LE_FAULT on failure
591  */
592 //--------------------------------------------------------------------------------------------------
594 (
595  void
596 );
597 
598 //--------------------------------------------------------------------------------------------------
599 /**
600  * Accept the currently pending download
601  *
602  * @return
603  * - LE_OK on success
604  * - LE_FAULT on failure
605  */
606 //--------------------------------------------------------------------------------------------------
608 (
609  void
610 );
611 
612 //--------------------------------------------------------------------------------------------------
613 /**
614  * Defer the currently pending download, for the given number of minutes
615  *
616  * @return
617  * - LE_OK on success
618  * - LE_FAULT on failure
619  */
620 //--------------------------------------------------------------------------------------------------
622 (
623  uint32_t deferMinutes
624  ///< [IN]
625 );
626 
627 //--------------------------------------------------------------------------------------------------
628 /**
629  * Accept the currently pending install
630  *
631  * @return
632  * - LE_OK on success
633  * - LE_FAULT on failure
634  */
635 //--------------------------------------------------------------------------------------------------
637 (
638  void
639 );
640 
641 //--------------------------------------------------------------------------------------------------
642 /**
643  * Defer the currently pending install
644  *
645  * @return
646  * - LE_OK on success
647  * - LE_FAULT on failure
648  */
649 //--------------------------------------------------------------------------------------------------
651 (
652  uint32_t deferMinutes
653  ///< [IN]
654 );
655 
656 //--------------------------------------------------------------------------------------------------
657 /**
658  * Accept the currently pending uninstall
659  *
660  * @return
661  * - LE_OK on success
662  * - LE_FAULT on failure
663  */
664 //--------------------------------------------------------------------------------------------------
666 (
667  void
668 );
669 
670 //--------------------------------------------------------------------------------------------------
671 /**
672  * Defer the currently pending uninstall
673  *
674  * @return
675  * - LE_OK on success
676  * - LE_FAULT on failure
677  */
678 //--------------------------------------------------------------------------------------------------
680 (
681  uint32_t deferMinutes
682  ///< [IN]
683 );
684 
685 //--------------------------------------------------------------------------------------------------
686 /**
687  * Get the update type of the currently pending update
688  *
689  * @return
690  * - LE_OK on success
691  * - LE_FAULT if not available
692  */
693 //--------------------------------------------------------------------------------------------------
695 (
696  le_avc_UpdateType_t* updateTypePtr
697  ///< [OUT]
698 );
699 
700 //--------------------------------------------------------------------------------------------------
701 /**
702  * Get the name for the currently pending app update
703  *
704  * @return
705  * - LE_OK on success
706  * - LE_FAULT if not available, or isn't APPL_UPDATE type
707  */
708 //--------------------------------------------------------------------------------------------------
710 (
711  char* updateName,
712  ///< [OUT]
713 
714  size_t updateNameNumElements
715  ///< [IN]
716 );
717 
718 //--------------------------------------------------------------------------------------------------
719 /**
720  * Prevent any pending updates from being installed.
721  *
722  * @return
723  * - Reference for block update request (to be used later for unblocking updates)
724  * - NULL if the operation was not successful
725  */
726 //--------------------------------------------------------------------------------------------------
728 (
729  void
730 );
731 
732 //--------------------------------------------------------------------------------------------------
733 /**
734  * Allow any pending updates to be installed
735  */
736 //--------------------------------------------------------------------------------------------------
738 (
739  le_avc_BlockRequestRef_t blockRef
740  ///< [IN] block request ref returned by le_avc_BlockInstall
741 );
742 
743 //--------------------------------------------------------------------------------------------------
744 /**
745  * Function to get error code when update fails.
746  *
747  * @return
748  * - Error code of encountered error.
749  * - ERR_NONE if update is in any other state.
750  */
751 //--------------------------------------------------------------------------------------------------
753 (
754  void
755 );
756 
757 //--------------------------------------------------------------------------------------------------
758 /**
759  * Function to read the current session type, or the last session type if there is no
760  * active session.
761  *
762  * @return
763  * - SessionType
764  */
765 //--------------------------------------------------------------------------------------------------
767 (
768  void
769 );
770 
771 //--------------------------------------------------------------------------------------------------
772 /**
773  * Function to read the http status of the last download.
774  *
775  * @return
776  * - HttpStatus as defined in RFC 7231, Section 6.
777  */
778 //--------------------------------------------------------------------------------------------------
779 uint16_t le_avc_GetHttpStatus
780 (
781  void
782 );
783 
784 //--------------------------------------------------------------------------------------------------
785 /**
786  * Function to read the polling timer.
787  *
788  * @return
789  * - LE_OK on success
790  * - LE_FAULT if not available
791  */
792 //--------------------------------------------------------------------------------------------------
794 (
795  uint32_t* pollingTimerPtr
796  ///< [OUT] Polling timer (0 to 525600 minutes).
797 );
798 
799 //--------------------------------------------------------------------------------------------------
800 /**
801  * Function to read the retry timers.
802  *
803  * @return
804  * - LE_OK on success.
805  * - LE_FAULT if not able to read the timers.
806  */
807 //--------------------------------------------------------------------------------------------------
809 (
810  uint16_t* timerValuePtr,
811  ///< [OUT] Array of the retry timers.
812 
813  size_t* timerValueNumElementsPtr
814  ///< [INOUT]
815 );
816 
817 //--------------------------------------------------------------------------------------------------
818 /**
819  * Function to read APN configuration.
820  *
821  * @return
822  * - LE_OK on success.
823  * - LE_FAULT if there is any error while reading.
824  * - LE_OVERFLOW if the buffer provided is too small.
825  */
826 //--------------------------------------------------------------------------------------------------
828 (
829  char* apnName,
830  ///< [OUT]
831 
832  size_t apnNameNumElements,
833  ///< [IN]
834 
835  char* userName,
836  ///< [OUT]
837 
838  size_t userNameNumElements,
839  ///< [IN]
840 
841  char* userPwd,
842  ///< [OUT]
843 
844  size_t userPwdNumElements
845  ///< [IN]
846 );
847 
848 //--------------------------------------------------------------------------------------------------
849 /**
850  * Function to write APN configuration.
851  *
852  * @return
853  * - LE_OK on success.
854  * - LE_FAULT if not able to write the APN configuration.
855  * - LE_OVERFLOW if one of the input strings is too long.
856  */
857 //--------------------------------------------------------------------------------------------------
859 (
860  const char* apnName,
861  ///< [IN]
862 
863  const char* userName,
864  ///< [IN]
865 
866  const char* userPwd
867  ///< [IN]
868 );
869 
870 //--------------------------------------------------------------------------------------------------
871 /**
872  * Function to set the polling timer.
873  *
874  * @return
875  * - LE_OK on success.
876  * - LE_FAULT if not able to read the timers.
877  */
878 //--------------------------------------------------------------------------------------------------
880 (
881  uint32_t pollingTimer
882  ///< [IN] Polling timer (0 to 525600 minutes).
883 );
884 
885 //--------------------------------------------------------------------------------------------------
886 /**
887  * Function to set the retry timers.
888  *
889  * @return
890  * - LE_OK on success.
891  * - LE_FAULT if not able to write the timers.
892  */
893 //--------------------------------------------------------------------------------------------------
895 (
896  const uint16_t* timerValuePtr,
897  ///< [IN] Array of 8 retry timers.
898 
899  size_t timerValueNumElements
900  ///< [IN]
901 );
902 
903 
904 #endif // LE_AVC_INTERFACE_H_INCLUDE_GUARD
905 
le_result_t le_avc_GetPollingTimer(uint32_t *pollingTimerPtr)
Uninstall in progress.
Definition: le_avc_interface.h:349
le_result_t le_avc_SetApnConfig(const char *apnName, const char *userName, const char *userPwd)
le_result_t le_avc_GetRetryTimers(uint16_t *timerValuePtr, size_t *timerValueNumElementsPtr)
Uninstall is pending.
Definition: le_avc_interface.h:346
Request by user app to close AV session.
Definition: le_avc_interface.h:377
An error occurred installing the update.
Definition: le_avc_interface.h:343
le_avc_SessionRequestEventHandlerRef_t le_avc_AddSessionRequestEventHandler(le_avc_SessionRequestHandlerFunc_t handlerPtr, void *contextPtr)
void le_avc_RemoveSessionRequestEventHandler(le_avc_SessionRequestEventHandlerRef_t addHandlerRef)
le_result_t
Definition: le_basics.h:35
void le_avc_RemoveStatusEventHandler(le_avc_StatusEventHandlerRef_t addHandlerRef)
An error occurred uninstalling the update.
Definition: le_avc_interface.h:355
Install in progress.
Definition: le_avc_interface.h:337
void le_avc_UnblockInstall(le_avc_BlockRequestRef_t blockRef)
le_avc_StatusEventHandlerRef_t le_avc_AddStatusEventHandler(le_avc_StatusHandlerFunc_t handlerPtr, void *contextPtr)
struct le_avc_SessionRequestEventHandler * le_avc_SessionRequestEventHandlerRef_t
Definition: le_avc_interface.h:457
le_avc_SessionRequest_t
Definition: le_avc_interface.h:372
An error occurred downloading the update.
Definition: le_avc_interface.h:331
le_result_t le_avc_DeferUninstall(uint32_t deferMinutes)
Install is pending (implies download complete)
Definition: le_avc_interface.h:334
le_result_t le_avc_AcceptUninstall(void)
le_result_t le_avc_GetUpdateType(le_avc_UpdateType_t *updateTypePtr)
Session with AV server stopped.
Definition: le_avc_interface.h:361
Session with AV server started.
Definition: le_avc_interface.h:358
le_avc_SessionType_t
Definition: le_avc_interface.h:430
Download in progress.
Definition: le_avc_interface.h:325
Session type invalid.
Definition: le_avc_interface.h:438
le_result_t le_avc_StartSession(void)
le_result_t le_avc_StopSession(void)
le_result_t le_avc_SetRetryTimers(const uint16_t *timerValuePtr, size_t timerValueNumElements)
Update pending download.
Definition: le_avc_interface.h:322
le_result_t le_avc_AcceptDownload(void)
le_result_t le_avc_TryConnectService(void)
le_result_t le_avc_DeferInstall(uint32_t deferMinutes)
Update has been successfully installed.
Definition: le_avc_interface.h:340
le_result_t le_avc_AcceptInstall(void)
Something failed while doing install/download.
Definition: le_avc_interface.h:415
Bootstrap session.
Definition: le_avc_interface.h:432
struct le_avc_BlockRequest * le_avc_BlockRequestRef_t
Definition: le_avc_interface.h:465
le_avc_BlockRequestRef_t le_avc_BlockInstall(void)
void le_avc_DisconnectService(void)
le_avc_SessionType_t le_avc_GetSessionType(void)
Device Management session.
Definition: le_avc_interface.h:435
No error.
Definition: le_avc_interface.h:409
le_avc_UpdateType_t
Definition: le_avc_interface.h:388
le_result_t le_avc_DeferDownload(uint32_t deferMinutes)
le_result_t le_avc_SetPollingTimer(uint32_t pollingTimer)
void(* le_avc_SessionRequestHandlerFunc_t)(le_avc_SessionRequest_t request, void *contextPtr)
Definition: le_avc_interface.h:506
Security check failure while installing the package.
Definition: le_avc_interface.h:418
Request by user app to open AV session.
Definition: le_avc_interface.h:374
le_avc_ErrorCode_t
Definition: le_avc_interface.h:407
Download has completed.
Definition: le_avc_interface.h:328
No updates pending.
Definition: le_avc_interface.h:319
void(* le_avc_StatusHandlerFunc_t)(le_avc_Status_t updateStatus, int32_t totalNumBytes, int32_t dloadProgress, void *contextPtr)
Definition: le_avc_interface.h:488
uint16_t le_avc_GetHttpStatus(void)
struct le_avc_StatusEventHandler * le_avc_StatusEventHandlerRef_t
Definition: le_avc_interface.h:449
Encountered a bad package.
Definition: le_avc_interface.h:412
le_avc_Status_t
Definition: le_avc_interface.h:317
App has been successfully uninstalled.
Definition: le_avc_interface.h:352
le_result_t le_avc_GetAppUpdateName(char *updateName, size_t updateNameNumElements)
le_avc_ErrorCode_t le_avc_GetErrorCode(void)
le_result_t le_avc_GetApnConfig(char *apnName, size_t apnNameNumElements, char *userName, size_t userNameNumElements, char *userPwd, size_t userPwdNumElements)
void le_avc_ConnectService(void)