sbDeviceUtils.cpp File Reference
#include "sbDeviceUtils.h"
#include <algorithm>
#include <nsAlgorithm.h>
#include <nsArrayUtils.h>
#include <nsAutoPtr.h>
#include <nsCOMPtr.h>
#include <nsCRT.h>
#include <nsComponentManagerUtils.h>
#include <nsIDOMWindow.h>
#include <nsIDialogParamBlock.h>
#include <nsIMutableArray.h>
#include <nsIFile.h>
#include <nsISimpleEnumerator.h>
#include <nsIStandardURL.h>
#include <nsISupportsArray.h>
#include <nsIURI.h>
#include <nsIURL.h>
#include <nsIWindowWatcher.h>
#include <nsNetCID.h>
#include <nsThreadUtils.h>
#include "sbBaseDevice.h"
#include <sbDeviceCapsCompatibility.h>
#include "sbIDeviceCapabilities.h"
#include "sbIDeviceContent.h"
#include "sbIDeviceErrorMonitor.h"
#include "sbIDeviceHelper.h"
#include "sbIDeviceLibrary.h"
#include "sbIDeviceLibraryMediaSyncSettings.h"
#include "sbIDeviceLibrarySyncSettings.h"
#include "sbIDeviceRegistrar.h"
#include "sbIMediaItem.h"
#include <sbIMediaItemDownloader.h>
#include <sbIMediaItemDownloadService.h>
#include "sbIMediaList.h"
#include "sbIMediaListListener.h"
#include <sbITranscodeProfile.h>
#include <sbITranscodeManager.h>
#include <sbIPrompter.h>
#include "sbIWindowWatcher.h"
#include "sbLibraryUtils.h"
#include <sbPrefBranch.h>
#include <sbProxiedComponentManager.h>
#include "sbStandardProperties.h"
#include "sbStringUtils.h"
#include <sbVariantUtils.h>
#include <sbMemoryUtils.h>
#include <sbArray.h>
#include <sbIMediaInspector.h>
Include dependency graph for sbDeviceUtils.cpp:

Go to the source code of this file.

Classes

class  sbDeviceUtilsQueryUserSpaceExceeded
 
class  sbDeviceUtilsBulkSetPropertyEnumerationListener
 

Macros

#define LOG(args)   PR_BEGIN_MACRO /* nothing */ PR_END_MACRO
 
#define TRACE(args)   PR_BEGIN_MACRO /* nothing */ PR_END_MACRO
 

Functions

 NS_IMPL_THREADSAFE_ISUPPORTS1 (sbDeviceUtilsBulkSetPropertyEnumerationListener, sbIMediaListEnumerationListener)
 
 SB_AUTO_CLASS (sbAutoNSMemoryPtr, void *,!!mValue, NS_Free(mValue), mValue=nsnull)
 
 NS_IMPL_THREADSAFE_ISUPPORTS1 (sbDeviceUtilsQueryUserSpaceExceeded, sbICallWithWindowCallback) NS_IMETHODIMP sbDeviceUtilsQueryUserSpaceExceeded
 
static PRInt32 ParseInteger (nsAString const &aValue)
 
static nsresult GetContainerFormatAndCodec (nsISupports *aFormatType, PRUint32 aContentType, nsAString &aContainerFormat, nsAString &aVideoType, nsAString &aAudioType, nsAString &aCodec, sbIDevCapRange **aBitRateRange=nsnull, sbIDevCapRange **aSampleRateRange=nsnull)
 
static bool IsValueInRange (PRInt32 aValue, sbIDevCapRange *aRange)
 

Variables

sbExtensionToContentFormatEntry_t
const 
MAP_FILE_EXTENSION_CONTENT_FORMAT []
 
PRUint32 const MAP_FILE_EXTENSION_CONTENT_FORMAT_LENGTH
 
const PRInt32 K = 1000
 
static PRUint32 TranscodeToCapsContentTypeMap []
 

Macro Definition Documentation

#define LOG (   args)    PR_BEGIN_MACRO /* nothing */ PR_END_MACRO

Definition at line 94 of file sbDeviceUtils.cpp.

#define TRACE (   args)    PR_BEGIN_MACRO /* nothing */ PR_END_MACRO

Definition at line 95 of file sbDeviceUtils.cpp.

Function Documentation

static nsresult GetContainerFormatAndCodec ( nsISupports aFormatType,
PRUint32  aContentType,
nsAString &  aContainerFormat,
nsAString &  aVideoType,
nsAString &  aAudioType,
nsAString &  aCodec,
sbIDevCapRange **  aBitRateRange = nsnull,
sbIDevCapRange **  aSampleRateRange = nsnull 
)
static

Gets the format information for a format type

Definition at line 1255 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

static bool IsValueInRange ( PRInt32  aValue,
sbIDevCapRange aRange 
)
static

Helper to determine if a value is in the range

Parameters
aValuethe value to check for
aRangethe range to check for the value
Returns
true if the value is in the range else false

Definition at line 1519 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMPL_THREADSAFE_ISUPPORTS1 ( sbDeviceUtilsQueryUserSpaceExceeded  ,
sbICallWithWindowCallback   
)

Definition at line 861 of file sbDeviceUtils.cpp.

static PRInt32 ParseInteger ( nsAString const &  aValue)
static

Convert the string value to an integer

Parameters
aValuethe string version of the value
Returns
the integer version of the value or 0 if it fails

Definition at line 989 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

SB_AUTO_CLASS ( sbAutoNSMemoryPtr  ,
void *  ,
!!  mValue,
NS_Free(mValue)  ,
mValue  = nsnull 
)

Variable Documentation

const PRInt32 K = 1000

Definition at line 982 of file sbDeviceUtils.cpp.

sbExtensionToContentFormatEntry_t const MAP_FILE_EXTENSION_CONTENT_FORMAT[]

Definition at line 927 of file sbDeviceUtils.cpp.

PRUint32 const MAP_FILE_EXTENSION_CONTENT_FORMAT_LENGTH
Initial value:
=
sbExtensionToContentFormatEntry_t const MAP_FILE_EXTENSION_CONTENT_FORMAT[]

Definition at line 979 of file sbDeviceUtils.cpp.

PRUint32 TranscodeToCapsContentTypeMap[]
static
Initial value:

Maps between the device caps and the transcode profile content types

Definition at line 1244 of file sbDeviceUtils.cpp.