#include <sbDeviceFirmwareUpdater.h>
Public Member Functions | |
NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_DECL_SBIDEVICEFIRMWAREUPDATER NS_DECL_SBIDEVICEEVENTLISTENER | sbDeviceFirmwareUpdater () |
nsresult | Init () |
nsresult | Shutdown () |
already_AddRefed < sbIDeviceFirmwareHandler > | GetRunningHandler (sbIDevice *aDevice) |
already_AddRefed < sbIDeviceFirmwareHandler > | GetRunningHandler (sbIDevice *aDevice, PRUint32 aVendorID, PRUint32 aProductID, sbIDeviceEventListener *aListener, PRBool aCreate) |
nsresult | PutRunningHandler (sbIDevice *aDevice, sbIDeviceFirmwareHandler *aHandler) |
sbDeviceFirmwareHandlerStatus * | GetHandlerStatus (sbIDeviceFirmwareHandler *aHandler) |
nsresult | RequiresRecoveryMode (sbIDevice *aDevice, sbIDeviceFirmwareHandler *aHandler) |
nsresult | GetCachedFirmwareUpdate (sbIDevice *aDevice, sbIDeviceFirmwareUpdate **aUpdate) |
Public Member Functions inherited from sbIDeviceFirmwareUpdater | |
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... | |
Public Member Functions inherited from sbIDeviceEventListener | |
void | onDeviceEvent (in sbIDeviceEvent aEvent) |
Protected Types | |
typedef nsTArray< nsCString > | firmwarehandlers_t |
typedef nsInterfaceHashtableMT < nsISupportsHashKey, sbIDeviceFirmwareHandler > | runninghandlers_t |
typedef nsClassHashtableMT < nsISupportsHashKey, sbDeviceFirmwareHandlerStatus > | handlerstatus_t |
typedef nsInterfaceHashtableMT < nsISupportsHashKey, sbIFileDownloaderListener > | downloaders_t |
Static Protected Member Functions | |
template<class T > | |
static | NS_HIDDEN_ (PLDHashOperator) EnumerateIntoArrayISupportsKey(nsISupports *aKey |
Protected Attributes | |
static T * | aData |
static T void * | aArray |
PRMonitor * | mMonitor |
PRPackedBool | mIsShutdown |
firmwarehandlers_t | mFirmwareHandlers |
runninghandlers_t | mRunningHandlers |
runninghandlers_t | mRecoveryModeHandlers |
handlerstatus_t | mHandlerStatus |
downloaders_t | mDownloaders |
nsCOMPtr< nsIEventTarget > | mThreadPool |
Definition at line 50 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 112 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 101 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 109 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 106 of file sbDeviceFirmwareUpdater.h.
NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_DECL_SBIDEVICEFIRMWAREUPDATER NS_DECL_SBIDEVICEEVENTLISTENER sbDeviceFirmwareUpdater::sbDeviceFirmwareUpdater | ( | ) |
nsresult sbDeviceFirmwareUpdater::GetCachedFirmwareUpdate | ( | sbIDevice * | aDevice, |
sbIDeviceFirmwareUpdate ** | aUpdate | ||
) |
Definition at line 344 of file sbDeviceFirmwareUpdater.cpp.
sbDeviceFirmwareHandlerStatus * sbDeviceFirmwareUpdater::GetHandlerStatus | ( | sbIDeviceFirmwareHandler * | aHandler | ) |
Definition at line 299 of file sbDeviceFirmwareUpdater.cpp.
already_AddRefed< sbIDeviceFirmwareHandler > sbDeviceFirmwareUpdater::GetRunningHandler | ( | sbIDevice * | aDevice | ) |
Definition at line 229 of file sbDeviceFirmwareUpdater.cpp.
already_AddRefed< sbIDeviceFirmwareHandler > sbDeviceFirmwareUpdater::GetRunningHandler | ( | sbIDevice * | aDevice, |
PRUint32 | aVendorID, | ||
PRUint32 | aProductID, | ||
sbIDeviceEventListener * | aListener, | ||
PRBool | aCreate | ||
) |
Definition at line 244 of file sbDeviceFirmwareUpdater.cpp.
nsresult sbDeviceFirmwareUpdater::Init | ( | ) |
Definition at line 91 of file sbDeviceFirmwareUpdater.cpp.
|
staticprotected |
nsresult sbDeviceFirmwareUpdater::PutRunningHandler | ( | sbIDevice * | aDevice, |
sbIDeviceFirmwareHandler * | aHandler | ||
) |
Definition at line 277 of file sbDeviceFirmwareUpdater.cpp.
nsresult sbDeviceFirmwareUpdater::RequiresRecoveryMode | ( | sbIDevice * | aDevice, |
sbIDeviceFirmwareHandler * | aHandler | ||
) |
Definition at line 323 of file sbDeviceFirmwareUpdater.cpp.
nsresult sbDeviceFirmwareUpdater::Shutdown | ( | ) |
Definition at line 171 of file sbDeviceFirmwareUpdater.cpp.
|
protected |
Definition at line 94 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 94 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 125 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 102 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 123 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 99 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 98 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 121 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 116 of file sbDeviceFirmwareUpdater.h.
|
protected |
Definition at line 127 of file sbDeviceFirmwareUpdater.h.