sbIDeviceInfoRegistrar Interface Reference

import"sbIDeviceInfoRegistrar.idl";

Inheritance diagram for sbIDeviceInfoRegistrar:
[legend]
Collaboration diagram for sbIDeviceInfoRegistrar:
[legend]

Public Member Functions

void addCapabilities (in sbIDevice aDevice, in sbIDeviceCapabilities aDeviceCapabilities)
 Allows a third party to augment the device capabilities. More...
 
AString getDefaultName (in sbIDevice aDevice)
 Return the default name for the device. More...
 
AString getDeviceFolder (in sbIDevice aDevice, in unsigned long aContentType)
 Return the device folder URL for the device and content type specified by aDevice and aContentType. More...
 
nsIArray getImportRules (in sbIDevice aDevice)
 Return a list of "rules" to apply to files imported from aDevice. Each rule is itself an nsIArray of two nsISupportsStrings: a path and an "import type" of files residing (recursively) within that path. The import type is a symbolic value that determines how to set the media item properties when importing items of that type from aDevice. More...
 
unsigned long getMountTimeout (in sbIDevice aDevice)
 Return the mount timeout value in seconds for the device specified by aDevice. More...
 
AString getExcludedFolders (in sbIDevice aDevice)
 Return the excluded folder list as a comma separate string. More...
 
boolean getDoesDeviceSupportReformat (in sbIDevice aDevice)
 Returns true if the device supports reformat. More...
 
boolean getOnlyMountMediaFolders (in sbIDevice aDevice)
 Return true if only the media folders should be mounted rather than the entire storage volume. More...
 
nsIArray getStorageDeviceInfoList (in sbIDevice aDevice)
 Return the storage device info list as an nsIArray of nsIPropertyBag elements. More...
 
AString getDeviceIcon (in sbIDevice aDevice)
 Return the device icon file URL for the device specified by aDevice. More...
 
boolean interestedInDevice (in sbIDevice aDevice)
 Determines if the registrar is interested in this device. More...
 

Public Attributes

const PRUint32 NONE = 0
 
const PRUint32 DEFAULT = 1
 
const PRUint32 GENERIC = 2
 
const PRUint32 DEVICE_SPECIFIC = 3
 
readonly attribute PRUint32 type
 

Detailed Description

This interface is used to allow device manufacturers to specify various information about their devices. Each implementation will register with the category manager. The registrar types gives us a way to allow overriding registrars.

Implementations are to be thread safe.

Definition at line 43 of file sbIDeviceInfoRegistrar.idl.

Member Function Documentation

void sbIDeviceInfoRegistrar::addCapabilities ( in sbIDevice  aDevice,
in sbIDeviceCapabilities  aDeviceCapabilities 
)

Allows a third party to augment the device capabilities.

Parameters
aDevicethe device that the capabilities belong to
aDeviceCapabilitiesthe capabilities to augment.
Returns
Returns true if handled
AString sbIDeviceInfoRegistrar::getDefaultName ( in sbIDevice  aDevice)

Return the default name for the device.

Parameters
aDeviceDevice for which to get default name.
Returns
Device default name.
AString sbIDeviceInfoRegistrar::getDeviceFolder ( in sbIDevice  aDevice,
in unsigned long  aContentType 
)

Return the device folder URL for the device and content type specified by aDevice and aContentType.

Parameters
aDeviceDevice for which to get folder.
aContentTypeRequested folder content type.
Returns
Device folder URL.
AString sbIDeviceInfoRegistrar::getDeviceIcon ( in sbIDevice  aDevice)

Return the device icon file URL for the device specified by aDevice.

Parameters
aDeviceDevice for which to get icon file.
Returns
Device icon file URL.
boolean sbIDeviceInfoRegistrar::getDoesDeviceSupportReformat ( in sbIDevice  aDevice)

Returns true if the device supports reformat.

AString sbIDeviceInfoRegistrar::getExcludedFolders ( in sbIDevice  aDevice)

Return the excluded folder list as a comma separate string.

Returns
A comma separate list of relative folder paths
nsIArray sbIDeviceInfoRegistrar::getImportRules ( in sbIDevice  aDevice)

Return a list of "rules" to apply to files imported from aDevice. Each rule is itself an nsIArray of two nsISupportsStrings: a path and an "import type" of files residing (recursively) within that path. The import type is a symbolic value that determines how to set the media item properties when importing items of that type from aDevice.

Returns
the list of import rules for aDevice. This array can be stored with aDevice under SB_DEVICE_PROPERTY_IMPORT_RULES.
unsigned long sbIDeviceInfoRegistrar::getMountTimeout ( in sbIDevice  aDevice)

Return the mount timeout value in seconds for the device specified by aDevice.

Parameters
aDeviceDevice for which to get mount timeout.
Returns
Device mount timeout value in seconds.
Exceptions
NS_ERROR_NOT_AVAILABLEDevice mount timeout value not available.
boolean sbIDeviceInfoRegistrar::getOnlyMountMediaFolders ( in sbIDevice  aDevice)

Return true if only the media folders should be mounted rather than the entire storage volume.

Returns
True if only the media folders should be mounted.
nsIArray sbIDeviceInfoRegistrar::getStorageDeviceInfoList ( in sbIDevice  aDevice)

Return the storage device info list as an nsIArray of nsIPropertyBag elements.

The following properties may be specified for each storage device:

lun Logical unit number (e.g., for USB MSC). scsiVendorID SCSI vendor ID. scsiProductID SCSI product ID. removable "true" if storage is removable (e.g., SD-Card). primary "true" if storage device is primary storage.

Parameters
aDeviceDevice for which to get storage info list.
Returns
An nsIArray of nsIPropertyBag elements.
boolean sbIDeviceInfoRegistrar::interestedInDevice ( in sbIDevice  aDevice)

Determines if the registrar is interested in this device.

Parameters
aDeviceThe device to check if the registrar is interested in

Member Data Documentation

const PRUint32 sbIDeviceInfoRegistrar::DEFAULT = 1

Songbird provided registrars

Definition at line 54 of file sbIDeviceInfoRegistrar.idl.

const PRUint32 sbIDeviceInfoRegistrar::DEVICE_SPECIFIC = 3

Device specific registrars

Definition at line 64 of file sbIDeviceInfoRegistrar.idl.

const PRUint32 sbIDeviceInfoRegistrar::GENERIC = 2

General purpose third party registrars

Definition at line 59 of file sbIDeviceInfoRegistrar.idl.

const PRUint32 sbIDeviceInfoRegistrar::NONE = 0

Not a registrar or not set

Definition at line 49 of file sbIDeviceInfoRegistrar.idl.

readonly attribute PRUint32 sbIDeviceInfoRegistrar::type

Definition at line 66 of file sbIDeviceInfoRegistrar.idl.


The documentation for this interface was generated from the following file: