le_avc_interface.h
Go to the documentation of this file.
44 * server; for instance if a call to le_avc_AcceptDownload() when the session is stopped, avcService60 * Note that even if an app calls le_avc_AcceptInstall(), the install may still be blocked by another62 * le_avc_DeferInstall() to defer the install for the specified number of minutes. After the defer66 * If an uninstall is pending, then le_avc_AcceptUninstall() can be used to allow the uninstall to70 * signal the server to start downloading the new application. To proceed with an upgrade process,75 * is active. An app should start an AirVantage session before accepting an app install/uninstall,84 * In case of any error incurred during app download/install, an error code will be set which can be101 * An app can add a session control handler using le_avc_AddSessionRequestEventHandler(). Requests102 * by user apps to open or close session will be forwarded to the session control handler. If no app109 * according to the polling timer. The device initates the connection periodically, so that it can110 * poll the server if there are any pending jobs. Writing 0 to the polling timer disables polling111 * mode. Polling timer values range from 0 to 525600 minutes. The polling timer value is persistent.112 * le_avc_GetPollingTimer() reads the polling timer and le_avc_SetPollingTimer() writes the polling119 * failed, http error code received), the embedded module will initiate a new connection according120 * to the values defined in the retry timers. The timers are tried in sequence until a connection is122 * exhausted, a connection will be initiated only on a command from user (le_avc_startSession() )126 * le_avc_SetRetryTimers() writes the polling timers. When writing to the retry timers, values of130 * The AirVantage server can request to reboot the device: in this case a notification is sent to131 * registered apps, which can either accept the reboot with le_avc_AcceptReboot() or defer it for132 * the specified number of minutes with le_avc_DeferReboot(). After the defer time has elapsed, the133 * pending reboot notification will be re-sent, to allow the registered app to make a new decision141 * firmware package was installed (after a platform reboot). In this case a notification is sent to163 * After an AirVantage session is started, if there's no activity from the modem within the timer164 * interval, then LE_AVC_NO_UPDATE state will be returned to the app. However, this modem activity165 * timeout can be overridden by setting an integer value at /apps/avcService/modemActivityTimeout.166 * The modem activity timer is initialized only when the avcService starts. If a valid entry >0 is200 //--------------------------------------------------------------------------------------------------204 //--------------------------------------------------------------------------------------------------207 //--------------------------------------------------------------------------------------------------210 * Connect the current client thread to the service providing this API. Block until the service is213 * For each thread that wants to use this API, either ConnectService or TryConnectService must be214 * called before any other functions in this API. Normally, ConnectService is automatically called219 //--------------------------------------------------------------------------------------------------225 //--------------------------------------------------------------------------------------------------228 * Try to connect the current client thread to the service providing this API. Return with an error231 * For each thread that wants to use this API, either ConnectService or TryConnectService must be232 * called before any other functions in this API. Normally, ConnectService is automatically called241 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).244 //--------------------------------------------------------------------------------------------------250 //--------------------------------------------------------------------------------------------------254 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants257 //--------------------------------------------------------------------------------------------------264 //--------------------------------------------------------------------------------------------------270 * longer a connection to the service, and the functions in this API can't be used. For details, see275 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------286 //--------------------------------------------------------------------------------------------------289 //--------------------------------------------------------------------------------------------------293 //--------------------------------------------------------------------------------------------------296 //--------------------------------------------------------------------------------------------------300 //--------------------------------------------------------------------------------------------------303 //--------------------------------------------------------------------------------------------------307 //--------------------------------------------------------------------------------------------------310 //--------------------------------------------------------------------------------------------------314 //--------------------------------------------------------------------------------------------------317 //--------------------------------------------------------------------------------------------------321 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------328 //--------------------------------------------------------------------------------------------------331 //--------------------------------------------------------------------------------------------------335 //--------------------------------------------------------------------------------------------------338 //--------------------------------------------------------------------------------------------------341 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------348 //--------------------------------------------------------------------------------------------------351 //--------------------------------------------------------------------------------------------------354 //--------------------------------------------------------------------------------------------------357 //--------------------------------------------------------------------------------------------------361 //--------------------------------------------------------------------------------------------------364 //--------------------------------------------------------------------------------------------------370 //--------------------------------------------------------------------------------------------------411 //--------------------------------------------------------------------------------------------------415 //--------------------------------------------------------------------------------------------------426 //--------------------------------------------------------------------------------------------------430 //--------------------------------------------------------------------------------------------------445 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------468 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------486 //--------------------------------------------------------------------------------------------------490 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------514 //--------------------------------------------------------------------------------------------------516 (533 //--------------------------------------------------------------------------------------------------537 //--------------------------------------------------------------------------------------------------539 (546 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------561 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------572 //--------------------------------------------------------------------------------------------------578 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------591 //--------------------------------------------------------------------------------------------------598 //--------------------------------------------------------------------------------------------------611 //--------------------------------------------------------------------------------------------------617 //--------------------------------------------------------------------------------------------------627 //--------------------------------------------------------------------------------------------------633 //--------------------------------------------------------------------------------------------------635 * Send a specific message to the server to be sure that the route between the device and the server637 * This API needs to be called when any package download is over (successfully or not) and before646 //--------------------------------------------------------------------------------------------------652 //--------------------------------------------------------------------------------------------------660 //--------------------------------------------------------------------------------------------------666 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------681 //--------------------------------------------------------------------------------------------------689 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------703 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------718 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------732 //--------------------------------------------------------------------------------------------------739 //--------------------------------------------------------------------------------------------------747 //--------------------------------------------------------------------------------------------------753 //--------------------------------------------------------------------------------------------------761 //--------------------------------------------------------------------------------------------------768 //--------------------------------------------------------------------------------------------------776 //--------------------------------------------------------------------------------------------------783 //--------------------------------------------------------------------------------------------------791 //--------------------------------------------------------------------------------------------------800 //--------------------------------------------------------------------------------------------------808 //--------------------------------------------------------------------------------------------------814 //--------------------------------------------------------------------------------------------------818 //--------------------------------------------------------------------------------------------------825 //--------------------------------------------------------------------------------------------------833 //--------------------------------------------------------------------------------------------------839 //--------------------------------------------------------------------------------------------------847 //--------------------------------------------------------------------------------------------------853 //--------------------------------------------------------------------------------------------------860 //--------------------------------------------------------------------------------------------------866 //--------------------------------------------------------------------------------------------------875 //--------------------------------------------------------------------------------------------------882 //--------------------------------------------------------------------------------------------------891 //--------------------------------------------------------------------------------------------------900 //--------------------------------------------------------------------------------------------------909 //--------------------------------------------------------------------------------------------------926 //--------------------------------------------------------------------------------------------------934 //--------------------------------------------------------------------------------------------------946 //--------------------------------------------------------------------------------------------------954 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------970 //--------------------------------------------------------------------------------------------------void le_avc_RemoveSessionRequestEventHandler(le_avc_SessionRequestEventHandlerRef_t handlerRef)le_result_t le_avc_GetPollingTimer(uint32_t *pollingTimerPtr)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:516le_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)void(* le_avc_SessionRequestHandlerFunc_t)(le_avc_SessionRequest_t request, void *contextPtr)Definition: le_avc_interface.h:539le_result_t le_avc_AcceptReboot(void)An error occurred uninstalling the update.Definition: le_avc_interface.h:397void 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_tDefinition: le_avc_interface.h:499le_result_t le_avc_DeferUninstall(uint32_t deferMinutes)Install is pending (implies download complete)Definition: le_avc_interface.h:383le_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:205le_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_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:460struct le_avc_BlockRequest * le_avc_BlockRequestRef_tDefinition: le_avc_interface.h:507le_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_GetApnConfig(char *apnName, size_t apnNameSize, char *userName, size_t userNameSize, char *userPwd, size_t userPwdSize)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:462le_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:491le_avc_ErrorCode_t le_avc_GetErrorCode(void)void le_avc_ConnectService(void)