import "sbILibrary.idl";
Inheritance diagram for sbILibrary:
Public Member Functions | |
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. | |
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. | |
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. | |
sbIMediaList | createMediaList (in AString aType,[optional] in sbIPropertyArray aProperties) |
Creates a new media list. | |
sbIMediaList | copyMediaList (in AString aType, in sbIMediaList aSource) |
Creates a new media list. | |
sbIMediaItem | getMediaItem (in AString aGuid) |
Get a media item. | |
sbIMediaItem | getDuplicate (in sbIMediaItem aMediaItem) |
Search for and return a duplicate of the media item specified by aMediaItem. | |
void | registerMediaListFactory (in sbIMediaListFactory aFactory) |
Register a new media list type at run time. | |
void | optimize () |
Called when the library should remove unsupported media list types, unknown property types, temporary items, or otherwise optimize its performance or size. | |
void | flush () |
Called when the library should save any cached data to disk. | |
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. | |
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. | |
Public Attributes | |
readonly attribute sbIDevice | device |
Reference to the device that this library is stored on. | |
readonly attribute boolean | supportsForeignMediaItems |
Declares if this library will host foreign media items. | |
readonly attribute nsIPropertyBag2 | creationParameters |
Holds the parameters with which this library was created. | |
readonly attribute sbILibraryFactory | factory |
Holds the factory that created this library. | |
readonly attribute nsIStringEnumerator | mediaListTypes |
A list of available media list types. |
The library interface is the primary means of exposing media library data to Songbird. Implementors of this interface must also provide implementations of sbIMediaItem and sbIMediaList.
Definition at line 82 of file sbILibrary.idl.
nsIChannel sbILibrary::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.
aUri | The nsIURI to a media item to resolve |
sbIMediaItem sbILibrary::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.
aProperties | Optional initial properties for this new item | |
aAllowDuplicates | If false, an attempt to create a new media item with a content URI that already exists in the library will simply return the existing item rather than creating a new one. If true, a new media item will be created with the specified content URI regardless if it is a duplicate. The default is false. |
boolean sbILibrary::createMediaItemIfNotExist | ( | in nsIURI | aContentUri, | |
[optional] in sbIPropertyArray | aProperties, | |||
[optional] out sbIMediaItem | aResultItem | |||
) |
Create a new media item, disallowing duplicates, and return if it did.
[optional] | aResultItem the item that was created (or found) |
sbIMediaList sbILibrary::createMediaList | ( | in AString | aType, | |
[optional] in sbIPropertyArray | aProperties | |||
) |
Creates a new media list.
aType | - The type of media list to create. | |
aProperties | Optional initial properties for this new item |
sbIMediaList sbILibrary::copyMediaList | ( | in AString | aType, | |
in sbIMediaList | aSource | |||
) |
Creates a new media list.
aType | - The type of media list to create. | |
aSource | - A media list whose items and properties are to be copied. |
sbIMediaItem sbILibrary::getMediaItem | ( | in AString | aGuid | ) |
Get a media item.
aGuid | Guid of media item to get |
sbIMediaItem sbILibrary::getDuplicate | ( | in sbIMediaItem | aMediaItem | ) |
Search for and return a duplicate of the media item specified by aMediaItem.
aMediaItem | Media item for which to get duplicate. |
void sbILibrary::registerMediaListFactory | ( | in sbIMediaListFactory | aFactory | ) |
Register a new media list type at run time.
aFactory | - The factory that will create the media list |
nsIArray sbILibrary::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.
aURIArray | nsIArray of nsIURI objects | |
aPropertyArrayArray | Optional array of sbIPropertyArray. If specified, the properties specified at each array index will be used in the creation of the new media item at the same array index. | |
aAllowDuplicates | If false, URIs specified in aURIArray that already exist in the library will not be created and not returned. If true, media items will be created for all of the URIs specified regardless if they already exist. The default is false. |
void sbILibrary::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.
aListener | Listener to receive progress and complete notifications | |
aURIArray | nsIArray of nsIURI objects | |
aPropertyArrayArray | Optional array of sbIPropertyArray. If specified, the properties specified at each array index will be used in the creation of the new media item at the same array index. | |
aAllowDuplicates | If false, URIs specified in aURIArray that already exist in the library will not be created and not returned. If true, media items will be created for all of the URIs specified regardless if they already exist. The default is false. |