sbIPlaylistCommandsManager Interface Reference

The service used to register, unregister, and list playlist commands for a particular playlist guid or type. More...

import"sbIPlaylistCommands.idl";

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

Public Member Functions

void registerPlaylistCommandsForLibrary (in PRBool aTargetServicePane, in sbiLibrary aLibrary, in sbIPlaylistCommands aCommandObj)
 Register sbIPlaylistCommands objects to be shown for aLibrary and all mediaLists in that library. A listener will be created to detect if a medialist is added or removed from the specified library and aCommandObj will be automatically registered or unregistered from that list. More...
 
void unregisterPlaylistCommandsForLibrary (in PRBool aTargetServicePane, in sbiLibrary aLibrary, in sbIPlaylistCommands aCommandObj)
 Unregister an sbIPlaylistCommands object from aLibrary. This will only successfully unregister commands that were registered by registerPlaylistCommandsForLibrary. The command will be removed from the list that represents the library and from all medialists in that library. More...
 
void registerPlaylistCommandsMediaItem (in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
 Register sbIPlaylistCommands objects to be shown for specific playlists in order to let the user perform actions on a playlist's items. More...
 
void unregisterPlaylistCommandsMediaItem (in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
 Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMediaItem. More...
 
sbIPlaylistCommands getPlaylistCommandsMediaItem (in AString aContextGUID, in AString aPlaylistType)
 Retrieve the root sbIPlaylistCommands object registered to a specific medialist guid or type. More...
 
void registerPlaylistCommandsMediaList (in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
 Register sbIPlaylistCommands objects to be shown for specific playlists in order to let the user perform actions on the playlist itself. More...
 
void unregisterPlaylistCommandsMediaList (in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
 Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMediaList. More...
 
sbIPlaylistCommands getPlaylistCommandsMediaList (in AString aContextGUID, in AString aPlaylistType)
 Retrieve the root sbIPlaylistCommands object for a specific playlist. More...
 
void addListenerForMediaList (in sbIMediaList aMediaList, in sbIPlaylistCommandsListener aListener)
 Adds the param listener to the root sbIPlaylistCommands for the param medialist. Every medialist can have two root commands, one for the medialist guid and one for its type, but these root commands are not instantiated until a playlist command is specifically added for that guid or type. This method adds the param listener for both root commands and, if a root command does not exist when this method is called, it guarantees that the param listener will be added immediately when the root command is created and the listener will receive all notifications sent by the root command. More...
 
void removeListenerForMediaList (in sbIMediaList aMediaList, in sbIPlaylistCommandsListener aListener)
 Removes listeners for the param medialist. More...
 
void publish (in AString aCommandGUID, in sbIPlaylistCommands aCommandObj)
 Publish an sbIPlaylistCommands interface for public consumption. More...
 
void withdraw (in AString aCommandGUID, in sbIPlaylistCommands aCommandObj)
 Withdraw a previously published sbIPlaylistCommands interface. More...
 
sbIPlaylistCommands request (in AString aContextGUID)
 Request a copy of a published sbIPlaylistCommands interface. More...
 

Detailed Description

The service used to register, unregister, and list playlist commands for a particular playlist guid or type.

Definition at line 568 of file sbIPlaylistCommands.idl.

Member Function Documentation

void sbIPlaylistCommandsManager::addListenerForMediaList ( in sbIMediaList  aMediaList,
in sbIPlaylistCommandsListener  aListener 
)

Adds the param listener to the root sbIPlaylistCommands for the param medialist. Every medialist can have two root commands, one for the medialist guid and one for its type, but these root commands are not instantiated until a playlist command is specifically added for that guid or type. This method adds the param listener for both root commands and, if a root command does not exist when this method is called, it guarantees that the param listener will be added immediately when the root command is created and the listener will receive all notifications sent by the root command.

Parameters
aMediaListThe medialist whose two root commands, for guid and type, will receive the param listener
aListenerThe listener to be added
sbIPlaylistCommands sbIPlaylistCommandsManager::getPlaylistCommandsMediaItem ( in AString  aContextGUID,
in AString  aPlaylistType 
)

Retrieve the root sbIPlaylistCommands object registered to a specific medialist guid or type.

The "guid" has precedence over the "type" string.

Parameters
aContextGUIDThe guid string for the playlist
aPlaylistTypeThe type of the playlist
Returns
The root sbIPlaylistCommands object for the specified medialist guid or type. Displayed sbIPlaylistCommands are children of this root command
See Also
sbIPlaylistCommands, playlist.xml
sbIPlaylistCommands sbIPlaylistCommandsManager::getPlaylistCommandsMediaList ( in AString  aContextGUID,
in AString  aPlaylistType 
)

Retrieve the root sbIPlaylistCommands object for a specific playlist.

The "guid" has precedence over the "type" string.

This method is only called by the servicepane UI object, in servicePane.xml

Parameters
aContextGUIDThe guid string for the playlist
aPlaylistTypeThe type of the playlist
Returns
A simple enumerator of the command object instances used for this playlist
See Also
sbIPlaylistCommands, servicePane.xml
void sbIPlaylistCommandsManager::publish ( in AString  aCommandGUID,
in sbIPlaylistCommands  aCommandObj 
)

Publish an sbIPlaylistCommands interface for public consumption.

An sbIPlaylistCommands interface may be published so that third party code may reuse them in their own command sets.

Parameters
aCommandGUIDThe GUID identifying this command interface
aCommandObjThe interface to publish
See Also
request, withdraw, kPlaylistCommands.jsm, sbIPlaylistCommands
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L539
void sbIPlaylistCommandsManager::registerPlaylistCommandsForLibrary ( in PRBool  aTargetServicePane,
in sbiLibrary  aLibrary,
in sbIPlaylistCommands  aCommandObj 
)

Register sbIPlaylistCommands objects to be shown for aLibrary and all mediaLists in that library. A listener will be created to detect if a medialist is added or removed from the specified library and aCommandObj will be automatically registered or unregistered from that list.

Parameters
aTargetServicePaneTrue if aCommandObj should appear in the servicepane context menu. False if it should appear elsewhere. (The mediaitem context menu or toolbar currently)
aLibraryThe library for which aCommandObj should be registered
aCommandObjThe command object instance to be registered
See Also
sbIPlaylistCommands, unregisterPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L154
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L627
void sbIPlaylistCommandsManager::registerPlaylistCommandsMediaItem ( in AString  aContextGUID,
in AString  aPlaylistType,
in sbIPlaylistCommands  aCommandObj 
)

Register sbIPlaylistCommands objects to be shown for specific playlists in order to let the user perform actions on a playlist's items.

The sbIPlaylistCommands interface is used to algorithmically define a set of commands to be rendered arbitrarily by a playlist ui object (currently, playlist.xml).

Commands can be registered for a specific playlist, or for any "type" characteristic. If both are specified, the same command will be registered to both.

Parameters
aContextGUIDThe guid string for the database to register against
aPlaylistTypeThe arbitrary type string to register against
aCommandObjThe command object instance to be used for these playlists
See Also
sbIPlaylistCommands, unregisterPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L154
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L627
void sbIPlaylistCommandsManager::registerPlaylistCommandsMediaList ( in AString  aContextGUID,
in AString  aPlaylistType,
in sbIPlaylistCommands  aCommandObj 
)

Register sbIPlaylistCommands objects to be shown for specific playlists in order to let the user perform actions on the playlist itself.

The sbIPlaylistCommands interface is used to algorithmically define a set of commands to be rendered arbitrarily by a service tree ui object (currently, servicePane.xml).

Commands can be registered for a specific playlist, or for any "type" characteristic.

Parameters
aContextGUIDThe guid string for the database to register against
aPlaylistTypeThe arbitrary type string to register against
aCommandObjThe command object instance to be used for these playlists
See Also
sbIPlaylistCommands, unregisterPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L681
void sbIPlaylistCommandsManager::removeListenerForMediaList ( in sbIMediaList  aMediaList,
in sbIPlaylistCommandsListener  aListener 
)

Removes listeners for the param medialist.

Parameters
aMediaListThe medialist for which listeners should be removed
sbIPlaylistCommands sbIPlaylistCommandsManager::request ( in AString  aContextGUID)

Request a copy of a published sbIPlaylistCommands interface.

Parameters
aCommandGUIDThe GUID identifying this command interface
Returns
A copy of the requested interface, or null if that interface is not in the manager's repository.
See Also
publish, withdraw, kPlaylistCommands.jsm, sbIPlaylistCommands
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L130
void sbIPlaylistCommandsManager::unregisterPlaylistCommandsForLibrary ( in PRBool  aTargetServicePane,
in sbiLibrary  aLibrary,
in sbIPlaylistCommands  aCommandObj 
)

Unregister an sbIPlaylistCommands object from aLibrary. This will only successfully unregister commands that were registered by registerPlaylistCommandsForLibrary. The command will be removed from the list that represents the library and from all medialists in that library.

Parameters
aTargetServicePaneTrue if aCommandObj appears in the servicepane context menu. False if it appears elsewhere. (The mediaitem context menu or toolbar currently. The desired location is specified through aCommandObj's visibility callback)
aLibraryThe library for which aCommandObj should be unregistered
aCommandObjThe command object instance to be unregistered
See Also
sbIPlaylistCommands, unregisterPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L154
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L627
void sbIPlaylistCommandsManager::unregisterPlaylistCommandsMediaItem ( in AString  aContextGUID,
in AString  aPlaylistType,
in sbIPlaylistCommands  aCommandObj 
)

Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMediaItem.

Commands can be registered for a specific playlist, or for any "type" characteristic. If both are specified, the command will be unregistered from both.

Parameters
aContextGUIDThe guid that was used to register the sbIPlaylistCommand
aPlaylistTypeThe type string that was used to register the sbIPlaylistCommand
aCommandObjThe command object that was registered
See Also
sbIPlaylistCommands, registerPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L194
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L736
void sbIPlaylistCommandsManager::unregisterPlaylistCommandsMediaList ( in AString  aContextGUID,
in AString  aPlaylistType,
in sbIPlaylistCommands  aCommandObj 
)

Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMediaList.

Parameters
aContextGUIDThe guid that was used to register the sbIPlaylistCommand
aPlaylistTypeThe type string that was used to register the sbIPlaylistCommand
aCommandObjThe command object that was registered
See Also
sbIPlaylistCommands, registerPlaylistCommands, playlist.xml
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L741
void sbIPlaylistCommandsManager::withdraw ( in AString  aCommandGUID,
in sbIPlaylistCommands  aCommandObj 
)

Withdraw a previously published sbIPlaylistCommands interface.

Note that the original interface must be passed to this function for the call to succeed. Since calling request() returns a copy of the interface rather than the original interface itself, it means that you cannot withdraw someone else's interface unless you have access to it directly.

Parameters
aCommandGUIDThe GUID identifying this command interface
aCommandObjThe interface to withdraw
See Also
publish, request, kPlaylistCommands.jsm, sbIPlaylistCommands
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L694

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