sbDeviceFirmwareUpdater Class Reference

#include <sbDeviceFirmwareUpdater.h>

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

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)
 
sbDeviceFirmwareHandlerStatusGetHandlerStatus (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
 

Detailed Description

Definition at line 50 of file sbDeviceFirmwareUpdater.h.

Member Typedef Documentation

typedef nsInterfaceHashtableMT<nsISupportsHashKey, sbIFileDownloaderListener> sbDeviceFirmwareUpdater::downloaders_t
protected

Definition at line 112 of file sbDeviceFirmwareUpdater.h.

typedef nsTArray<nsCString> sbDeviceFirmwareUpdater::firmwarehandlers_t
protected

Definition at line 101 of file sbDeviceFirmwareUpdater.h.

typedef nsClassHashtableMT<nsISupportsHashKey, sbDeviceFirmwareHandlerStatus> sbDeviceFirmwareUpdater::handlerstatus_t
protected

Definition at line 109 of file sbDeviceFirmwareUpdater.h.

typedef nsInterfaceHashtableMT<nsISupportsHashKey, sbIDeviceFirmwareHandler> sbDeviceFirmwareUpdater::runninghandlers_t
protected

Definition at line 106 of file sbDeviceFirmwareUpdater.h.

Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_DECL_SBIDEVICEFIRMWAREUPDATER NS_DECL_SBIDEVICEEVENTLISTENER sbDeviceFirmwareUpdater::sbDeviceFirmwareUpdater ( )

Member Function Documentation

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

nsresult sbDeviceFirmwareUpdater::Init ( )

Definition at line 91 of file sbDeviceFirmwareUpdater.cpp.

template<class T >
static sbDeviceFirmwareUpdater::NS_HIDDEN_ ( PLDHashOperator  )
staticprotected
nsresult sbDeviceFirmwareUpdater::PutRunningHandler ( sbIDevice aDevice,
sbIDeviceFirmwareHandler aHandler 
)

Definition at line 277 of file sbDeviceFirmwareUpdater.cpp.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Member Data Documentation

T void* sbDeviceFirmwareUpdater::aArray
protected

Definition at line 94 of file sbDeviceFirmwareUpdater.h.

T* sbDeviceFirmwareUpdater::aData
protected

Definition at line 94 of file sbDeviceFirmwareUpdater.h.

downloaders_t sbDeviceFirmwareUpdater::mDownloaders
protected

Definition at line 125 of file sbDeviceFirmwareUpdater.h.

firmwarehandlers_t sbDeviceFirmwareUpdater::mFirmwareHandlers
protected

Definition at line 102 of file sbDeviceFirmwareUpdater.h.

handlerstatus_t sbDeviceFirmwareUpdater::mHandlerStatus
protected

Definition at line 123 of file sbDeviceFirmwareUpdater.h.

PRPackedBool sbDeviceFirmwareUpdater::mIsShutdown
protected

Definition at line 99 of file sbDeviceFirmwareUpdater.h.

PRMonitor* sbDeviceFirmwareUpdater::mMonitor
protected

Definition at line 98 of file sbDeviceFirmwareUpdater.h.

runninghandlers_t sbDeviceFirmwareUpdater::mRecoveryModeHandlers
protected

Definition at line 121 of file sbDeviceFirmwareUpdater.h.

runninghandlers_t sbDeviceFirmwareUpdater::mRunningHandlers
protected

Definition at line 116 of file sbDeviceFirmwareUpdater.h.

nsCOMPtr<nsIEventTarget> sbDeviceFirmwareUpdater::mThreadPool
protected

Definition at line 127 of file sbDeviceFirmwareUpdater.h.


The documentation for this class was generated from the following files: