33 #include "nsISupports.idl"
53 [scriptable,
uuid(c52a5f0f-fd6e-4f41-a681-3ed88c9e5a9f)]
126 [scriptable,
uuid(2964c3bf-18d6-4a72-8ccf-f08b732b4bab)]
274 in nsIArray aMediaItems,
275 in nsIURI aDestionationPath,
276 in
unsigned long aDeviceOperation,
277 in
boolean aBeginTransferNow,
283 unsigned long updateItems(in AString aDeviceIdentifier,
284 in nsIArray aMediaItems);
294 unsigned long deleteItems(in AString aDeviceIdentifier,
295 in nsIArray aMediaItems);
300 in nsIArray aMediaLists);
303 in nsIArray aMediaLists);
307 in nsIArray aMediaItems,
308 in
unsigned long aBeforeIndex);
313 in
unsigned long aIndex);
317 in
unsigned long aFromIndex,
318 in
unsigned long aToIndex);
339 in nsIArray aMediaItems);
456 #define kSB_DEVICE_FILE_FORMAT_UNDEFINED -1
457 #define kSB_DEVICE_FILE_FORMAT_WAV 0
458 #define kSB_DEVICE_FILE_FORMAT_MP3 1
459 #define kSB_DEVICE_FILE_FORMAT_WMA 2
462 #define kSB_DEVICE_STATE_IDLE 0
463 #define kSB_DEVICE_STATE_BUSY 1
464 #define kSB_DEVICE_STATE_DOWNLOADING 2
465 #define kSB_DEVICE_STATE_UPLOADING 3
466 #define kSB_DEVICE_STATE_DOWNLOAD_PAUSED 4
467 #define kSB_DEVICE_STATE_UPLOAD_PAUSED 5
468 #define kSB_DEVICE_STATE_DELETING 6
const unsigned long OP_UPLOAD
Device Operation Constants.
unsigned long movePlaylistItem(in AString aDeviceIdentifier, in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex)
unsigned long resumeTransfer(in AString aDeviceIdentifier)
Resume pending transfers.
void addCallback(in sbIDeviceBaseCallback aCallback)
Add a device category handler callback.
unsigned long createPlaylists(in AString aDeviceIdentifier, in nsIArray aMediaLists)
unsigned long cancelTransfer(in AString aDeviceIdentifier, in nsIArray aMediaItems)
Cancel a transfer by removing it from the queue.
unsigned long deletePlaylists(in AString aDeviceIdentifier, in nsIArray aMediaLists)
unsigned long addToPlaylist(in AString aDeviceIdentifier, in sbIMediaList aMediaList, in nsIArray aMediaItems, in unsigned long aBeforeIndex)
const unsigned long OP_MOVE
boolean isUpdateSupported(in AString aDeviceIdentifier)
Is it possible to update items directly on the device?
unsigned long suspendTransfer(in AString aDeviceIdentifier)
Suspend all transfers.
const PRUint32 FILE_FORMAT_WAV
attribute AString name
The name of the device category handler.
[SOON TO BE DEPRECATED AFTER 0.3] The callback class for sbIDeviceBase
unsigned long deleteAllItems(in AString aDeviceIdentifier)
unsigned long transferItems(in AString aDeviceIdentifier, in nsIArray aMediaItems, in nsIURI aDestionationPath, in unsigned long aDeviceOperation, in boolean aBeginTransferNow, in sbILibrary aDestinationLibrary)
Transfer items to a library or destination.
const PRUint32 STATE_BUSY
void finalize()
Finalize usage of the device category handler.
unsigned long removeFromPlaylist(in AString aDeviceIdentifier, in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex)
[SOON TO BE DEPRECATED AFTER 0.3] Base interface for all supported devices.
void removeCallback(in sbIDeviceBaseCallback aCallback)
Remove a device category handler callback.
void onTransferComplete(in sbIMediaItem aMediaItem, in PRInt32 aStatus)
<TODO:Brief>.
long long getUsedSpace(in AString aDeviceIdentifier)
Get the amount of used space from a device.
long long getAvailableSpace(in AString aDeviceIdentifier)
Get the amount of available space from a device.
const PRUint32 STATE_IDLE
boolean isEjectSupported(in AString aDeviceIdentifier)
Is eject or unmount supported by the device?.
const PRUint32 STATE_DELETING
sbILibrary getLibrary(in AString aDeviceIdentifier)
Get the device library representing the content available on the device.
const PRUint32 FILE_FORMAT_MP3
readonly attribute unsigned long deviceCount
Get the number of devices currently connected.
Media library abstraction.
readonly attribute AString deviceCategory
Device category name for this class of devices.
void onDeviceConnect(in AString aDeviceIdentifier)
<TODO:Brief>.
nsIArray getSupportedFormats(in AString aDeviceIdentifier)
Returns a list of file extensions representing the formats supported by a specific device...
unsigned long getDeviceState(in AString aDeviceIdentifier)
Get the device's current state.
nsIURI getTransferLocation(in AString aDeviceIdentifier, in sbIMediaItem aMediaItem)
Get preferred transfer location for item.
const PRUint32 FILE_FORMAT_WMA
const PRUint32 STATE_DOWNLOADING
boolean ejectDevice(in AString aDeviceIdentifier)
Eject or unmount the device from the system.
void onDeviceDisconnect(in AString aDeviceIdentifier)
<TODO:Brief>.
const PRUint32 FILE_FORMAT_UNDEFINED
boolean isUploadSupported(in AString aDeviceIdentifier)
Is uploading supported on this device?
void onStateChanged(in AString aDeviceIdentifier, in unsigned long aState)
Called when the device state has changed.
readonly attribute nsIStringEnumerator deviceIdentifiers
Contains nsISupportsStrings representing the device unique identifiers for all connected devices of t...
unsigned long deleteItems(in AString aDeviceIdentifier, in nsIArray aMediaItems)
Delete items from the device.
const PRUint32 STATE_DOWNLOAD_PAUSED
void onTransferStart(in sbIMediaItem aMediaItem)
<TODO:Brief>.
unsigned long clearPlaylist(in AString aDeviceIdentifier, in sbIMediaList aMediaList)
const PRUint32 STATE_UPLOAD_PAUSED
boolean isDownloadSupported(in AString aDeviceIdentifier)
Download is to copy a track from the device to the host.
const PRUint32 STATE_UPLOADING
const unsigned long OP_DOWNLOAD
unsigned long updateItems(in AString aDeviceIdentifier, in nsIArray aMediaItems)
Update items on the device.
boolean isDeleteSupported(in AString aDeviceIdentifier)
Is it possible to delete items from the device?
void initialize()
Initialize the device category handler.
sbIMediaItem beginTransfer(in AString aDeviceIdentifier)
Begin transfer operations.