25 #ifndef __SB_DEVICEFIRMWAREDOWNLOADER_H__
26 #define __SB_DEVICEFIRMWAREDOWNLOADER_H__
31 #include <nsIXMLHttpRequest.h>
34 #include <nsStringGlue.h>
37 #include <sbIDevice.h>
38 #include <sbIDeviceEvent.h>
39 #include <sbIDeviceEventListener.h>
40 #include <sbIDeviceFirmwareHandler.h>
41 #include <sbIDeviceManager.h>
42 #include <sbIFileDownloader.h>
48 NS_DECL_SBIFILEDOWNLOADERLISTENER
56 const nsAString &aCacheDirName,
71 const nsAString &aCacheDirName,
93 PRBool aAsync = PR_TRUE);
98 nsCOMPtr<nsIFile> mCacheDir;
99 nsCOMPtr<nsIFile> mDeviceCacheDir;
100 nsCOMPtr<sbIDevice> mDevice;
101 nsCOMPtr<sbIDeviceEventListener> mListener;
102 nsCOMPtr<sbIDeviceFirmwareHandler> mHandler;
103 nsCOMPtr<sbIFileDownloader> mDownloader;
104 PRPackedBool mIsBusy;
static nsresult CacheFirmwareUpdate(sbIDevice *aDevice, sbIDeviceFirmwareUpdate *aFirmwareUpdate, sbIDeviceFirmwareUpdate **aCachedFirmwareUpdate)
PRBool IsAlreadyInCache()
nsresult SendDeviceEvent(sbIDeviceEvent *aEvent, PRBool aAsync=PR_TRUE)
static nsresult CreateCacheDirForDevice(sbIDevice *aDevice, nsIFile *aCacheRoot, nsIFile **aCacheDir)
static nsresult CreateDirInCacheRoot(const nsAString &aDirName, nsIFile **aNewDir)
nsresult Init(sbIDevice *aDevice, sbIDeviceEventListener *aListener, sbIDeviceFirmwareHandler *aHandler)
nsresult HandleComplete()
static nsresult CreateCacheRoot(nsIFile **aCacheRoot)
nsresult GetCachedFile(nsIFile **aFile)
NS_DECL_ISUPPORTS NS_DECL_SBIFILEDOWNLOADERLISTENER sbDeviceFirmwareDownloader()
nsresult CreateDeviceEvent(PRUint32 aType, nsIVariant *aData, sbIDeviceEvent **aEvent)
virtual ~sbDeviceFirmwareDownloader()
nsresult HandleProgress()
_updateTextAndScrollDataForFrame aData