sbIRemotePlayer Interface Reference

This interface is a composition of many of our other interfaces with the goal of exposing a more web-friendly interface to web sites. This defines our "Remote API" the websites can call to get information about and interact with Songbird. More...

import"sbIRemotePlayer.idl";

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

Public Member Functions

boolean supportsVersion (in AString aAPIVersion)
 Convenience method to see if the requested API version is supported. More...
 
void addListener (in AString aKey, in sbIRemoteObserver aObserver)
 Bind an observer to get called on changes to Songbird metadata/state. More...
 
void removeListener (in AString aKey, in sbIRemoteObserver aObserver)
 Remove an observer from the metadata key. More...
 
void downloadItem (in sbIMediaItem aItem)
 Download the item passed in. More...
 
void downloadList (in sbIRemoteMediaList aList)
 Download all items in a MediaList. More...
 
void downloadSelected (in sbIRemoteWebPlaylist aWebPlaylist)
 Download only the selected elements from a WebPlaylist. More...
 
void play ()
 Begin playback at the current location. More...
 
void playMediaList (in sbIRemoteMediaList aList, in PRInt32 aIndex)
 
void playURL (in AString aURL)
 Play an media file by URL. More...
 
void stop ()
 Stop playback. Sets position to beginning. More...
 
void pause ()
 Stop playback, leaves position at current location. More...
 
void next ()
 Skip to the next track and begin playing. More...
 
void previous ()
 Skip to the previous track and begin playing. More...
 
void setSiteScope (in AUTF8String aDomain, in AUTF8String aPath)
 
nsIURI getSiteScope ()
 Get the site scope. More...
 
sbIRemoteLibrary libraries (in AString aLibraryID)
 
void fireEventToContent (in AString aClass, in AString aType)
 Fires the event to the webpage. More...
 
void fireMediaItemStatusEventToContent (in AString aClass, in AString aType, in sbIMediaItem aMediaItem, in long aStatus)
 Fires the media item status event to the webpage. More...
 
void onCommandsChanged ()
 Forces the webplaylist to rescan its commands. More...
 
boolean hasAccess (in AString aRemotePermCataegory)
 Check if the code has access to a category. More...
 
void createTextProperty (in AString ID, in AString displayName, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createDateTimeProperty (in AString ID, in AString displayName, in PRInt32 timeType, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createURIProperty (in AString ID, in AString displayName, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createNumberProperty (in AString ID, in AString displayName, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createImageProperty (in AString ID, in AString displayName, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createRatingsProperty (in AString ID, in AString displayName, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createButtonProperty (in AString ID, in AString displayName, in AString buttonLabel, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 
void createDownloadButtonProperty (in AString ID, in AString displayName, in AString buttonLabel, [optional] in boolean readOnly, [optional] in boolean viewable, [optional] in unsigned long nullSort)
 

Public Attributes

readonly attribute unsigned long apiVersionMajor
 The major API version. More...
 
readonly attribute unsigned long apiVersionMinor
 The minor API version. More...
 
readonly attribute AString name
 The name of the player. More...
 
readonly attribute AString currentArtist
 The name of the artist for the currently playing media item. More...
 
readonly attribute AString currentAlbum
 The name of the album for the currently playing track. More...
 
readonly attribute AString currentTrack
 The name of the currently playing track. More...
 
readonly attribute boolean playing
 The playing state of the application. More...
 
readonly attribute boolean paused
 The paused state of the application. More...
 
readonly attribute long long repeat
 The repeat state for playback. More...
 
readonly attribute boolean shuffle
 Shuffle state for playback. More...
 
attribute long long position
 The location of playback within the current media, in milliseconds. More...
 
readonly attribute unsigned
long long 
duration
 The duration of the current media, in milliseconds. More...
 
readonly attribute long long volume
 The volume on a range from 0 to 255. More...
 
readonly attribute boolean mute
 The mute state. More...
 
readonly attribute
sbIRemoteCommands 
commands
 The collection of commands associated with the current page. More...
 
readonly attribute
sbIRemoteWebPlaylist 
webPlaylist
 The current web playlist. More...
 
readonly attribute sbIRemoteLibrary mainLibrary
 
readonly attribute sbIRemoteLibrary webLibrary
 
readonly attribute sbIRemoteLibrary siteLibrary
 
readonly attribute
sbIRemoteMediaList 
downloadMediaList
 

Detailed Description

This interface is a composition of many of our other interfaces with the goal of exposing a more web-friendly interface to web sites. This defines our "Remote API" the websites can call to get information about and interact with Songbird.

Definition at line 115 of file sbIRemotePlayer.idl.

Member Function Documentation

void sbIRemotePlayer::addListener ( in AString  aKey,
in sbIRemoteObserver  aObserver 
)

Bind an observer to get called on changes to Songbird metadata/state.

void sbIRemotePlayer::createButtonProperty ( in AString  ID,
in AString  displayName,
in AString  buttonLabel,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createDateTimeProperty ( in AString  ID,
in AString  displayName,
in PRInt32  timeType,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createDownloadButtonProperty ( in AString  ID,
in AString  displayName,
in AString  buttonLabel,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createImageProperty ( in AString  ID,
in AString  displayName,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createNumberProperty ( in AString  ID,
in AString  displayName,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createRatingsProperty ( in AString  ID,
in AString  displayName,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createTextProperty ( in AString  ID,
in AString  displayName,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::createURIProperty ( in AString  ID,
in AString  displayName,
[optional] in boolean  readOnly,
[optional] in boolean  viewable,
[optional] in unsigned long  nullSort 
)
void sbIRemotePlayer::downloadItem ( in sbIMediaItem  aItem)

Download the item passed in.

void sbIRemotePlayer::downloadList ( in sbIRemoteMediaList  aList)

Download all items in a MediaList.

void sbIRemotePlayer::downloadSelected ( in sbIRemoteWebPlaylist  aWebPlaylist)

Download only the selected elements from a WebPlaylist.

void sbIRemotePlayer::fireEventToContent ( in AString  aClass,
in AString  aType 
)

Fires the event to the webpage.

void sbIRemotePlayer::fireMediaItemStatusEventToContent ( in AString  aClass,
in AString  aType,
in sbIMediaItem  aMediaItem,
in long  aStatus 
)

Fires the media item status event to the webpage.

nsIURI sbIRemotePlayer::getSiteScope ( )

Get the site scope.

boolean sbIRemotePlayer::hasAccess ( in AString  aRemotePermCataegory)

Check if the code has access to a category.

sbIRemoteLibrary sbIRemotePlayer::libraries ( in AString  aLibraryID)
void sbIRemotePlayer::next ( )

Skip to the next track and begin playing.

void sbIRemotePlayer::onCommandsChanged ( )

Forces the webplaylist to rescan its commands.

void sbIRemotePlayer::pause ( )

Stop playback, leaves position at current location.

void sbIRemotePlayer::play ( )

Begin playback at the current location.

void sbIRemotePlayer::playMediaList ( in sbIRemoteMediaList  aList,
in PRInt32  aIndex 
)
void sbIRemotePlayer::playURL ( in AString  aURL)

Play an media file by URL.

void sbIRemotePlayer::previous ( )

Skip to the previous track and begin playing.

void sbIRemotePlayer::removeListener ( in AString  aKey,
in sbIRemoteObserver  aObserver 
)

Remove an observer from the metadata key.

void sbIRemotePlayer::setSiteScope ( in AUTF8String  aDomain,
in AUTF8String  aPath 
)
void sbIRemotePlayer::stop ( )

Stop playback. Sets position to beginning.

boolean sbIRemotePlayer::supportsVersion ( in AString  aAPIVersion)

Convenience method to see if the requested API version is supported.

Member Data Documentation

readonly attribute unsigned long sbIRemotePlayer::apiVersionMajor

The major API version.

Definition at line 157 of file sbIRemotePlayer.idl.

readonly attribute unsigned long sbIRemotePlayer::apiVersionMinor

The minor API version.

Definition at line 171 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteCommands sbIRemotePlayer::commands

The collection of commands associated with the current page.

Definition at line 378 of file sbIRemotePlayer.idl.

readonly attribute AString sbIRemotePlayer::currentAlbum

The name of the album for the currently playing track.

Definition at line 213 of file sbIRemotePlayer.idl.

readonly attribute AString sbIRemotePlayer::currentArtist

The name of the artist for the currently playing media item.

Definition at line 199 of file sbIRemotePlayer.idl.

readonly attribute AString sbIRemotePlayer::currentTrack

The name of the currently playing track.

Definition at line 227 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteMediaList sbIRemotePlayer::downloadMediaList

Definition at line 484 of file sbIRemotePlayer.idl.

readonly attribute unsigned long long sbIRemotePlayer::duration

The duration of the current media, in milliseconds.

Definition at line 334 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteLibrary sbIRemotePlayer::mainLibrary

Definition at line 413 of file sbIRemotePlayer.idl.

readonly attribute boolean sbIRemotePlayer::mute

The mute state.

True if muted or the volume is set to 0, false otherwise

Definition at line 364 of file sbIRemotePlayer.idl.

readonly attribute AString sbIRemotePlayer::name

The name of the player.

Definition at line 185 of file sbIRemotePlayer.idl.

readonly attribute boolean sbIRemotePlayer::paused

The paused state of the application.

Returns
false if the application is not paused
true if the application is paused

Definition at line 265 of file sbIRemotePlayer.idl.

readonly attribute boolean sbIRemotePlayer::playing

The playing state of the application.

Returns
false if the application is stopped
true if the application is playing or paused

Definition at line 246 of file sbIRemotePlayer.idl.

attribute long long sbIRemotePlayer::position

The location of playback within the current media, in milliseconds.

Definition at line 319 of file sbIRemotePlayer.idl.

readonly attribute long long sbIRemotePlayer::repeat

The repeat state for playback.

The repeat state for playback. This can be one of three values: 0 - no repeat 1 - repeat the current track forever 2 - repeat the current playlist forever

Definition at line 287 of file sbIRemotePlayer.idl.

readonly attribute boolean sbIRemotePlayer::shuffle

Shuffle state for playback.

This will be true if shuffle is enabled, false if not.

Definition at line 304 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteLibrary sbIRemotePlayer::siteLibrary

Definition at line 456 of file sbIRemotePlayer.idl.

readonly attribute long long sbIRemotePlayer::volume

The volume on a range from 0 to 255.

Definition at line 348 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteLibrary sbIRemotePlayer::webLibrary

Definition at line 434 of file sbIRemotePlayer.idl.

readonly attribute sbIRemoteWebPlaylist sbIRemotePlayer::webPlaylist

The current web playlist.

Definition at line 392 of file sbIRemotePlayer.idl.


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