25 #ifndef __SB_DEVICEFIRMWAREUPDATER_H__
26 #define __SB_DEVICEFIRMWAREUPDATER_H__
28 #include <sbIDeviceFirmwareUpdater.h>
30 #include <nsIEventTarget.h>
31 #include <nsIObserver.h>
32 #include <nsIRunnable.h>
34 #include <sbIDeviceEventListener.h>
35 #include <sbIDeviceFirmwareHandler.h>
36 #include <sbIDeviceFirmwareUpdate.h>
37 #include <sbIFileDownloader.h>
39 #include <nsClassHashtable.h>
41 #include <nsHashKeys.h>
42 #include <nsInterfaceHashtable.h>
43 #include <nsStringGlue.h>
57 NS_DECL_SBIDEVICEFIRMWAREUPDATER
58 NS_DECL_SBIDEVICEEVENTLISTENER
65 already_AddRefed<sbIDeviceFirmwareHandler>
68 already_AddRefed<sbIDeviceFirmwareHandler>
88 virtual ~sbDeviceFirmwareUpdater();
105 nsInterfaceHashtableMT<nsISupportsHashKey,
108 nsClassHashtableMT<nsISupportsHashKey,
111 nsInterfaceHashtableMT<nsISupportsHashKey,
177 PRBool aRecovery = PR_FALSE);
180 virtual ~sbDeviceFirmwareUpdaterRunner();
190 #define SB_DEVICEFIRMWAREUPDATER_DESCRIPTION \
191 "Songbird Device Firmware Updater"
192 #define SB_DEVICEFIRMWAREUPDATER_CONTRACTID \
193 "@songbirdnest.com/Songbird/Device/Firmware/Updater;1"
194 #define SB_DEVICEFIRMWAREUPDATER_CLASSNAME \
195 "Songbird Device Firmware Updater"
196 #define SB_DEVICEFIRMWAREUPDATER_CID \
198 0x9a84d24f, 0xb02b, 0x42bc, \
199 { 0xa2, 0xcb, 0xb4, 0x79, 0x20, 0x23, 0xaa, 0x70 } }
nsInterfaceHashtableMT< nsISupportsHashKey, sbIFileDownloaderListener > downloaders_t
nsresult GetOperation(handleroperation_t *aOperation)
nsClassHashtableMT< nsISupportsHashKey, sbDeviceFirmwareHandlerStatus > handlerstatus_t
nsCOMPtr< nsIEventTarget > mThreadPool
nsresult RequiresRecoveryMode(sbIDevice *aDevice, sbIDeviceFirmwareHandler *aHandler)
handlerstatus_t mHandlerStatus
NS_DECL_ISUPPORTS NS_DECL_NSIRUNNABLE sbDeviceFirmwareUpdaterRunner()
nsInterfaceHashtableMT< nsISupportsHashKey, sbIDeviceFirmwareHandler > runninghandlers_t
downloaders_t mDownloaders
nsresult PutRunningHandler(sbIDevice *aDevice, sbIDeviceFirmwareHandler *aHandler)
nsCOMPtr< sbIDevice > mDevice
nsCOMPtr< sbIDeviceFirmwareHandler > mHandler
nsresult Init(sbIDevice *aDevice, sbIDeviceFirmwareUpdate *aUpdate, sbIDeviceFirmwareHandler *aHandler, PRBool aRecovery=PR_FALSE)
NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_DECL_SBIDEVICEFIRMWAREUPDATER NS_DECL_SBIDEVICEEVENTLISTENER sbDeviceFirmwareUpdater()
static NS_HIDDEN_(PLDHashOperator) EnumerateIntoArrayISupportsKey(nsISupports *aKey
nsresult SetStatus(handlerstatus_t aStatus)
nsresult GetStatus(handlerstatus_t *aStatus)
runninghandlers_t mRunningHandlers
nsCOMPtr< sbIDeviceFirmwareUpdate > mFirmwareUpdate
~sbDeviceFirmwareHandlerStatus()
runninghandlers_t mRecoveryModeHandlers
nsresult SetOperation(handleroperation_t aOperation)
sbDeviceFirmwareHandlerStatus()
nsTArray< nsCString > firmwarehandlers_t
nsresult GetCachedFirmwareUpdate(sbIDevice *aDevice, sbIDeviceFirmwareUpdate **aUpdate)
already_AddRefed< sbIDeviceFirmwareHandler > GetRunningHandler(sbIDevice *aDevice)
sbDeviceFirmwareHandlerStatus * GetHandlerStatus(sbIDeviceFirmwareHandler *aHandler)
firmwarehandlers_t mFirmwareHandlers