sbDeviceFirmwareDownloader.cpp File Reference
#include "sbDeviceFirmwareDownloader.h"
#include <nsIFile.h>
#include <nsIHttpChannel.h>
#include <nsIIOService.h>
#include <nsILocalFile.h>
#include <nsIMultiPartChannel.h>
#include <nsIProperties.h>
#include <nsIPropertyBag2.h>
#include <nsITextToSubURI.h>
#include <nsIURL.h>
#include <nsIUTF8ConverterService.h>
#include <nsIVariant.h>
#include <nsAppDirectoryServiceDefs.h>
#include <nsAutoLock.h>
#include <nsCRT.h>
#include <nsHashKeys.h>
#include <nsServiceManagerUtils.h>
#include <nsXPCOM.h>
#include <prmem.h>
#include <sbIDevice.h>
#include <sbIDeviceEventTarget.h>
#include <sbIDeviceProperties.h>
#include <sbProxiedComponentManager.h>
#include <sbStringUtils.h>
#include <sbVariantUtils.h>
#include "sbDeviceFirmwareUpdate.h"
Include dependency graph for sbDeviceFirmwareDownloader.cpp:

Go to the source code of this file.

Macros

#define FIRMWARE_FILE_PREF   "firmware.cache.file"
 
#define FIRMWARE_VERSION_PREF   "firmware.cache.version"
 
#define FIRMWARE_READABLE_PREF   "firmware.cache.readableVersion"
 
#define FIRMWARE_CACHE_ROOT_NAME   "firmware_cache"
 
#define FIRMWARE_CACHE_LAYOUT_VERSION_2_NAME   "v2"
 
#define FIRMWARE_CACHE_CURRENT_VERSION_NAME   FIRMWARE_CACHE_LAYOUT_VERSION_2_NAME
 

Functions

static PRInt32 codetovalue (unsigned char c)
 
static PRStatus decode4to3 (const unsigned char *src, unsigned char *dest)
 
static PRStatus decode3to2 (const unsigned char *src, unsigned char *dest)
 
static PRStatus decode2to1 (const unsigned char *src, unsigned char *dest)
 
static PRStatus decode (const unsigned char *src, PRUint32 srclen, unsigned char *dest)
 
static char * SB_Base64Decode (const char *src, PRUint32 srclen, char *dest)
 
static nsCString GetContentDispositionFilename (const nsACString &contentDisposition)
 
static nsresult UnescapeFragment (const nsACString &aFragment, nsIURI *aURI, nsAString &aResult)
 
static nsresult UnescapeFragment (const nsACString &aFragment, nsIURI *aURI, nsACString &aResult)
 
 NS_IMPL_THREADSAFE_ISUPPORTS1 (sbDeviceFirmwareDownloader, sbIFileDownloaderListener) sbDeviceFirmwareDownloader
 

Macro Definition Documentation

#define FIRMWARE_CACHE_CURRENT_VERSION_NAME   FIRMWARE_CACHE_LAYOUT_VERSION_2_NAME

Definition at line 62 of file sbDeviceFirmwareDownloader.cpp.

#define FIRMWARE_CACHE_LAYOUT_VERSION_2_NAME   "v2"

Definition at line 61 of file sbDeviceFirmwareDownloader.cpp.

#define FIRMWARE_CACHE_ROOT_NAME   "firmware_cache"

Definition at line 60 of file sbDeviceFirmwareDownloader.cpp.

#define FIRMWARE_FILE_PREF   "firmware.cache.file"

Definition at line 57 of file sbDeviceFirmwareDownloader.cpp.

#define FIRMWARE_READABLE_PREF   "firmware.cache.readableVersion"

Definition at line 59 of file sbDeviceFirmwareDownloader.cpp.

#define FIRMWARE_VERSION_PREF   "firmware.cache.version"

Definition at line 58 of file sbDeviceFirmwareDownloader.cpp.

Function Documentation

static PRInt32 codetovalue ( unsigned char  c)
static

Definition at line 65 of file sbDeviceFirmwareDownloader.cpp.

Here is the caller graph for this function:

static PRStatus decode ( const unsigned char *  src,
PRUint32  srclen,
unsigned char *  dest 
)
static

Definition at line 178 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static PRStatus decode2to1 ( const unsigned char *  src,
unsigned char *  dest 
)
static

Definition at line 149 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static PRStatus decode3to2 ( const unsigned char *  src,
unsigned char *  dest 
)
static

Definition at line 111 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static PRStatus decode4to3 ( const unsigned char *  src,
unsigned char *  dest 
)
static

Definition at line 87 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static nsCString GetContentDispositionFilename ( const nsACString &  contentDisposition)
static

Definition at line 264 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMPL_THREADSAFE_ISUPPORTS1 ( sbDeviceFirmwareDownloader  ,
sbIFileDownloaderListener   
)

Definition at line 402 of file sbDeviceFirmwareDownloader.cpp.

static char* SB_Base64Decode ( const char *  src,
PRUint32  srclen,
char *  dest 
)
static

Definition at line 216 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static nsresult UnescapeFragment ( const nsACString &  aFragment,
nsIURI *  aURI,
nsAString &  aResult 
)
static

Definition at line 376 of file sbDeviceFirmwareDownloader.cpp.

Here is the caller graph for this function:

static nsresult UnescapeFragment ( const nsACString &  aFragment,
nsIURI *  aURI,
nsACString &  aResult 
)
static

Definition at line 391 of file sbDeviceFirmwareDownloader.cpp.

Here is the call graph for this function: