sbIDeviceFirmwareUpdater Interface Reference

import"sbIDeviceFirmwareUpdater.idl";

Inheritance diagram for sbIDeviceFirmwareUpdater:
[legend]
Collaboration diagram for sbIDeviceFirmwareUpdater:
[legend]

Public Member Functions

void checkForUpdate (in sbIDevice aDevice, in unsigned long aDeviceVendorID, in unsigned long aDeviceProductID, in sbIDeviceEventListener aListener)
 Check for an update. More...
 
void downloadUpdate (in sbIDevice aDevice, in boolean aVerifyFirmwareUpdate, in sbIDeviceEventListener aListener)
 Download an update for a device. More...
 
void verifyUpdate (in sbIDevice aDevice, in sbIDeviceFirmwareUpdate aFirmwareUpdate, in sbIDeviceEventListener aListener)
 Verify a firmware update that was previously downloaded. More...
 
void applyUpdate (in sbIDevice aDevice, in sbIDeviceFirmwareUpdate aFirmwareUpdate, in sbIDeviceEventListener aListener)
 Apply firmware update to device. More...
 
void recoveryUpdate (in sbIDevice aDevice, in sbIDeviceFirmwareUpdate aFirmwareUpdate, in unsigned long aDeviceVendorID, in unsigned long aDeviceProductID, in sbIDeviceEventListener aListener)
 Recover the device restoring it to factory state. More...
 
boolean continueUpdate (in sbIDevice aDevice, in sbIDeviceEventListener aListener)
 Continue the auto-update process. More...
 
void finalizeUpdate (in sbIDevice aDevice)
 Finalize the auto-update process. More...
 
void verifyDevice (in sbIDevice aDevice, in sbIDeviceEventListener aListener)
 Verify the firmware on the specified device. More...
 
void registerHandler (in sbIDeviceFirmwareHandler aFirmwareHandler)
 Register a firmware update handler. More...
 
void unregisterHandler (in sbIDeviceFirmwareHandler aFirmwareHandler)
 Unregister a firmware update handler. More...
 
boolean hasHandler (in sbIDevice aDevice, in unsigned long aDeviceVendorID, in unsigned long aDeviceProductID)
 Is there a handler available for the specified device. More...
 
sbIDeviceFirmwareHandler getHandler (in sbIDevice aDevice, in unsigned long aDeviceVendorID, in unsigned long aDeviceProductID)
 Get the firmware handler for the specified device. More...
 
sbIDeviceFirmwareHandler getActiveHandler (in sbIDevice aDevice)
 Get the running firmware handler for the specified device. More...
 
void cancel (in sbIDevice aDevice)
 Cancel the current operation. More...
 
void requireRecovery (in sbIDevice aDevice)
 Force a device to go through recovery mode. More...
 

Detailed Description

Note
The default implementation of this interface is threadsafe.
The default implementation is a service and should Only be used as such.
The methods which take an sbIDeviceEventListener will also send events to the registered device listeners. You only need to use your own listener if you do not have a listener registered with the device.

Definition at line 45 of file sbIDeviceFirmwareUpdater.idl.

Member Function Documentation

void sbIDeviceFirmwareUpdater::applyUpdate ( in sbIDevice  aDevice,
in sbIDeviceFirmwareUpdate  aFirmwareUpdate,
in sbIDeviceEventListener  aListener 
)

Apply firmware update to device.

Parameters
aDevice- The device to update
aFirmwareUpdate- The firmware update to apply
aListener[optional] - Device listener to receive events
Note
The flow of events for this method is the following: firmware update start, firmware write start, N * firmware write progress, firmware write end, firmware verify start, N * firmware verify progress, firmware verify end, firmware update finished.
Any error event that occurs will cancel this operation.
void sbIDeviceFirmwareUpdater::cancel ( in sbIDevice  aDevice)

Cancel the current operation.

void sbIDeviceFirmwareUpdater::checkForUpdate ( in sbIDevice  aDevice,
in unsigned long  aDeviceVendorID,
in unsigned long  aDeviceProductID,
in sbIDeviceEventListener  aListener 
)

Check for an update.

Parameters
aDevice- Device for which to check for an update
aDeviceVendorID[optional] - The device vendor ID. Set to 0 to fetch from device instance or if not available.
aDeviceProductID[optional] - The device product ID. Set to 0 to fetch from device instance or if not available.
aListener[optional] - Device listener to recieve events
Note
The flow of events for this method is the following: firmware check for update start, firmware check for update end.
The end event will contain an boolean as its data, it will either be true (update available) or false (no update for you).
Any error event that occurs will cancel this operation.
boolean sbIDeviceFirmwareUpdater::continueUpdate ( in sbIDevice  aDevice,
in sbIDeviceEventListener  aListener 
)

Continue the auto-update process.

Parameters
aDevice- The device to update
aListener[optional] - Device listener to recieve events
void sbIDeviceFirmwareUpdater::downloadUpdate ( in sbIDevice  aDevice,
in boolean  aVerifyFirmwareUpdate,
in sbIDeviceEventListener  aListener 
)

Download an update for a device.

Parameters
aDevice- Device for which to download an update
aVerifyFirmwareUpdate- Verify firmware update after it's downloaded
aListener[optional] - Device listener to recieve events
Note
The flow of events for this method is the following: firmware download start, N * firmware download progress, firmware download end.
The end event will contain an sbIDeviceFirmwareUpdate, or null if there is no update available.
Any error event that occurs will cancel this operation.
void sbIDeviceFirmwareUpdater::finalizeUpdate ( in sbIDevice  aDevice)

Finalize the auto-update process.

Note
This method needs to be called regardless of if the update process succeeds or not. If you do not call this method you will leak the firmware handler associated with the device.
sbIDeviceFirmwareHandler sbIDeviceFirmwareUpdater::getActiveHandler ( in sbIDevice  aDevice)

Get the running firmware handler for the specified device.

sbIDeviceFirmwareHandler sbIDeviceFirmwareUpdater::getHandler ( in sbIDevice  aDevice,
in unsigned long  aDeviceVendorID,
in unsigned long  aDeviceProductID 
)

Get the firmware handler for the specified device.

Parameters
aDevice- The device
aDeviceVendorID[optional] - The device vendor ID. Set to 0 to fetch from device instance or if not available.
aDeviceProductID[optional] - The device product ID. Set to 0 to fetch from device instance or if not available.
Returns
The device firmware handler
Exceptions
NS_ERROR_NOT_AVAILABLEwhen there is no firmware handler available for the specified device
Note
This returns a new instance of a handler.
boolean sbIDeviceFirmwareUpdater::hasHandler ( in sbIDevice  aDevice,
in unsigned long  aDeviceVendorID,
in unsigned long  aDeviceProductID 
)

Is there a handler available for the specified device.

Parameters
aDevice- The device
aDeviceVendorID[optional] - The device vendor ID. Set to 0 to fetch from device instance or if not available.
aDeviceProductID[optional] - The device product ID. Set to 0 to fetch from device instance or if not available.
Return values
True- Firmware Handler is available for specified device
False- No firmware handler available for specified device
void sbIDeviceFirmwareUpdater::recoveryUpdate ( in sbIDevice  aDevice,
in sbIDeviceFirmwareUpdate  aFirmwareUpdate,
in unsigned long  aDeviceVendorID,
in unsigned long  aDeviceProductID,
in sbIDeviceEventListener  aListener 
)

Recover the device restoring it to factory state.

Parameters
aDevice- The device to restore to factory state
aFirmwareUpdate[optional] - The firmware update to apply to the device when recovering.
aDeviceVendorID[optional] - The device vendor ID. Set to 0 to fetch from device instance or if not available.
aDeviceProductID[optional] - The device product ID. Set to 0 to fetch from device instance or if not available.
aListener[optional] - Device listener to receive events
void sbIDeviceFirmwareUpdater::registerHandler ( in sbIDeviceFirmwareHandler  aFirmwareHandler)

Register a firmware update handler.

Parameters
aFirmwareHandler- The firmware handler to register
Note
This is only necessary if you wish to register a handler at runtime.
void sbIDeviceFirmwareUpdater::requireRecovery ( in sbIDevice  aDevice)

Force a device to go through recovery mode.

void sbIDeviceFirmwareUpdater::unregisterHandler ( in sbIDeviceFirmwareHandler  aFirmwareHandler)

Unregister a firmware update handler.

Parameters
aFirmwareHandler- The firmware handler to unregister
Note
This is only necessary if you wish to unregister a handler at runtime.
void sbIDeviceFirmwareUpdater::verifyDevice ( in sbIDevice  aDevice,
in sbIDeviceEventListener  aListener 
)

Verify the firmware on the specified device.

Parameters
aDevice- The device to verify
aListener[optional] - Device listener to recieve events
Note
The flow of events for this method is the following: firmware verify start, N * firmware verify start, firmware verify end.
Any error event that occurs will cancel this operation.
void sbIDeviceFirmwareUpdater::verifyUpdate ( in sbIDevice  aDevice,
in sbIDeviceFirmwareUpdate  aFirmwareUpdate,
in sbIDeviceEventListener  aListener 
)

Verify a firmware update that was previously downloaded.

Parameters
aDevice- The device associated with the firmware update
aFirmwareUpdate- The firmware update to verify
aListener[optional] - Device listener to recieve events
Note
The flow of events for this method is the following: firmware image verify start, N * firmware image verify progress, firmware image verify end.
Any error event that occurs will cancel this operation.

The documentation for this interface was generated from the following file: