sbIRemoteLibrary Interface Reference

An interface to control a media library from remote web pages. More...

import"sbIRemoteLibrary.idl";

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

Public Member Functions

sbIMediaItem createMediaItem (in AString aURL)
 Create a media item from a URL. More...
 
sbIRemoteMediaList createSimpleMediaList (in AString aName, [optional] in AString aSiteID)
 Create a simple media list. More...
 
void createMediaListFromURL (in AString aName, in AString aURL, [optional] in sbICreateMediaListCallback aCallback, [optional] in AString aSiteID)
 Create a media list from an exising playlist file. More...
 
void connectToDefaultLibrary (in AString aLibName)
 Connect the remote library to the main or web library. More...
 
sbIRemoteMediaList getMediaListBySiteID (in AString aSiteID)
 Get the media list with the given siteID. More...
 

Public Attributes

attribute boolean scanMediaOnCreation
 Control whether or not media is scanned when created. More...
 
readonly attribute
nsISimpleEnumerator 
playlists
 
readonly attribute nsIVariant mostPlayedArtists
 

Detailed Description

An interface to control a media library from remote web pages.

The remote library interface allows websites to create media items in a manner more web-like than the internal sbILibrary interface. Access to the main or web libraries is controlled through permissions set by the user. Some or all calls made to objects that implement this interface may fail based on the permissions set by the user.

Definition at line 111 of file sbIRemoteLibrary.idl.

Member Function Documentation

void sbIRemoteLibrary::connectToDefaultLibrary ( in AString  aLibName)

Connect the remote library to the main or web library.

This method retrieves the internal data model's library for use by the webpage.

Parameters
aLibName- Only accepted values are 'main' or 'web'
sbIMediaItem sbIRemoteLibrary::createMediaItem ( in AString  aURL)

Create a media item from a URL.

Create and insert a media item into the library

Parameters
Anhttp or https URL that points to a valid media file
Returns
the media item that gets created
NS_ERROR_INVALID_ARG if URL is not an http: or https: URL
void sbIRemoteLibrary::createMediaListFromURL ( in AString  aName,
in AString  aURL,
[optional] in sbICreateMediaListCallback  aCallback,
[optional] in AString  aSiteID 
)

Create a media list from an exising playlist file.

Create and insert a media list into the library. The URL passed in must be an http or https url that points to a type of playlist file supported by Songbird. That is currently: .pls, .m3u, .html, and rss type feeds.

Parameters
aURLA string that points to a type of playlist file that is supported by Songbird. It must be either http: or https: and one of the following playlist types: .pls, .m3u, .html and rss type feeds.
aCallbackOptional callback object that gets called when the media list load is complete.
sbIRemoteMediaList sbIRemoteLibrary::createSimpleMediaList ( in AString  aName,
[optional] in AString  aSiteID 
)

Create a simple media list.

Create and insert a media list into the library with the name passed in.

Parameters
aNameA string to be used as an identifier on the media list.
aSiteIDAn optional string to be used as an identifier on the media list. If unspecified the siteID will be set to the value of aName.
Returns
the media list that gets created.
sbIRemoteMediaList sbIRemoteLibrary::getMediaListBySiteID ( in AString  aSiteID)

Get the media list with the given siteID.

Parameters
aSiteID- The siteID of the media list to fetch
Returns
The corresponding media list, or null if not found
See Also
createSimpleMediaList

Member Data Documentation

readonly attribute nsIVariant sbIRemoteLibrary::mostPlayedArtists

Definition at line 424 of file sbIRemoteLibrary.idl.

readonly attribute nsISimpleEnumerator sbIRemoteLibrary::playlists

Definition at line 396 of file sbIRemoteLibrary.idl.

attribute boolean sbIRemoteLibrary::scanMediaOnCreation

Control whether or not media is scanned when created.

This attribute controlls whether or not the library will cause the metadata to be scanned for any tracks created. If a website wants to hand-set its metadata then it should set this to false. By default this is true. If metadat for a particular track has already been scanned, that metadata will show up automatically ( for instance for 2 items created from the same URL ).

Definition at line 147 of file sbIRemoteLibrary.idl.


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