Songbird / Development / Songbird Add-Ons API Documentation

sbIRemoteLibrary Interface Reference

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

import "sbIRemoteLibrary.idl";

Inheritance diagram for sbIRemoteLibrary:

sbIRemoteSiteLibrary List of all members.

Public Member Functions

sbIMediaItem createMediaItem (in AString aURL)
 Create a media item from a URL.
sbIRemoteMediaList createSimpleMediaList (in AString aName,[optional] in AString aSiteID)
 Create a simple media list.
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.
void connectToDefaultLibrary (in AString aLibName)
 Connect the remote library to the main or web library.
sbIRemoteMediaList getMediaListBySiteID (in AString aSiteID)
 Get the media list with the given siteID.

Public Attributes

attribute boolean scanMediaOnCreation
 Control whether or not media is scanned when created.
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

sbIMediaItem sbIRemoteLibrary::createMediaItem ( in AString  aURL  ) 

Create a media item from a URL.

Create and insert a media item into the library

Parameters:
An http 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

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:
aName A string to be used as an identifier on the media list.
aSiteID An 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.

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:
aURL A 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.
aCallback Optional callback object that gets called when the media list load is complete.

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'

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

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 it's 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:
Generated on Tue Mar 10 14:29:02 2009 for Songbird by  doxygen 1.5.2