le_avc_interface.h
Go to the documentation of this file.
38 * the control app it waits for 3 minutes and tries again. To not have the avcService wait for the49 * notification is connection pending or by accepting or deferring the operation if the notification52 * Whether avcService should forward these notifications to an app or act on these notifications by75 * The current session can be stopped using le_avc_StopSession(). This cancels any query for pending76 * update, or suspends a download in progress; however, it <b>won't stop</b> an install in progress.99 * @c avcService will open a session to proceed with the download. In this case, a session started105 * le_avc_GetUpdateType(). App updates can call le_avc_GetAppUpdateName() to retrieve the App name.110 * specified number of minutes. After the defer time has elapsed, the pending download notification111 * will be re-sent again to all registered apps. le_avc_AcceptDownload() can be used to accept the118 * If an uninstall is pending, then le_avc_AcceptUninstall() can be used to allow the uninstall to119 * proceed. To defer the decision, le_avc_DeferUninstall() can be used to defer the uninstall for121 * uninstalled after le_avc_AcceptUninstall() is called. le_avc_AcceptUninstall() is only used to122 * signal the server to start downloading the new application. To proceed with an upgrade process,123 * accept the uninstall of the existing version followed by accepting the download and install of171 * @note Even if an App calls le_avc_AcceptInstall(), the install may still be blocked by another173 * le_avc_DeferInstall() to defer the install for the specified number of minutes. After the defer174 * time has elapsed, the pending install notification will be re-sent to allow Apps to make a new181 * is active. An App should start an AirVantage session before accepting an App install/uninstall,185 * then any pending downloads and installs will happen automatically, subject to any restrictions190 * In case of any error incurred during App download/install, an error code will be set which can be207 * An App can add a session control handler using le_avc_AddSessionRequestEventHandler(). Requests208 * by user Apps to open or close session will be forwarded to the session control handler. If no App221 * - If the user agreements are enabled, the previous @c PENDING notification is sent to the App,225 * minutes), e.g. in some cases of firmware update. The @c PENDING notification will therefore be226 * sent only when the suspension is over. Trying to resume the update process while the suspension230 * |--------------------------------|-------------------------------------------------------------|--------------------------|232 * | @c LE_AVC_DOWNLOAD_IN_PROGRESS | @c LE_AVC_DOWNLOAD_PENDING with remaining bytes to download | Accept download |233 * | @c LE_AVC_DOWNLOAD_COMPLETE | @c LE_AVC_DOWNLOAD_PENDING with zero bytes to download | Accept download |240 * all suspend/resume information stored by avcService is erased. So if developer updates firmware241 * or legato (via ethernet or ecm etc.) in the middle of any update initiated by avcService, this246 * Polling timers sets the time that the Target will communicate with the AirVantage Server to check257 * The polling timer accepts ranges from 0 to 525600 minutes and is persistent across reboots and264 * Writing to the polling timer stops the current polling timer if it is running and starts a timer273 * The timers are tried in sequence until a connection is established, or all enabled retry timers274 * are exhausted. After all the enabled timers are exhausted, a new session must be initiated again286 * Example of calling retry timers, the session will be retried after 15 minutes, 1 hour, 4 hours,295 * The AirVantage server can request to reboot the device. If a reboot is requested a notification296 * is sent to the registered Apps. The App can either accept the reboot with le_avc_AcceptReboot()298 * has elapsed, the pending reboot notification will be re-sent. This allows the registered app to313 * software update (after finishing software update on reboot). In this case a notification is sent318 * By default the AirVantage connection uses the default mobile data profile and the default route321 * If the user wishes to control the network configuration, e.g. to use the AirVantage agent with330 * The data connection service should then be configured before launching the AirVantage connection:341 * 300 seconds to establish a connection. Download will also be aborted, if the download speed is364 * After an AirVantage session is started, if there's no activity between the device and the server367 * /apps/avcService/activityTimeout. The activity timer is initialized only when the @c avcService401 //--------------------------------------------------------------------------------------------------405 //--------------------------------------------------------------------------------------------------408 //--------------------------------------------------------------------------------------------------411 * Connect the current client thread to the service providing this API. Block until the service is414 * For each thread that wants to use this API, either ConnectService or TryConnectService must be415 * called before any other functions in this API. Normally, ConnectService is automatically called420 //--------------------------------------------------------------------------------------------------426 //--------------------------------------------------------------------------------------------------429 * Try to connect the current client thread to the service providing this API. Return with an error432 * For each thread that wants to use this API, either ConnectService or TryConnectService must be433 * called before any other functions in this API. Normally, ConnectService is automatically called442 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).445 //--------------------------------------------------------------------------------------------------451 //--------------------------------------------------------------------------------------------------455 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants458 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------471 * longer a connection to the service, and the functions in this API can't be used. For details, see476 //--------------------------------------------------------------------------------------------------483 //--------------------------------------------------------------------------------------------------487 //--------------------------------------------------------------------------------------------------490 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------497 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------504 //--------------------------------------------------------------------------------------------------508 //--------------------------------------------------------------------------------------------------511 //--------------------------------------------------------------------------------------------------515 //--------------------------------------------------------------------------------------------------518 //--------------------------------------------------------------------------------------------------522 //--------------------------------------------------------------------------------------------------525 //--------------------------------------------------------------------------------------------------529 //--------------------------------------------------------------------------------------------------532 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------539 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------549 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------555 //--------------------------------------------------------------------------------------------------558 //--------------------------------------------------------------------------------------------------562 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------571 //--------------------------------------------------------------------------------------------------623 //--------------------------------------------------------------------------------------------------627 //--------------------------------------------------------------------------------------------------644 //--------------------------------------------------------------------------------------------------648 //--------------------------------------------------------------------------------------------------659 //--------------------------------------------------------------------------------------------------663 //--------------------------------------------------------------------------------------------------678 //--------------------------------------------------------------------------------------------------686 //--------------------------------------------------------------------------------------------------701 //--------------------------------------------------------------------------------------------------706 //--------------------------------------------------------------------------------------------------719 //--------------------------------------------------------------------------------------------------723 //--------------------------------------------------------------------------------------------------738 //--------------------------------------------------------------------------------------------------742 //--------------------------------------------------------------------------------------------------746 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------754 //--------------------------------------------------------------------------------------------------758 //--------------------------------------------------------------------------------------------------762 //--------------------------------------------------------------------------------------------------766 //--------------------------------------------------------------------------------------------------768 (785 //--------------------------------------------------------------------------------------------------789 //--------------------------------------------------------------------------------------------------791 (798 //--------------------------------------------------------------------------------------------------804 //--------------------------------------------------------------------------------------------------813 //--------------------------------------------------------------------------------------------------817 //--------------------------------------------------------------------------------------------------824 //--------------------------------------------------------------------------------------------------830 //--------------------------------------------------------------------------------------------------839 //--------------------------------------------------------------------------------------------------843 //--------------------------------------------------------------------------------------------------850 //--------------------------------------------------------------------------------------------------861 //--------------------------------------------------------------------------------------------------867 //--------------------------------------------------------------------------------------------------877 //--------------------------------------------------------------------------------------------------883 //--------------------------------------------------------------------------------------------------885 * Send a specific message to the server to be sure that the route between the device and the server887 * This API needs to be called when any package download is over (successfully or not) and before896 //--------------------------------------------------------------------------------------------------902 //--------------------------------------------------------------------------------------------------910 //--------------------------------------------------------------------------------------------------917 //--------------------------------------------------------------------------------------------------925 //--------------------------------------------------------------------------------------------------931 //--------------------------------------------------------------------------------------------------939 //--------------------------------------------------------------------------------------------------946 //--------------------------------------------------------------------------------------------------954 //--------------------------------------------------------------------------------------------------960 //--------------------------------------------------------------------------------------------------968 //--------------------------------------------------------------------------------------------------975 //--------------------------------------------------------------------------------------------------983 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------997 //--------------------------------------------------------------------------------------------------1004 //--------------------------------------------------------------------------------------------------1012 //--------------------------------------------------------------------------------------------------1018 //--------------------------------------------------------------------------------------------------1026 //--------------------------------------------------------------------------------------------------1033 //--------------------------------------------------------------------------------------------------1041 //--------------------------------------------------------------------------------------------------1048 //--------------------------------------------------------------------------------------------------1056 //--------------------------------------------------------------------------------------------------1065 //--------------------------------------------------------------------------------------------------1073 //--------------------------------------------------------------------------------------------------1079 //--------------------------------------------------------------------------------------------------1083 //--------------------------------------------------------------------------------------------------1090 //--------------------------------------------------------------------------------------------------1098 //--------------------------------------------------------------------------------------------------1104 //--------------------------------------------------------------------------------------------------1112 //--------------------------------------------------------------------------------------------------1118 //--------------------------------------------------------------------------------------------------1125 //--------------------------------------------------------------------------------------------------1131 //--------------------------------------------------------------------------------------------------1140 //--------------------------------------------------------------------------------------------------1147 //--------------------------------------------------------------------------------------------------1156 //--------------------------------------------------------------------------------------------------1165 //--------------------------------------------------------------------------------------------------1174 //--------------------------------------------------------------------------------------------------1191 //--------------------------------------------------------------------------------------------------1199 //--------------------------------------------------------------------------------------------------1210 //--------------------------------------------------------------------------------------------------1218 //--------------------------------------------------------------------------------------------------1225 //--------------------------------------------------------------------------------------------------1234 //--------------------------------------------------------------------------------------------------1243 //--------------------------------------------------------------------------------------------------1256 //--------------------------------------------------------------------------------------------------1262 //--------------------------------------------------------------------------------------------------1270 //--------------------------------------------------------------------------------------------------1279 //--------------------------------------------------------------------------------------------------1287 //--------------------------------------------------------------------------------------------------void le_avc_RemoveSessionRequestEventHandler(le_avc_SessionRequestEventHandlerRef_t handlerRef)le_result_t le_avc_GetPollingTimer(uint32_t *pollingTimerPtr)void(* le_avc_StatusHandlerFunc_t)(le_avc_Status_t updateStatus, int32_t totalNumBytes, int32_t dloadProgress, void *contextPtr)Definition: le_avc_interface.h:768le_result_t le_avc_DeferReboot(uint32_t deferMinutes)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 le_avc_SetApnConfig(const char *LE_NONNULL apnName, const char *LE_NONNULL userName, const char *LE_NONNULL userPwd)le_result_t le_avc_DeferConnect(uint32_t deferMinutes)Package is certified sent by a trusted server.Definition: le_avc_interface.h:615void(* le_avc_SessionRequestHandlerFunc_t)(le_avc_SessionRequest_t request, void *contextPtr)Definition: le_avc_interface.h:791le_result_t le_avc_AcceptReboot(void)An error occurred uninstalling the update.Definition: le_avc_interface.h:598void le_avc_UnblockInstall(le_avc_BlockRequestRef_t blockRef)Package is not certified sent by a trusted server.Definition: le_avc_interface.h:617void 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_tDefinition: le_avc_interface.h:751le_result_t le_avc_DeferUninstall(uint32_t deferMinutes)Install is pending (implies download complete)Definition: le_avc_interface.h:584le_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:406Definition: le_avc_interface.h:726le_result_t le_avc_StartSession(void)le_result_t le_avc_StopSession(void)void le_avc_RemoveStatusEventHandler(le_avc_StatusEventHandlerRef_t handlerRef)le_result_t le_avc_GetUserAgreement(le_avc_UserAgreement_t updateStatus, bool *enablePtr)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)le_result_t le_avc_AcceptInstall(void)Something failed while doing install/download.Definition: le_avc_interface.h:693struct le_avc_BlockRequest * le_avc_BlockRequestRef_tDefinition: le_avc_interface.h:759le_avc_BlockRequestRef_t le_avc_BlockInstall(void)void le_avc_DisconnectService(void)le_avc_SessionType_t le_avc_GetSessionType(void)le_result_t le_avc_SetUserAgreement(le_avc_UserAgreement_t updateStatus, bool enable)Definition: le_avc_interface.h:729Definition: le_avc_interface.h:606le_result_t le_avc_GetApnConfig(char *apnName, size_t apnNameSize, char *userName, size_t userNameSize, char *userPwd, size_t userPwdSize)le_avc_CredentialStatus_t le_avc_GetCredentialStatus(void)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:695le_result_t le_avc_GetAppUpdateName(char *updateName, size_t updateNameSize)le_result_t le_avc_GetRetryTimers(uint16_t *timerValuePtr, size_t *timerValueSizePtr)uint16_t le_avc_GetHttpStatus(void)struct le_avc_StatusEventHandler * le_avc_StatusEventHandlerRef_tDefinition: le_avc_interface.h:743Device Management credential is provisioned.Definition: le_avc_interface.h:732le_avc_ErrorCode_t le_avc_GetErrorCode(void)void le_avc_ConnectService(void)