|
NS_DECL_ISUPPORTS
NS_DECL_NSICLASSINFO
NS_DECL_SBIDEVICELIBRARY
NS_DECL_SBIMEDIALISTLISTENER
NS_DECL_SBILOCALDATABASEMEDIALISTCOPYLISTENER
NS_DECL_SBIDEVICEEVENTLISTENER | sbDeviceLibrary (sbIDevice *aDevice) |
|
virtual | ~sbDeviceLibrary () |
|
NS_IMETHOD | GetName (nsAString &aName) |
|
NS_IMETHOD | SetName (const nsAString &aName) |
|
NS_IMETHOD | GetType (nsAString &aType) |
|
NS_IMETHOD | GetLength (PRUint32 *aLength) |
|
NS_IMETHOD | GetIsEmpty (PRBool *aIsEmpty) |
|
NS_IMETHOD | GetUserEditableContent (PRBool *aUserEditableContent) |
|
NS_IMETHOD | GetItemByGuid (const nsAString &aGuid, sbIMediaItem **_retval) |
|
NS_IMETHOD | GetItemByIndex (PRUint32 aIndex, sbIMediaItem **_retval) |
|
NS_IMETHOD | GetListContentType (PRUint16 *_retval) |
|
NS_IMETHOD | EnumerateAllItems (sbIMediaListEnumerationListener *aEnumerationListener, PRUint16 aEnumerationType) |
|
NS_IMETHOD | EnumerateItemsByProperty (const nsAString &aPropertyID, const nsAString &aPropertyValue, sbIMediaListEnumerationListener *aEnumerationListener, PRUint16 aEnumerationType) |
|
NS_IMETHOD | EnumerateItemsByProperties (sbIPropertyArray *aProperties, sbIMediaListEnumerationListener *aEnumerationListener, PRUint16 aEnumerationType) |
|
NS_IMETHOD | GetItemsByProperty (const nsAString &aPropertyID, const nsAString &aPropertyValue, nsIArray **_retval) |
|
NS_IMETHOD | GetItemCountByProperty (const nsAString &aPropertyID, const nsAString &aPropertyValue, PRUint32 *_retval) |
|
NS_IMETHOD | GetItemsByProperties (sbIPropertyArray *aProperties, nsIArray **_retval) |
|
NS_IMETHOD | IndexOf (sbIMediaItem *aMediaItem, PRUint32 aStartFrom, PRUint32 *_retval) |
|
NS_IMETHOD | LastIndexOf (sbIMediaItem *aMediaItem, PRUint32 aStartFrom, PRUint32 *_retval) |
|
NS_IMETHOD | Contains (sbIMediaItem *aMediaItem, PRBool *_retval) |
|
NS_IMETHOD | Remove (sbIMediaItem *aMediaItem) |
|
NS_IMETHOD | RemoveByIndex (PRUint32 aIndex) |
|
NS_IMETHOD | RemoveSome (nsISimpleEnumerator *aMediaItems) |
|
NS_IMETHOD | AddListener (sbIMediaListListener *aListener, PRBool aOwnsWeak, PRUint32 aFlags, sbIPropertyArray *aPropertyFilter) |
|
NS_IMETHOD | RemoveListener (sbIMediaListListener *aListener) |
|
NS_IMETHOD | CreateView (sbIMediaListViewState *aState, sbIMediaListView **_retval) |
|
NS_IMETHOD | RunInBatchMode (sbIMediaListBatchCallback *aCallback, nsISupports *aUserData) |
|
NS_IMETHOD | GetDistinctValuesForProperty (const nsAString &aPropertyID, nsIStringEnumerator **_retval) |
|
NS_IMETHOD | GetSupportsForeignMediaItems (PRBool *aSupportsForeignMediaItems) |
|
NS_IMETHOD | GetCreationParameters (nsIPropertyBag2 **aCreationParameters) |
|
NS_IMETHOD | GetFactory (sbILibraryFactory **aFactory) |
|
NS_IMETHOD | ContainsItemWithSameIdentity (sbIMediaItem *aMediaItem, PRBool *_retval) |
|
NS_IMETHOD | GetItemsWithSameIdentity (sbIMediaItem *aMediaItem, nsIArray **_retval) |
|
NS_IMETHOD | Resolve (nsIURI *aUri, nsIChannel **_retval) |
|
NS_IMETHOD | CopyMediaList (const nsAString &aType, sbIMediaList *aSource, PRBool aDontCopyContent, sbIMediaList **_retval) |
|
NS_IMETHOD | GetMediaItem (const nsAString &aGuid, sbIMediaItem **_retval) |
|
NS_IMETHOD | GetDuplicate (sbIMediaItem *aMediaItem, sbIMediaItem **_retval) |
|
NS_IMETHOD | GetMediaListTypes (nsIStringEnumerator **aMediaListTypes) |
|
NS_IMETHOD | RegisterMediaListFactory (sbIMediaListFactory *aFactory) |
|
NS_IMETHOD | Optimize (PRBool aAnalyzeOnly) |
|
NS_IMETHOD | Flush (void) |
|
NS_IMETHOD | BatchCreateMediaItems (nsIArray *aURIArray, nsIArray *aPropertyArrayArray, PRBool aAllowDuplicates, nsIArray **_retval) |
|
NS_IMETHOD | BatchCreateMediaItemsIfNotExist (nsIArray *aURIArray, nsIArray *aPropertyArrayArray, nsIArray **aResultItemArray, nsIArray **_retval) |
|
NS_IMETHOD | BatchCreateMediaItemsAsync (sbIBatchCreateMediaItemsListener *aListener, nsIArray *aURIArray, nsIArray *aPropertyArrayArray, PRBool aAllowDuplicates) |
|
NS_SCRIPTABLE NS_IMETHOD | GetIsMutable (PRBool *aIsMutable) |
|
NS_SCRIPTABLE NS_IMETHOD | GetItemController (sbIMediaItemController **aMediaItemController) |
|
NS_SCRIPTABLE NS_IMETHOD | GetMediaCreated (PRInt64 *aMediaCreated) |
|
NS_SCRIPTABLE NS_IMETHOD | SetMediaCreated (PRInt64 aMediaCreated) |
|
NS_SCRIPTABLE NS_IMETHOD | GetMediaUpdated (PRInt64 *aMediaUpdated) |
|
NS_SCRIPTABLE NS_IMETHOD | SetMediaUpdated (PRInt64 aMediaUpdated) |
|
NS_SCRIPTABLE NS_IMETHOD | GetContentSrc (nsIURI **aContentSrc) |
|
NS_SCRIPTABLE NS_IMETHOD | SetContentSrc (nsIURI *aContentSrc) |
|
NS_SCRIPTABLE NS_IMETHOD | GetContentLength (PRInt64 *aContentLength) |
|
NS_SCRIPTABLE NS_IMETHOD | SetContentLength (PRInt64 aContentLength) |
|
NS_SCRIPTABLE NS_IMETHOD | GetContentType (nsAString &aContentType) |
|
NS_SCRIPTABLE NS_IMETHOD | SetContentType (const nsAString &aContentType) |
|
NS_SCRIPTABLE NS_IMETHOD | TestIsURIAvailable (nsIObserver *aObserver) |
|
NS_SCRIPTABLE NS_IMETHOD | OpenInputStreamAsync (nsIStreamListener *aListener, nsISupports *aContext, nsIChannel **_retval) |
|
NS_SCRIPTABLE NS_IMETHOD | OpenInputStream (nsIInputStream **_retval) |
|
NS_SCRIPTABLE NS_IMETHOD | OpenOutputStream (nsIOutputStream **_retval) |
|
NS_SCRIPTABLE NS_IMETHOD | ToString (nsAString &_retval) |
|
NS_IMETHODIMP | GetLibrary (sbILibrary **_retval) |
|
NS_IMETHOD | CreateMediaItem (nsIURI *aContentUri, sbIPropertyArray *aProperties, PRBool aAllowDuplicates, sbIMediaItem **_retval) |
|
NS_IMETHOD | CreateMediaItemIfNotExist (nsIURI *aContentUri, sbIPropertyArray *aProperties, sbIMediaItem **aResultItem, PRBool *_retval) |
|
NS_IMETHOD | CreateMediaList (const nsAString &aType, sbIPropertyArray *aProperties, sbIMediaList **_retval) |
|
NS_IMETHOD | GetDevice (sbIDevice **aDevice) |
|
NS_IMETHOD | ClearItems () |
|
NS_IMETHOD | ClearItemsByType (const nsAString &aContentType) |
|
NS_IMETHOD | Add (sbIMediaItem *aMediaItem) |
|
NS_IMETHOD | AddItem (sbIMediaItem *aMediaItem, sbIMediaItem **aNewMediaItem) |
|
NS_IMETHOD | AddAll (sbIMediaList *aMediaList) |
|
NS_IMETHOD | AddSome (nsISimpleEnumerator *aMediaItems) |
|
NS_IMETHOD | AddMediaItems (nsISimpleEnumerator *aMediaItems, sbIAddMediaItemsListener *aListener, PRBool aAsync) |
|
NS_IMETHOD | Clear (void) |
|
void | initialize (in AString aLibraryId) |
| Initialize the device library. More...
|
|
void | finalize () |
| Finalize the device library. More...
|
|
nsIArray | getSyncFolderListByType (in unsigned long aContentType) |
| Return the list of folders with content type aContentType the user wants to sync from his disk to the device. More...
|
|
void | setSyncFolderListByType (in unsigned long aContentType, in nsIArray aFolderList) |
| Set the list of folders with content type aContentType the user wants to sync from his disk to the device. More...
|
|
void | sync () |
| Initiates a sync operation on this library. More...
|
|
void | addDeviceLibraryListener (in sbIDeviceLibraryListener aListener) |
| Add a listener to this device library. More...
|
|
void | removeDeviceLibraryListener (in sbIDeviceLibraryListener aListener) |
| Remove a listener from this device library. More...
|
|
boolean | containsItemWithSameIdentity (in sbIMediaItem aMediaItem) |
| Checks if another mediaitem with the same identity as aMediaItem is already present in the library. This function can be called on the parent library of aMediaItem and it will only return true if a mediaitem other than the param aMediaItem has the same identity as aMediaItem. More...
|
|
nsIArray | getItemsWithSameIdentity (in sbIMediaItem aMediaItem) |
| Find mediaitems in the library that have the same identity as aMediaItem. Returns an empty array if none are found. This function can be called on the parent library of aMediaItem and it will only return a mediaitem other than the param aMediaItem. More...
|
|
nsIChannel | resolve (in nsIURI aUri) |
| Resolves a songbird schemed URL to a channel. Throws an exception if the item referenced in the URL is not found. More...
|
|
sbIMediaItem | createMediaItem (in nsIURI aContentUri, [optional] in sbIPropertyArray aProperties, [optional] in boolean aAllowDuplicates) |
| Creates a new media item aContentUri The URI pointing to the content of the new media item. Use sbILibraryUtils.getContentURI or getFileContentURI to produce library content URI's. More...
|
|
boolean | createMediaItemIfNotExist (in nsIURI aContentUri, [optional] in sbIPropertyArray aProperties, [optional] out sbIMediaItem aResultItem) |
| Create a new media item, disallowing duplicates, and return if it did. More...
|
|
sbIMediaList | createMediaList (in AString aType, [optional] in sbIPropertyArray aProperties) |
| Creates a new media list. More...
|
|
sbIMediaList | copyMediaList (in AString aType, in sbIMediaList aSource, in boolean aDontCopyContent) |
| Creates a new media list. More...
|
|
sbIMediaItem | getMediaItem (in AString aGuid) |
| Get a media item. More...
|
|
sbIMediaItem | getDuplicate (in sbIMediaItem aMediaItem) |
| Search for and return a duplicate of the media item specified by aMediaItem. More...
|
|
void | clearItems () |
| Clear all media items (excluding medialists) from the library. More...
|
|
void | clearItemsByType (in AString aContentType) |
| Clear items of a certain CONTENT_TYPE (see sbStandardProperties.h). More...
|
|
void | registerMediaListFactory (in sbIMediaListFactory aFactory) |
| Register a new media list type at run time. More...
|
|
void | optimize ([optional] in boolean aAnalyzeOnly) |
| Called when the library should remove unsupported media list types, unknown property types, temporary items, or otherwise optimize its performance or size. More...
|
|
void | flush () |
| Called when the library should save any cached data to disk. More...
|
|
nsIArray | batchCreateMediaItems (in nsIArray aURIArray, [optional] in nsIArray aPropertyArrayArray, [optional] in boolean aAllowDuplicates) |
| Create many media items from a list of URIs, and notify their addition. More...
|
|
nsIArray | batchCreateMediaItemsIfNotExist (in nsIArray aURIArray, [optional] in nsIArray aPropertyArrayArray, [optional] out nsIArray aResultItemArray) |
| Create many media items from a list of URIs, disallowing duplicates, and return which items were created. More...
|
|
void | batchCreateMediaItemsAsync (in sbIBatchCreateMediaItemsListener aListener, in nsIArray aURIArray, [optional] in nsIArray aPropertyArrayArray, [optional] in boolean aAllowDuplicates) |
| Asychronously create many media items from a list of URIs. More...
|
|
sbIMediaItem | getItemByGuid (in AString aGuid) |
| Get a media item in the list by guid. More...
|
|
sbIMediaItem | getItemByIndex (in unsigned long aIndex) |
| Get a media item in the list by index. More...
|
|
unsigned short | getListContentType () |
| Get the content type of the media list. More...
|
|
void | enumerateAllItems (in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
| Enumerate all items in the list. More...
|
|
void | enumerateItemsByProperty (in AString aPropertyID, in AString aPropertyValue, in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
| Enumerate the media items in the list that match a given property ID and value. More...
|
|
void | enumerateItemsByProperties (in sbIPropertyArray aProperties, in sbIMediaListEnumerationListener aEnumerationListener, [optional] in unsigned short aEnumerationType) |
| Enumerate the media items that match a list of property IDs and values. More...
|
|
nsIArray | getItemsByProperty (in AString aPropertyID, in AString aPropertyValue) |
|
PRUint32 | getItemCountByProperty (in AString aPropertyID, in AString aPropertyValue) |
|
nsIArray | getItemsByProperties (in sbIPropertyArray aProperties) |
|
unsigned long | indexOf (in sbIMediaItem aMediaItem, [optional] in unsigned long aStartFrom) |
| Get the first index of a media item in the list. More...
|
|
unsigned long | lastIndexOf (in sbIMediaItem aMediaItem, in unsigned long aStartFrom) |
| Get the last index of a media item int he list. More...
|
|
boolean | contains (in sbIMediaItem aMediaItem) |
| Check if the list contains a media item. More...
|
|
void | add (in sbIMediaItem aMediaItem) |
| Add a media item to this list. More...
|
|
sbIMediaItem | addItem (in sbIMediaItem aMediaItem) |
| addItem a media item to this list More...
|
|
void | addAll (in sbIMediaList aMediaList) |
| Add the contents of a media list to this list. More...
|
|
void | addSome (in nsISimpleEnumerator aMediaItems) |
| Adds media items suppled by the provided enumerator NOTE: This method is now deprecated. More...
|
|
void | addMediaItems (in nsISimpleEnumerator aMediaItems, in sbIAddMediaItemsListener aListener, in boolean aAsync) |
| Adds media items suppled by the provided enumerator. More...
|
|
void | remove (in sbIMediaItem aMediaItem) |
| Remove the first occurrence of the given media item from the list. More...
|
|
void | removeByIndex (in unsigned long aIndex) |
| Remove a media item from the list by index. More...
|
|
void | removeSome (in nsISimpleEnumerator aMediaItems) |
| Removed media items suppled by the provided enumerator. More...
|
|
void | clear () |
| Clear the list. More...
|
|
void | addListener (in sbIMediaListListener aListener, [optional] in boolean aOwnsWeak, [optional] in unsigned long aFlags, [optional] in sbIPropertyArray aPropertyFilter) |
| Add a listener to this media list. More...
|
|
void | removeListener (in sbIMediaListListener aListener) |
| Remove a listener from this media list. More...
|
|
sbIMediaListView | createView ([optional] in sbIMediaListViewState aState) |
| Create a new, raw view for this list. This is generally not the function that you want to use for making views as it will create a completely raw view, for example lacking any filterConstraint. Please consider using sbLibraryUtils.createStandardMediaListView and proceed carefully if you use this method instead. More...
|
|
void | runInBatchMode (in sbIMediaListBatchCallback aCallback, [optional] in nsISupports aUserData) |
| Runs the given callback with the given user data in batch mode. More...
|
|
nsIStringEnumerator | getDistinctValuesForProperty (in AString aPropertyID) |
|
void | testIsURIAvailable (in nsIObserver aObserver) |
| Test if this media item is available for playback. More...
|
|
nsIChannel | openInputStreamAsync (in nsIStreamListener aListener, in nsISupports aContext) |
| Asynchronously get an input stream to the content of the media item. More...
|
|
nsIInputStream | openInputStream () |
| Synchronously get an input stream to the content of the media item. More...
|
|
nsIOutputStream | openOutputStream () |
| Get an output stream to the content of the media item. More...
|
|
AString | toString () |
| Get a string representation of the media item, useful for debugging. More...
|
|
AString | getProperty (in AString aID) |
| Get the value of a property of this resource. More...
|
|
void | setProperty (in AString aID, in AString aValue) |
| Set the value of a property on this resource. More...
|
|
sbIPropertyArray | getProperties ([optional] in sbIPropertyArray aPropertyIDs) |
| Get properties from this resource in a property array. More...
|
|
void | setProperties (in sbIPropertyArray aProperties) |
| Sets the properties and values in the supplied property array to this resource. This works as if you called setProperty on each property in the array. More...
|
|
boolean | equals (in sbILibraryResource aOtherLibraryResource) |
| Tests the equality of two library resources. More...
|
|
boolean | onItemAdded (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
| Called when a media item is added to the list. More...
|
|
boolean | onBeforeItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
| Called before a media item is removed from the list. More...
|
|
boolean | onAfterItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
| Called after a media item is removed from the list. More...
|
|
boolean | onItemUpdated (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in sbIPropertyArray aProperties) |
| Called when a media item is changed. More...
|
|
boolean | onItemMoved (in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex) |
| Called when a media item is moved. More...
|
|
boolean | onBeforeListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
|
boolean | onListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
|
void | onBatchBegin (in sbIMediaList aMediaList) |
| Called when the library is about to perform multiple operations at once. More...
|
|
void | onBatchEnd (in sbIMediaList aMediaList) |
| Called when the library has finished performing multiple operations at once. More...
|
|
void | onItemCopied (in sbIMediaItem aSourceItem, in sbIMediaItem aDestItem) |
|
void | onDeviceEvent (in sbIDeviceEvent aEvent) |
|