le_avc_interface.h
Go to the documentation of this file.
38 * If the avcService can't communicate with the control app it waits for 3 minutes and tries again.50 * notification is connection pending or by accepting or deferring the operation if the notification53 * Whether avcService should forward these notifications to an app or act on these notifications by76 * The current session can be stopped using le_avc_StopSession(). This cancels any query for pending77 * update, or suspends a download in progress; however, it <b>won't stop</b> an install in progress.106 * @c avcService will open a session to proceed with the download. In this case, a session started112 * le_avc_GetUpdateType(). App updates can call le_avc_GetAppUpdateName() to retrieve the App name.117 * specified number of minutes. After the defer time has elapsed, the pending download notification118 * will be re-sent again to all registered apps. le_avc_AcceptDownload() can be used to accept the125 * If an uninstall is pending, then le_avc_AcceptUninstall() can be used to allow the uninstall to126 * proceed. To defer the decision, le_avc_DeferUninstall() can be used to defer the uninstall for128 * uninstalled after le_avc_AcceptUninstall() is called. le_avc_AcceptUninstall() is only used to129 * signal the server to start downloading the new application. To proceed with an upgrade process,130 * accept the uninstall of the existing version followed by accepting the download and install of178 * @note Even if an App calls le_avc_AcceptInstall(), the install may still be blocked by another180 * le_avc_DeferInstall() to defer the install for the specified number of minutes. After the defer181 * time has elapsed, the pending install notification will be re-sent to allow Apps to make a new188 * is active. An App should start an AirVantage session before accepting an App install/uninstall,192 * then any pending downloads and installs will happen automatically, subject to any restrictions197 * In case of any error incurred during App download/install, an error code will be set which can be214 * An App can add a session control handler using le_avc_AddSessionRequestEventHandler(). Requests215 * by user Apps to open or close session will be forwarded to the session control handler. If no App228 * - If the user agreements are enabled, the previous @c PENDING notification is sent to the App,232 * minutes), e.g. in some cases of firmware update. The @c PENDING notification will therefore be233 * sent only when the suspension is over. Trying to resume the update process while the suspension237 * |--------------------------------|-------------------------------------------------------------|--------------------------|239 * | @c LE_AVC_DOWNLOAD_IN_PROGRESS | @c LE_AVC_DOWNLOAD_PENDING with remaining bytes to download | Accept download |240 * | @c LE_AVC_DOWNLOAD_COMPLETE | @c LE_AVC_DOWNLOAD_PENDING with zero bytes to download | Accept download |247 * all suspend/resume information stored by avcService is erased. So if developer updates firmware248 * or legato (via ethernet or ecm etc.) in the middle of any update initiated by avcService, this253 * Polling timers sets the time that the Target will communicate with the AirVantage Server to check261 * initiate a session when it starts the count (at 0 minutes) and then again at the specified time266 * The polling timer accepts ranges from 0 to 525600 minutes. The polling timer does not get reset268 * connect to the AVC Server upon startup of the app. For example, if the polling timer is set to 1269 * hour then and the target reboots at the 20 minute mark, the polling timer will still initiate a270 * connection at the 1 hour mark. If the target is powered off or in the middle of rebooting at the271 * 1 hour mark, as soon as the app is started again, the polling timer will initiate a connection to274 * Polling timer initiated sessions will be disconnected after 20 seconds of inactivity. This does275 * not apply to AirVantage sessions that have been initiated by an app. The app is responsible for276 * disconnecting the session it initiates within a reasonable timeframe. Leaving the session open283 * Writing to the polling timer stops the current polling timer if it is running and starts a timer284 * with the new value. The next connection will be initiated when the new polling timer reaches it's293 * The timers are tried in sequence until a connection is established, or all enabled retry timers294 * are exhausted. After all the enabled timers are exhausted, a new session must be initiated again306 * Example of calling retry timers, the session will be retried after 15 minutes, 1 hour, 4 hours,315 * The AirVantage server can request to reboot the device. If a reboot is requested a notification316 * is sent to the registered Apps. The App can either accept the reboot with le_avc_AcceptReboot()318 * has elapsed, the pending reboot notification will be re-sent. This allows the registered app to333 * software update (after finishing software update on reboot). In this case a notification is sent338 * By default the AirVantage connection uses the default mobile data profile and the default route341 * If the user wishes to control the network configuration, e.g. to use the AirVantage agent with350 * The data connection service should then be configured before launching the AirVantage connection:361 * 300 seconds to establish a connection. Download will also be aborted, if the download speed is384 * After an AirVantage session is started, if there's no activity between the device and the server387 * /apps/avcService/activityTimeout. The activity timer is initialized only when the @c avcService421 //--------------------------------------------------------------------------------------------------425 //--------------------------------------------------------------------------------------------------428 //--------------------------------------------------------------------------------------------------431 * Connect the current client thread to the service providing this API. Block until the service is434 * For each thread that wants to use this API, either ConnectService or TryConnectService must be435 * called before any other functions in this API. Normally, ConnectService is automatically called440 //--------------------------------------------------------------------------------------------------446 //--------------------------------------------------------------------------------------------------449 * Try to connect the current client thread to the service providing this API. Return with an error452 * For each thread that wants to use this API, either ConnectService or TryConnectService must be453 * called before any other functions in this API. Normally, ConnectService is automatically called462 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).465 //--------------------------------------------------------------------------------------------------471 //--------------------------------------------------------------------------------------------------475 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants478 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------491 * longer a connection to the service, and the functions in this API can't be used. For details, see496 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------514 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------521 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------528 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------549 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------556 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------562 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------569 //--------------------------------------------------------------------------------------------------572 //--------------------------------------------------------------------------------------------------575 //--------------------------------------------------------------------------------------------------578 //--------------------------------------------------------------------------------------------------582 //--------------------------------------------------------------------------------------------------585 //--------------------------------------------------------------------------------------------------589 //--------------------------------------------------------------------------------------------------592 //--------------------------------------------------------------------------------------------------596 //--------------------------------------------------------------------------------------------------599 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------605 //--------------------------------------------------------------------------------------------------608 //--------------------------------------------------------------------------------------------------611 //--------------------------------------------------------------------------------------------------614 //--------------------------------------------------------------------------------------------------617 //--------------------------------------------------------------------------------------------------620 //--------------------------------------------------------------------------------------------------623 //--------------------------------------------------------------------------------------------------626 //--------------------------------------------------------------------------------------------------629 //--------------------------------------------------------------------------------------------------632 //--------------------------------------------------------------------------------------------------635 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------641 //--------------------------------------------------------------------------------------------------644 //--------------------------------------------------------------------------------------------------647 //--------------------------------------------------------------------------------------------------650 //--------------------------------------------------------------------------------------------------653 //--------------------------------------------------------------------------------------------------656 //--------------------------------------------------------------------------------------------------659 //--------------------------------------------------------------------------------------------------662 //--------------------------------------------------------------------------------------------------665 //--------------------------------------------------------------------------------------------------668 //--------------------------------------------------------------------------------------------------671 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------677 //--------------------------------------------------------------------------------------------------680 //--------------------------------------------------------------------------------------------------683 //--------------------------------------------------------------------------------------------------686 //--------------------------------------------------------------------------------------------------689 //--------------------------------------------------------------------------------------------------692 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------698 //--------------------------------------------------------------------------------------------------701 //--------------------------------------------------------------------------------------------------704 //--------------------------------------------------------------------------------------------------707 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------713 //--------------------------------------------------------------------------------------------------716 //--------------------------------------------------------------------------------------------------719 //--------------------------------------------------------------------------------------------------722 //--------------------------------------------------------------------------------------------------725 //--------------------------------------------------------------------------------------------------728 //--------------------------------------------------------------------------------------------------731 //--------------------------------------------------------------------------------------------------734 //--------------------------------------------------------------------------------------------------737 //--------------------------------------------------------------------------------------------------740 //--------------------------------------------------------------------------------------------------743 //--------------------------------------------------------------------------------------------------746 //--------------------------------------------------------------------------------------------------749 //--------------------------------------------------------------------------------------------------755 //--------------------------------------------------------------------------------------------------815 //--------------------------------------------------------------------------------------------------819 //--------------------------------------------------------------------------------------------------836 //--------------------------------------------------------------------------------------------------840 //--------------------------------------------------------------------------------------------------851 //--------------------------------------------------------------------------------------------------855 //--------------------------------------------------------------------------------------------------870 //--------------------------------------------------------------------------------------------------878 //--------------------------------------------------------------------------------------------------893 //--------------------------------------------------------------------------------------------------898 //--------------------------------------------------------------------------------------------------911 //--------------------------------------------------------------------------------------------------915 //--------------------------------------------------------------------------------------------------930 //--------------------------------------------------------------------------------------------------934 //--------------------------------------------------------------------------------------------------938 //--------------------------------------------------------------------------------------------------942 //--------------------------------------------------------------------------------------------------946 //--------------------------------------------------------------------------------------------------950 //--------------------------------------------------------------------------------------------------954 //--------------------------------------------------------------------------------------------------958 //--------------------------------------------------------------------------------------------------962 //--------------------------------------------------------------------------------------------------966 //--------------------------------------------------------------------------------------------------968 (985 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------991 (998 //--------------------------------------------------------------------------------------------------1002 //--------------------------------------------------------------------------------------------------1004 (1013 //--------------------------------------------------------------------------------------------------1019 //--------------------------------------------------------------------------------------------------1028 //--------------------------------------------------------------------------------------------------1032 //--------------------------------------------------------------------------------------------------1039 //--------------------------------------------------------------------------------------------------1045 //--------------------------------------------------------------------------------------------------1054 //--------------------------------------------------------------------------------------------------1058 //--------------------------------------------------------------------------------------------------1065 //--------------------------------------------------------------------------------------------------1071 //--------------------------------------------------------------------------------------------------1080 //--------------------------------------------------------------------------------------------------1084 //--------------------------------------------------------------------------------------------------1091 //--------------------------------------------------------------------------------------------------1102 //--------------------------------------------------------------------------------------------------1108 //--------------------------------------------------------------------------------------------------1119 //--------------------------------------------------------------------------------------------------1125 //--------------------------------------------------------------------------------------------------1127 * Send a specific message to the server to be sure that the route between the device and the server1129 * This API needs to be called when any package download is over (successfully or not) and before1138 //--------------------------------------------------------------------------------------------------1144 //--------------------------------------------------------------------------------------------------1152 //--------------------------------------------------------------------------------------------------1159 //--------------------------------------------------------------------------------------------------1167 //--------------------------------------------------------------------------------------------------1173 //--------------------------------------------------------------------------------------------------1181 //--------------------------------------------------------------------------------------------------1188 //--------------------------------------------------------------------------------------------------1196 //--------------------------------------------------------------------------------------------------1202 //--------------------------------------------------------------------------------------------------1210 //--------------------------------------------------------------------------------------------------1217 //--------------------------------------------------------------------------------------------------1225 //--------------------------------------------------------------------------------------------------1231 //--------------------------------------------------------------------------------------------------1239 //--------------------------------------------------------------------------------------------------1246 //--------------------------------------------------------------------------------------------------1254 //--------------------------------------------------------------------------------------------------1260 //--------------------------------------------------------------------------------------------------1268 //--------------------------------------------------------------------------------------------------1275 //--------------------------------------------------------------------------------------------------1283 //--------------------------------------------------------------------------------------------------1290 //--------------------------------------------------------------------------------------------------1298 //--------------------------------------------------------------------------------------------------1307 //--------------------------------------------------------------------------------------------------1315 //--------------------------------------------------------------------------------------------------1321 //--------------------------------------------------------------------------------------------------1325 //--------------------------------------------------------------------------------------------------1332 //--------------------------------------------------------------------------------------------------1340 //--------------------------------------------------------------------------------------------------1346 //--------------------------------------------------------------------------------------------------1354 //--------------------------------------------------------------------------------------------------1360 //--------------------------------------------------------------------------------------------------1367 //--------------------------------------------------------------------------------------------------1373 //--------------------------------------------------------------------------------------------------1382 //--------------------------------------------------------------------------------------------------1389 //--------------------------------------------------------------------------------------------------1398 //--------------------------------------------------------------------------------------------------1407 //--------------------------------------------------------------------------------------------------1416 //--------------------------------------------------------------------------------------------------1433 //--------------------------------------------------------------------------------------------------1441 //--------------------------------------------------------------------------------------------------1452 //--------------------------------------------------------------------------------------------------1460 //--------------------------------------------------------------------------------------------------1467 //--------------------------------------------------------------------------------------------------1476 //--------------------------------------------------------------------------------------------------1485 //--------------------------------------------------------------------------------------------------1498 //--------------------------------------------------------------------------------------------------1504 //--------------------------------------------------------------------------------------------------1512 //--------------------------------------------------------------------------------------------------1521 //--------------------------------------------------------------------------------------------------1529 //--------------------------------------------------------------------------------------------------void le_avc_RemoveSessionRequestEventHandler(le_avc_SessionRequestEventHandlerRef_t handlerRef)le_result_t le_avc_GetPollingTimer(uint32_t *pollingTimerPtr)le_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)le_avc_CommInfoHandlerRef_t le_avc_AddCommInfoHandler(le_avc_CommInfoHandlerFunc_t handlerPtr, void *contextPtr)Package is certified sent by a trusted server.Definition: le_avc_interface.h:807void(* le_avc_SessionRequestHandlerFunc_t)(le_avc_SessionRequest_t request, void *contextPtr)Definition: le_avc_interface.h:991le_result_t le_avc_AcceptReboot(void)An error occurred uninstalling the update.Definition: le_avc_interface.h:782void(* le_avc_CommInfoHandlerFunc_t)(uint8_t code, const char *LE_NONNULL str, void *contextPtr)Definition: le_avc_interface.h:1004void le_avc_UnblockInstall(le_avc_BlockRequestRef_t blockRef)Package is not certified sent by a trusted server.Definition: le_avc_interface.h:809void 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:943void le_avc_RemoveCommInfoHandler(le_avc_CommInfoHandlerRef_t handlerRef)le_result_t le_avc_DeferUninstall(uint32_t deferMinutes)Install is pending (implies download complete)Definition: le_avc_interface.h:768le_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:426Definition: le_avc_interface.h:788Session with AirVantage device management server started.Definition: le_avc_interface.h:784void(* le_avc_StatusHandlerFunc_t)(le_avc_Status_t updateStatus, int32_t totalNumBytes, int32_t progress, void *contextPtr)Definition: le_avc_interface.h:968Definition: le_avc_interface.h:918le_result_t le_avc_StartSession(void)le_result_t le_avc_StopSession(void)void le_avc_RemoveStatusEventHandler(le_avc_StatusEventHandlerRef_t handlerRef)Definition: le_avc_interface.h:791Definition: le_avc_interface.h:801le_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:885struct le_avc_BlockRequest * le_avc_BlockRequestRef_tDefinition: le_avc_interface.h:959le_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:921Definition: le_avc_interface.h:796le_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:887le_result_t le_avc_GetAppUpdateName(char *updateName, size_t updateNameSize)le_result_t le_avc_GetRetryTimers(uint16_t *timerValuePtr, size_t *timerValueSizePtr)struct le_avc_CommInfoHandler * le_avc_CommInfoHandlerRef_tDefinition: le_avc_interface.h:951uint16_t le_avc_GetHttpStatus(void)struct le_avc_StatusEventHandler * le_avc_StatusEventHandlerRef_tDefinition: le_avc_interface.h:935Device Management credential is provisioned.Definition: le_avc_interface.h:924Definition: le_avc_interface.h:804le_avc_ErrorCode_t le_avc_GetErrorCode(void)void le_avc_ConnectService(void)