All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_avc_interface.h File Reference
#include "legato.h"

Go to the source code of this file.

Macros

#define LE_AVC_APP_NAME_LEN   47
 

Typedefs

typedef struct
le_avc_StatusEventHandler * 
le_avc_StatusEventHandlerRef_t
 
typedef struct
le_avc_BlockRequest * 
le_avc_BlockRequestRef_t
 
typedef void(* le_avc_StatusHandlerFunc_t )(le_avc_Status_t updateStatus, void *contextPtr)
 

Enumerations

enum  le_avc_Status_t {
  LE_AVC_NO_UPDATE, LE_AVC_DOWNLOAD_PENDING, LE_AVC_DOWNLOAD_FAILED, LE_AVC_INSTALL_PENDING,
  LE_AVC_INSTALL_COMPLETE, LE_AVC_INSTALL_FAILED
}
 
enum  le_avc_UpdateType_t { LE_AVC_FIRMWARE_UPDATE, LE_AVC_FRAMEWORK_UPDATE, LE_AVC_APPLICATION_UPDATE }
 

Functions

void le_avc_ConnectService (void)
 
void le_avc_DisconnectService (void)
 
le_avc_StatusEventHandlerRef_t le_avc_AddStatusEventHandler (le_avc_StatusHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_avc_RemoveStatusEventHandler (le_avc_StatusEventHandlerRef_t addHandlerRef)
 
le_result_t le_avc_StartSession (void)
 
le_result_t le_avc_StopSession (void)
 
le_result_t le_avc_AcceptDownload (void)
 
le_result_t le_avc_DeferDownload (uint32_t deferMinutes)
 
le_result_t le_avc_RejectDownload (void)
 
le_result_t le_avc_AcceptInstall (void)
 
le_result_t le_avc_DeferInstall (uint32_t deferMinutes)
 
le_result_t le_avc_GetUpdateType (le_avc_UpdateType_t *updateTypePtr)
 
le_result_t le_avc_GetAppUpdateName (char *updateName, size_t updateNameNumElements)
 
le_avc_BlockRequestRef_t le_avc_BlockInstall (void)
 
void le_avc_UnblockInstall (le_avc_BlockRequestRef_t blockRef)
 

Detailed Description

Legato AirVantage Connector include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define LE_AVC_APP_NAME_LEN   47

Define the maximum length of the name for an app update

Typedef Documentation

typedef struct le_avc_BlockRequest* le_avc_BlockRequestRef_t

Reference returned by BlockInstall function and used by UnblockInstall function

typedef struct le_avc_StatusEventHandler* le_avc_StatusEventHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_avc_StatusEvent'

typedef void(* le_avc_StatusHandlerFunc_t)(le_avc_Status_t updateStatus, void *contextPtr)

Handler for update availability status

Parameters
updateStatusstatus of pending update, if available
contextPtr

Enumeration Type Documentation

Status of pending update

If an update is pending, it must first be downloaded and then installed.

Enumerator
LE_AVC_NO_UPDATE 

There are no pending updates.

LE_AVC_DOWNLOAD_PENDING 

There is a pending download.

LE_AVC_DOWNLOAD_FAILED 

There was an error in downloading the update.

LE_AVC_INSTALL_PENDING 

There is a pending install (implies download complete)

LE_AVC_INSTALL_COMPLETE 

The update has been successfully installed.

LE_AVC_INSTALL_FAILED 

The was an error in installing the update.

The type of pending update

Function Documentation

le_result_t le_avc_AcceptDownload ( void  )

Accept the currently pending download

Returns
  • LE_OK on success
  • LE_FAULT on failure
le_result_t le_avc_AcceptInstall ( void  )

Accept the currently pending install

Returns
  • LE_OK on success
  • LE_FAULT on failure
le_avc_StatusEventHandlerRef_t le_avc_AddStatusEventHandler ( le_avc_StatusHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_avc_StatusEvent'

This event provides information on update availability status

Parameters
[in]handlerPtr
[in]contextPtr
le_avc_BlockRequestRef_t le_avc_BlockInstall ( void  )

Prevent any pending updates from being installed.

Returns
  • Reference for block update request (to be used later for unblocking updates)
  • NULL if the operation was not successful
void le_avc_ConnectService ( void  )

Connect the client to the service

le_result_t le_avc_DeferDownload ( uint32_t  deferMinutes)

Defer the currently pending download, for the given number of minutes

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]deferMinutes
le_result_t le_avc_DeferInstall ( uint32_t  deferMinutes)

Defer the currently pending install

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]deferMinutes
void le_avc_DisconnectService ( void  )

Disconnect the client from the service

le_result_t le_avc_GetAppUpdateName ( char *  updateName,
size_t  updateNameNumElements 
)

Get the name for the currently pending app update

Returns
  • LE_OK on success
  • LE_FAULT if not available, or is not APPL_UPDATE type
Parameters
[out]updateName
[in]updateNameNumElements
le_result_t le_avc_GetUpdateType ( le_avc_UpdateType_t updateTypePtr)

Get the update type of the currently pending update

Returns
  • LE_OK on success
  • LE_FAULT if not available
Parameters
[out]updateTypePtr
le_result_t le_avc_RejectDownload ( void  )

Reject the currently pending download

Returns
  • LE_OK on success
  • LE_FAULT on failure
void le_avc_RemoveStatusEventHandler ( le_avc_StatusEventHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_avc_StatusEvent'

Parameters
[in]addHandlerRef
le_result_t le_avc_StartSession ( void  )

Start a session with the AirVantage server

This will also cause a query to be sent to the server, for pending updates.

Returns
  • LE_OK on success
  • LE_FAULT on failure
le_result_t le_avc_StopSession ( void  )

Stop a session with the AirVantage server

Returns
  • LE_OK on success
  • LE_FAULT on failure
void le_avc_UnblockInstall ( le_avc_BlockRequestRef_t  blockRef)

Allow any pending updates to be installed

Parameters
[in]blockRefblock request ref returned by le_avc_BlockInstall