sbDeviceUtils Class Reference

#include <sbDeviceUtils.h>

Static Public Member Functions

static nsresult GetOrganizedPath (nsIFile *aParent, sbIMediaItem *aItem, nsIFile **_retval)
 
static nsresult BulkSetProperty (sbIMediaList *aMediaList, const nsAString &aPropertyId, const nsAString &aPropertyValue, sbIPropertyArray *aPropertyFilter=nsnull, PRInt32 *aAbortFlag=nsnull)
 
static nsresult DeleteByProperty (sbIMediaList *aMediaList, nsAString const &aProperty, nsAString const &aValue)
 
static nsresult DeleteUnavailableItems (sbIMediaList *aMediaList)
 
static nsresult GetDeviceLibraryForItem (sbIDevice *aDevice, sbIMediaItem *aItem, sbIDeviceLibrary **_retval)
 
static nsresult NewDeviceLibraryURI (sbIDeviceLibrary *aDeviceLibrary, const nsCString &aSpec, nsIURI **aURI)
 
static nsresult GetDeviceLibraryForLibrary (sbIDevice *aDevice, sbILibrary *aLibrary, sbIDeviceLibrary **_retval)
 
static nsresult GetMediaItemByDevicePersistentId (sbILibrary *aLibrary, const nsAString &aDevicePersistentId, sbIMediaItem **aItem)
 
static nsresult GetOriginMediaItemByDevicePersistentId (sbILibrary *aLibrary, const nsAString &aDevicePersistentId, sbIMediaItem **aItem)
 
static nsresult GetDeviceWriteLength (sbIDeviceLibrary *aDeviceLibrary, sbIMediaItem *aMediaItem, PRUint64 *aWriteLength)
 
static nsresult QueryUserSpaceExceeded (sbIDevice *aDevice, sbIDeviceLibrary *aLibrary, PRInt64 aSpaceNeeded, PRInt64 aSpaceAvailable, PRBool *aAbort)
 
static nsresult QueryUserAbortRip (PRBool *aAbort)
 
static nsresult QueryUserViewErrors (sbIDevice *aDevice)
 
static nsresult ShowDeviceErrors (sbIDevice *aDevice)
 
static nsresult SetLinkedSyncPartner (sbIDevice *aDevice)
 
static bool ArePlaylistsSupported (sbIDevice *aDevice)
 
static nsresult GetFormatTypeForItem (sbIMediaItem *aItem, sbExtensionToContentFormatEntry_t &aFormatType, PRUint32 &aBitRate, PRUint32 &aSampleRate)
 For a media item, get format information describing it (extension, mime type, etc. More...
 
static nsresult GetFormatTypeForItem (sbIMediaItem *aItem, sbExtensionToContentFormatEntry_t &aFormatType, PRUint32 &aSampleRate, PRUint32 &aChannels, PRUint32 &aBitRate)
 For a media item, get format information describing it (extension, mime type, etc. More...
 
static nsresult GetFormatTypeForURI (nsIURI *aURI, sbExtensionToContentFormatEntry_t &aFormatType)
 For a URI, get format information describing it (extension, mime type, etc. More...
 
static nsresult GetFormatTypeForURL (const nsAString &aURL, sbExtensionToContentFormatEntry_t &aFormatType)
 For a URL, get format information describing it (extension, mime type, etc. More...
 
static nsresult GetFormatTypesForMimeType (const nsAString &aMimeType, const PRUint32 aContentType, nsTArray< sbExtensionToContentFormatEntry_t > &aFormatTypeList)
 For a MIME type, get format information describing it (extension, mime type, etc. More...
 
static nsresult GetAudioMimeTypeForFormatTypes (const nsAString &aContainer, const nsAString &aCodec, nsAString &aMimeType)
 
static nsresult DoesItemNeedTranscoding (sbExtensionToContentFormatEntry_t &aFormatType, PRUint32 &aBitRate, PRUint32 &aSampleRate, sbIDevice *aDevice, bool &aNeedsTranscoding)
 Determine if an item needs transcoding. More...
 
static nsresult DoesItemNeedTranscoding (PRUint32 aTranscodeType, sbIMediaFormat *aMediaFormat, sbIDevice *aDevice, bool &aNeedsTranscoding)
 Determine if an item needs transcoding NOTE: This is deprecated, use other overload. More...
 
static nsresult GetTranscodeProfiles (PRUint32 aType, nsIArray **aProfiles)
 
static nsresult GetSupportedTranscodeProfiles (PRUint32 aType, sbIDevice *aDevice, nsIArray **aProfiles)
 
static nsresult ApplyPropertyPreferencesToProfile (sbIDevice *aDevice, nsIArray *aPropertyArray, nsString aPrefNameBase)
 
static nsresult GetTranscodedFileExtension (sbITranscodeProfile *aProfile, nsCString &aExtension)
 
static nsresult GetCodecAndContainerForMimeType (nsCString aMimeType, nsCString &aContainer, nsCString &aCodec, nsCString &aVideoType, nsCString &aAudioType)
 
static nsresult GetTranscodingConfigurator (PRUint32 aTranscodeType, sbIDeviceTranscodingConfigurator **aConfigurator)
 
static bool IsItemDRMProtected (sbIMediaItem *aMediaItem)
 
static nsresult GetDeviceCapsTypeFromListContentType (PRUint16 aListContentType, PRUint32 *aContentType, PRUint32 *aFunctionType)
 
static nsresult GetDeviceCapsTypeFromMediaItem (sbIMediaItem *aMediaItem, PRUint32 *aContentType, PRUint32 *aFunctionType)
 
static PRBool IsMediaItemSupported (sbIDevice *aDevice, sbIMediaItem *aMediaItem)
 
static PRBool IsMediaListContentTypeSupported (sbIDevice *aDevice, PRUint16 aListContentType)
 
static nsresult AddSupportedFileExtensions (sbIDevice *aDevice, PRUint32 aContentType, nsTArray< nsString > &aFileExtensionList)
 
static nsresult GetMediaSettings (sbIDeviceLibrary *aDevLib, PRUint32 aMediaType, sbIDeviceLibraryMediaSyncSettings **aMediaSettings)
 
static nsresult GetMgmtTypeForMedia (sbIDeviceLibrary *aDevLib, PRUint32 aMediaType, PRUint32 &aMgmtType)
 
static nsresult GetDeviceLibrary (nsAString const &aDeviceLibGuid, sbIDevice *aDevice, sbIDeviceLibrary **aDeviceLibrar)
 
static nsresult GetDeviceLibrary (nsAString const &aDevLibGuid, nsID const *aDeviceID, sbIDeviceLibrary **aDeviceLibrary)
 
static nsresult SetOriginIsInMainLibrary (sbIMediaItem *aMediaItem, sbILibrary *aDevLibrary, PRBool aMark)
 
static nsresult GetSyncItemInLibrary (sbIMediaItem *aMediaItem, sbILibrary *aTargetLibrary, sbIMediaItem **aSyncItem)
 
static bool ShouldLogDeviceInfo ()
 
static nsCString GetDeviceIdentifier (sbIDevice *aDevice)
 

Detailed Description

Utilities to aid in implementing devices

Definition at line 68 of file sbDeviceUtils.h.

Member Function Documentation

nsresult sbDeviceUtils::AddSupportedFileExtensions ( sbIDevice aDevice,
PRUint32  aContentType,
nsTArray< nsString > &  aFileExtensionList 
)
static

Add to the file extension list specified by aFileExtensionList the list of file extensions of the content type specified by aContentType supported by the device specified by aDevice.

Parameters
aDeviceDevice for which to add file extensions.
aContentTypeContent type for which to add file extensions.
aFileExtensionListList of file extensions to which to add.

Definition at line 1946 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::ApplyPropertyPreferencesToProfile ( sbIDevice aDevice,
nsIArray *  aPropertyArray,
nsString  aPrefNameBase 
)
static

For each transcoding profile property in aPropertyArray, look up a preference in aDevice starting with aPrefNameBase, and set the property value to the preference value if any.

Definition at line 1697 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

bool sbDeviceUtils::ArePlaylistsSupported ( sbIDevice aDevice)
static

Determines if the device given supports playlists

Definition at line 822 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::BulkSetProperty ( sbIMediaList aMediaList,
const nsAString &  aPropertyId,
const nsAString &  aPropertyValue,
sbIPropertyArray aPropertyFilter = nsnull,
PRInt32 *  aAbortFlag = nsnull 
)
static

Sets a property on all items that match a filter in a list / library.

Parameters
aMediaList[in] The list or library to process.
aPropertyId[in] The id of the property to set.
aPropertyValue[in] The value of the property to set to.
aPoprertyFilter[in] A set of properties to filter on. Pass in null to set on all items.

For example, to set all items in a library as unavailable, call: sbDeviceUtils::BulkSetProperty(library, NS_LITERAL_STRING(SB_PROPERTY_AVAILABILITY), NS_LITERAL_STRING("0"));

Definition at line 250 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::DeleteByProperty ( sbIMediaList aMediaList,
nsAString const &  aProperty,
nsAString const &  aValue 
)
static

Delete all items that have the property with the given value

Parameters
aMediaListthe list to remove items from
aPropertyIdthe ID of the property we're interested in
aValueThe value of the property that if matched will be deleted

Definition at line 277 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::DeleteUnavailableItems ( sbIMediaList aMediaList)
static

Delete all items that are marked not available (availability == 0) in a medialist / library.

Parameters
aMediaListThe list or library to prune.

Definition at line 306 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::DoesItemNeedTranscoding ( sbExtensionToContentFormatEntry_t aFormatType,
PRUint32 &  aBitRate,
PRUint32 &  aSampleRate,
sbIDevice aDevice,
bool &  aNeedsTranscoding 
)
static

Determine if an item needs transcoding.

Parameters
aFormatTypeThe format type mapping of the item
aBitRatethe bit rate of the item in bps
aSampleRateThe sample rate of the item
aDeviceThe device we're transcoding to
aNeedsTranscodingwhere we put our flag denoting it needs or does not need transcoding

Determine if an item needs transcoding NOTE: This is deprecated and will be replaced by the overloaded version below

Parameters
aFormatTypeThe format type mapping of the item
aBitRatethe bit rate of the item
aDeviceThe device we're transcoding to
aNeedsTranscodingwhere we put our flag denoting it needs or does not need transcoding

Definition at line 1540 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::DoesItemNeedTranscoding ( PRUint32  aTranscodeType,
sbIMediaFormat aMediaFormat,
sbIDevice aDevice,
bool &  aNeedsTranscoding 
)
static

Determine if an item needs transcoding NOTE: This is deprecated, use other overload.

Parameters
aTrascodeTypeThe transcode type to use
aMediaFormatThe media format to check
aDeviceThe device we're transcoding to
aNeedsTranscodingwhere we put our flag denoting it needs or does not need transcoding

Definition at line 1643 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetAudioMimeTypeForFormatTypes ( const nsAString &  aContainer,
const nsAString &  aCodec,
nsAString &  aMimeType 
)
static

Return in aMimeType the audio MIME type for the container specified by aContainer and codec specified by aCodec.

Parameters
aContainerContainer type.
aCodecCodec type.
aMimeTypeReturned MIME type.

Definition at line 1210 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetCodecAndContainerForMimeType ( nsCString  aMimeType,
nsCString &  aContainer,
nsCString &  aCodec,
nsCString &  aVideoType,
nsCString &  aAudioType 
)
static

Get the most-likely container type and codec type for a given mime type. Returns NS_ERROR_NOT_AVAILABLE if not known for this mime type

Definition at line 1775 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetDeviceCapsTypeFromListContentType ( PRUint16  aListContentType,
PRUint32 *  aContentType,
PRUint32 *  aFunctionType 
)
static

Gets the device capabilities type for the list content type.

Parameters
aListContentTypeMap the device capabilities from list content type
aContentTypeReturns the device capabilities content type
aFunctionTypeReturns the device capabilities function type

Definition at line 1859 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetDeviceCapsTypeFromMediaItem ( sbIMediaItem aMediaItem,
PRUint32 *  aContentType,
PRUint32 *  aFunctionType 
)
static

Gets the device capabilities type for an item

Parameters
aMediaItemMap the device capabilities from the item content type
aContentTypeReturns the device capabilities content type
aFunctionTypeReturns the device capabilities function type

Definition at line 1815 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsCString sbDeviceUtils::GetDeviceIdentifier ( sbIDevice aDevice)
static

Definition at line 2797 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetDeviceLibrary ( nsAString const &  aDeviceLibGuid,
sbIDevice aDevice,
sbIDeviceLibrary **  aDeviceLibrar 
)
static

Returns the device library given a library ID and an optional device ID

Parameters
aDevLibGuidThe device library's guid
aDeviceThe device to search for the library
aDeviceLibraryThe library found, or null if none found

Definition at line 2033 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetDeviceLibrary ( nsAString const &  aDevLibGuid,
nsID const *  aDeviceID,
sbIDeviceLibrary **  aDeviceLibrary 
)
static

Returns the device library given a library ID and an optional device ID

Parameters
aDevLibGuidThe device library's guid
aDeviceIDAn optional device ID pass null if you have none
aDeviceLibraryThe library found, or null if none found

Definition at line 2074 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetDeviceLibraryForItem ( sbIDevice aDevice,
sbIMediaItem aItem,
sbIDeviceLibrary **  _retval 
)
static

Given a device and a media item, find the sbIDeviceLibrary for it this is necessary because the device library is a wrapper

Definition at line 314 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetDeviceLibraryForLibrary ( sbIDevice aDevice,
sbILibrary aLibrary,
sbIDeviceLibrary **  _retval 
)
static

Given a device and a sbILibrary, find the sbIDeviceLibrary for it this is necessary because the device library is a wrapper

Definition at line 403 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetDeviceWriteLength ( sbIDeviceLibrary aDeviceLibrary,
sbIMediaItem aMediaItem,
PRUint64 *  aWriteLength 
)
static

Return in aWriteLength the length of the media item specified by aMediaItem when written to the device library specified by aDeviceLibrary.

Parameters
aDeviceLibraryDevice library to which media item will be written.
aMediaItemMedia item to write to device library.
aWriteLengthReturned write length of media item.

Definition at line 522 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetFormatTypeForItem ( sbIMediaItem aItem,
sbExtensionToContentFormatEntry_t aFormatType,
PRUint32 &  aBitRate,
PRUint32 &  aSampleRate 
)
static

For a media item, get format information describing it (extension, mime type, etc.

Returns the formatting information for an item

Parameters
aItemThe item we want the format stuff for
aFormatTypethe formatting map entry for the item
aBitRateThe bit rate for the item
aSampleRatethe sample rate for the item

Definition at line 1010 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetFormatTypeForItem ( sbIMediaItem aItem,
sbExtensionToContentFormatEntry_t aFormatType,
PRUint32 &  aSampleRate,
PRUint32 &  aChannels,
PRUint32 &  aBitRate 
)
static

For a media item, get format information describing it (extension, mime type, etc.

Returns the formatting information for an item

Parameters
aItemThe item we want the format stuff for
aFormatTypethe formatting map entry for the item
aSampleRatethe sample rate for the item
aChannelsthe number of channels for the item
aBitRateThe bit rate for the item

Definition at line 1059 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetFormatTypeForURI ( nsIURI *  aURI,
sbExtensionToContentFormatEntry_t aFormatType 
)
static

For a URI, get format information describing it (extension, mime type, etc.

Returns the formatting information for a URI

Parameters
aURIThe URI we want the format stuff for
aFormatTypethe formatting map entry for the URI

Definition at line 1114 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetFormatTypeForURL ( const nsAString &  aURL,
sbExtensionToContentFormatEntry_t aFormatType 
)
static

For a URL, get format information describing it (extension, mime type, etc.

Returns the formatting information for a URL

Parameters
aURLThe URL we want the format stuff for
aFormatTypethe formatting map entry for the URL

Definition at line 1138 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetFormatTypesForMimeType ( const nsAString &  aMimeType,
const PRUint32  aContentType,
nsTArray< sbExtensionToContentFormatEntry_t > &  aFormatTypeList 
)
static

For a MIME type, get format information describing it (extension, mime type, etc.

Returns the formatting information for a MIME type

Parameters
aMimeTypeThe MIME type we want the format stuff for
aFormatTypeListthe formatting map entries for the MIME type

Definition at line 1175 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetMediaItemByDevicePersistentId ( sbILibrary aLibrary,
const nsAString &  aDevicePersistentId,
sbIMediaItem **  aItem 
)
static

Search the library specified by aLibrary for an item with a device persisent ID property matching aDevicePersistentId. Return the found item in aItem.

Parameters
aLibrary[in] Library in which to search for items.
aDevicePersistentId[in] Device persistent ID for which to search.
aItem[out] Found item.

Definition at line 448 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetMediaSettings ( sbIDeviceLibrary aDevLib,
PRUint32  aMediaType,
sbIDeviceLibraryMediaSyncSettings **  aMediaSettings 
)
static

Helper function to return the media settings object for a library for a given type

Parameters
aDevLibthe device library to retrieve the setttings
aMediaTypeThe media type you're interested in
aMediaSettingsThe returned media sync settings

Definition at line 1995 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetMgmtTypeForMedia ( sbIDeviceLibrary aDevLib,
PRUint32  aMediaType,
PRUint32 &  aMgmtType 
)
static

Helper function to return the management type for a given device library and media type

Parameters
aDevLibthe device library to retrieve the setttings
aMediaTypeThe media type you're interested in
aMgmtTypeThe management type returned

Definition at line 2014 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetOrganizedPath ( nsIFile *  aParent,
sbIMediaItem aItem,
nsIFile **  _retval 
)
static

Give back a nsIFile pointing to where a file should be transferred to using the media item properties to build a directory structure. Note that the resulting file may reside in a directory that does not yet exist.

Parameters
aParentthe directory to place the file
aItemthe media item to be transferred
Returns
the file path to store the item in

Definition at line 120 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetOriginMediaItemByDevicePersistentId ( sbILibrary aLibrary,
const nsAString &  aDevicePersistentId,
sbIMediaItem **  aItem 
)
static

Search the library specified by aLibrary for an item with a device persistent ID property matching aDevicePersistentId. Return that item's origin media item in aItem.

Parameters
aLibrary[in] Library in which to search for items.
aDevicePersistentId[in] Device persistent ID for which to search.
aItem[out] Found origin item.

Definition at line 498 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::GetSupportedTranscodeProfiles ( PRUint32  aType,
sbIDevice aDevice,
nsIArray **  aProfiles 
)
static

Returns a list of transcode profiles that the device supports

Parameters
aTypethe type of transcoding profiles to retrieve.
aDevicethe device to retrieve the profiles for.
aProfilesthe array of profiles that were found
Returns
NS_OK if successful else some NS_ERROR value

Definition at line 1364 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetSyncItemInLibrary ( sbIMediaItem aMediaItem,
sbILibrary aTargetLibrary,
sbIMediaItem **  aSyncItem 
)
static

Return in aSyncItem the target sync media item in the target sync library specified by aTargetLibrary corresponding to the source sync media item specified by aMediaItem. If no matching target sync media item can be found, this function returns NS_OK and returns nsnull in aSyncItem.

Parameters
aMediaItemSync source media item.
aTargetLibrarySync target library.
aSyncItemSync target media item.

Definition at line 2116 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetTranscodedFileExtension ( sbITranscodeProfile aProfile,
nsCString &  aExtension 
)
static

Get the appropriate file extension for files ended with this profile.

Definition at line 1745 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::GetTranscodeProfiles ( PRUint32  aType,
nsIArray **  aProfiles 
)
static

Returns the list or transcode profiles for a particular transcoding type supported by the system

Definition at line 1349 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::GetTranscodingConfigurator ( PRUint32  aTranscodeType,
sbIDeviceTranscodingConfigurator **  aConfigurator 
)
static

Definition at line 1672 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

bool sbDeviceUtils::IsItemDRMProtected ( sbIMediaItem aMediaItem)
static

Returns true if the item is DRM protected

Parameters
aMediaItemThe item to check
Returns
true if the item is DRM protected otherwise false.

Definition at line 1801 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

PRBool sbDeviceUtils::IsMediaItemSupported ( sbIDevice aDevice,
sbIMediaItem aMediaItem 
)
static

Returns true if the device supports the media item.

Parameters
aDeviceThe device to look up capabilities with.
aMediaItemThe media item to check for.
Returns
True if the media item is supported on the device.

Definition at line 1890 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

PRBool sbDeviceUtils::IsMediaListContentTypeSupported ( sbIDevice aDevice,
PRUint16  aListContentType 
)
static

Returns true if the device supports the content type of the media list.

Parameters
aDeviceThe device to look up capabilities with.
aListContentTypeThe list content type to check for.
Returns
True if the content type is supported on the device.

Definition at line 1918 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::NewDeviceLibraryURI ( sbIDeviceLibrary aDeviceLibrary,
const nsCString &  aSpec,
nsIURI **  aURI 
)
static

Return in aURI a URI produced using the URI spec specified by aSpec resolved relative to the base URI for the device library specified by aDeviceLibrary. The device library base URI has the following form: "x-device:///<device-guid>/<library-guid>/".

Parameters
aDeviceLibraryDevice library for the base URI.
aSpecURI spec.
aURIReturned URI.

Definition at line 335 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::QueryUserAbortRip ( PRBool *  aAbort)
static

Ask the user if they wish to abort ripping the cd, this will be called when the user cancels the rip.

Parameters
aAbort[out] True if user selected to stop rip.

Definition at line 595 of file sbDeviceUtils.cpp.

nsresult sbDeviceUtils::QueryUserSpaceExceeded ( sbIDevice aDevice,
sbIDeviceLibrary aLibrary,
PRInt64  aSpaceNeeded,
PRInt64  aSpaceAvailable,
PRBool *  aAbort 
)
static

Ask the user what action to take in response to an operation space exceeded event for the device specified by aDevice and device library specified by aLibrary. The amount of space needed for the operation is specified by aSpaceNeeded and the amount available by aSpaceAvailable. If the user chooses to abort the operation, true is returned in aAbort.

Parameters
aDevice[in] Target device of operation.
aLibrary[in] Target device library of operation.
aSpaceNeeded[in] Space needed by operation.
aSpaceAvailable[in] Space available to operation.
aAbort[out] True if user selected to abort operation.

Definition at line 572 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:

nsresult sbDeviceUtils::QueryUserViewErrors ( sbIDevice aDevice)
static

Ask the user if they wish to see the errors for a device before ejecting if there are any errors.

Parameters
aDevice[in] Target device of operation

Definition at line 643 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::SetLinkedSyncPartner ( sbIDevice aDevice)
static

Set the sync partener preference to the device if the device is not linked to local sync partner.

Parameters
aDeviceDevice to check.

Definition at line 777 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceUtils::SetOriginIsInMainLibrary ( sbIMediaItem aMediaItem,
sbILibrary aDevLibrary,
PRBool  aMark 
)
static

Sets the origin is in main library property if the origin item exists

Parameters
aMediaItemThis is the main library item that is used to find the find the corresponding item in the given device library
aDevLibraryThe device library of the item
aMarkSpecifies whether to set or clear the mark

Definition at line 2186 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

bool sbDeviceUtils::ShouldLogDeviceInfo ( )
static

Returns true if we should log the device info for devices. This is controlled by the songbird.device.log_device_info preference.

Returns
true if logging should be performed false if not

Definition at line 2785 of file sbDeviceUtils.cpp.

Here is the call graph for this function:

nsresult sbDeviceUtils::ShowDeviceErrors ( sbIDevice aDevice)
static

Show the user any errors that occured for a device.

Parameters
aDevice[in] Target device of operation

Definition at line 701 of file sbDeviceUtils.cpp.

Here is the caller graph for this function:


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