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