sbIPlaylistCommands.idl
Go to the documentation of this file.
1 /*
2  *=BEGIN SONGBIRD GPL
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2010 POTI, Inc.
7  * http://www.songbirdnest.com
8  *
9  * This file may be licensed under the terms of of the
10  * GNU General Public License Version 2 (the ``GPL'').
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the GPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the GPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/gpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *=END SONGBIRD GPL
23  */
24 
25 #include "nsISupports.idl"
26 
27 interface nsIDOMDocument;
28 interface nsIDOMNode;
29 interface nsIDOMWindow;
33 interface sbIMediaItem;
34 interface sbIMediaList;
35 interface sbILibrary;
36 interface nsISimpleEnumerator;
37 
64 [scriptable, uuid(1f068d94-1dd2-11b2-825d-8f815e64b75d)]
66 {
72  readonly attribute AString id;
73 
89  attribute PRUint16 targetFlags;
90 
97 
103  void addCommandObject( in sbIPlaylistCommands aCommandObjectAction );
104 
110  void removeCommandObject( in sbIPlaylistCommands aCommandObject );
111 
118  void addListener( in sbIPlaylistCommandsListener aListener );
119 
125  void removeListener( in sbIPlaylistCommandsListener aListener );
126 
138  void notifyListeners( in AString aTriggerFunction,
139  in sbIPlaylistCommands aCommandObject );
140 
150  PRBool getVisible( in AString aHost );
151 
160 
171  void setContext( in sbIPlaylistCommandsContext aContext );
172 
185  PRInt32 getNumCommands( in AString aSubMenu, in AString aHost );
186 
198  AString getCommandType( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
199 
215  AString getCommandId( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
216 
229  AString getCommandText( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
230 
243  PRInt32 getCommandFlex( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
244 
259  AString getCommandToolTipText(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
260 
273  PRBool getCommandEnabled(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
274 
283  PRBool getCommandVisible(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
284 
295  PRBool getCommandFlag( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
296 
307  AString getCommandValue( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
308 
319  AString getCommandChoiceItem( in AString aChoiceMenu, in AString aHost );
320 
329  AString getCommandShortcutModifiers( in AString aSubMenu,
330  in PRInt32 aIndex,
331  in AString aHost );
332 
341  AString getCommandShortcutKey( in AString aSubMenu,
342  in PRInt32 aIndex,
343  in AString aHost );
344 
353  AString getCommandShortcutKeycode( in AString aSubMenu,
354  in PRInt32 aIndex,
355  in AString aHost );
356 
365  PRBool getCommandShortcutLocal( in AString aSubMenu,
366  in PRInt32 aIndex,
367  in AString aHost );
368 
380  sbIPlaylistCommands getCommandSubObject( in AString aSubMenu,
381  in PRInt32 aIndex,
382  in AString aHost );
383 
391 
402  nsIDOMNode instantiateCustomCommand( in AString aSubMenu,
403  in PRInt32 aIndex,
404  in AString aHost,
405  in AString aID,
406  in nsIDOMDocument aDocument );
407 
417  void refreshCustomCommand( in AString aSubMenu,
418  in PRInt32 aIndex,
419  in AString aHost,
420  in AString aID,
421  in nsIDOMNode aCustomCommandElement );
422 
436  void onCommand( in AString aSubMenu,
437  in PRInt32 aIndex,
438  in AString aHost,
439  in AString aId,
440  in AString aValue );
441 
484 
493  void initCommands( in AString aHost );
494 
501  void shutdownCommands( );
502 };
503 
508 [scriptable, uuid(f08d76b6-cbe6-4cad-945e-1b1eea10a16c)]
510 {
514  readonly attribute nsIDOMNode playlist;
515 
519  readonly attribute sbIMediaItem medialist;
520 
524  readonly attribute nsIDOMWindow window;
525 
529  readonly attribute sbIPlaylistCommands commands;
530 };
531 
537 [scriptable, uuid(5ff1f576-1dd2-11b2-ae11-9f40001e5dbb)]
539 {
545  void onCommandAdded(in sbIPlaylistCommands aCommandObject);
546 
552  void onCommandRemoved(in sbIPlaylistCommands aCommandObject);
553 
559  void onCommandChanged(in sbIPlaylistCommands aCommandObject);
560 };
561 
567 [scriptable, uuid(385a86c4-1dd2-11b2-a945-f6f41c562fe9)]
569 {
587  void registerPlaylistCommandsForLibrary(in PRBool aTargetServicePane,
588  in sbiLibrary aLibrary,
589  in sbIPlaylistCommands aCommandObj);
590 
609  void unregisterPlaylistCommandsForLibrary(in PRBool aTargetServicePane,
610  in sbiLibrary aLibrary,
611  in sbIPlaylistCommands aCommandObj);
630  void registerPlaylistCommandsMediaItem( in AString aContextGUID,
631  in AString aPlaylistType,
632  in sbIPlaylistCommands aCommandObj );
633 
647  void unregisterPlaylistCommandsMediaItem( in AString aContextGUID,
648  in AString aPlaylistType,
649  in sbIPlaylistCommands aCommandObj );
650 
663  sbIPlaylistCommands getPlaylistCommandsMediaItem( in AString aContextGUID,
664  in AString aPlaylistType );
665 
682  void registerPlaylistCommandsMediaList( in AString aContextGUID,
683  in AString aPlaylistType,
684  in sbIPlaylistCommands aCommandObj );
685 
695  void unregisterPlaylistCommandsMediaList( in AString aContextGUID,
696  in AString aPlaylistType,
697  in sbIPlaylistCommands aCommandObj );
698 
711  sbIPlaylistCommands getPlaylistCommandsMediaList( in AString aContextGUID,
712  in AString aPlaylistType );
713 
728  void addListenerForMediaList( in sbIMediaList aMediaList,
729  in sbIPlaylistCommandsListener aListener );
730 
736  void removeListenerForMediaList( in sbIMediaList aMediaList,
737  in sbIPlaylistCommandsListener aListener );
738 
750  void publish( in AString aCommandGUID, in sbIPlaylistCommands aCommandObj );
751 
765  void withdraw( in AString aCommandGUID, in sbIPlaylistCommands aCommandObj );
766 
776  sbIPlaylistCommands request( in AString aContextGUID );
777 };
778  // end of playlistcommands group
780 
781 
PRBool getCommandEnabled(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the enabled state for the requested command element index.
PRBool getCommandShortcutLocal(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return a boolean reflecting the local vs window-wide behavior of the shortcut.
void setContext(in sbIPlaylistCommandsContext aContext)
Be informed when a set of commands are attached to a playlist element.
void notifyListeners(in AString aTriggerFunction, in sbIPlaylistCommands aCommandObject)
Notifies the listeners added to this command object. aTriggerFunction can be onCommandAdded, onCommandRemoved, or onCommandChanged and the param aCommandObject is expected to be the added, removed, or changed sbIPlaylistCommands object.
PRBool getCommandVisible(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the visible state for the requested command element index.
readonly attribute sbIPlaylistCommands commands
The commands object itself.
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 perf...
readonly attribute sbIPlaylistCommandsBuilderPCCallback visibleCallback
Return the current visibility callback method that determines where this object will be visible...
attribute PRUint16 targetFlags
Flags of the form specified in sbIPlaylistCommandsHelper.idl to indicate the current location of this...
void shutdownCommands()
Shutdown function.
onPageChanged aValue
Definition: FeedWriter.js:1395
The interface for receiving notices when a Command Object is added to or removed from another Command...
nsISimpleEnumerator getChildrenCommandObjects()
Returns all sbIPlaylistCommands that are children of this command object (returns the originals) ...
AString getCommandToolTipText(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the human readable text for the requested command element's tooltip.
_updateCookies aHost
void withdraw(in AString aCommandGUID, in sbIPlaylistCommands aCommandObj)
Withdraw a previously published sbIPlaylistCommands interface.
void addListener(in sbIPlaylistCommandsListener aListener)
Adds a listener to this command object to detect child additions or removals and other changes to the...
AString getCommandText(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the human readable text for the requested command element index.
void onCommand(in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aId, in AString aValue)
Handle the fact that a command was activated.
readonly attribute nsIDOMWindow window
The outer window containing the playlist against which the commands are acting.
A callback interface used to receive callbacks from an sbIPlaylistCommandsBuilder object relating to ...
void removeListenerForMediaList(in sbIMediaList aMediaList, in sbIPlaylistCommandsListener aListener)
Removes listeners for the param medialist.
var uuid
A brief description of the contents of this interface.
void publish(in AString aCommandGUID, in sbIPlaylistCommands aCommandObj)
Publish an sbIPlaylistCommands interface for public consumption.
void initCommands(in AString aHost)
Initialization function.
void onCommandRemoved(in sbIPlaylistCommands aCommandObject)
Callback method when a Command Object is removed.
void onCommandAdded(in sbIPlaylistCommands aCommandObject)
Callback method when a Command Object is added.
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 perf...
const nsIDOMWindow
function d(s)
AString getCommandChoiceItem(in AString aChoiceMenu, in AString aHost)
Return the selected item for choice list of the requested command element index.
_collectFormDataForFrame aDocument
readonly attribute AString id
An identifier for the command object, unique for each playlist type or guid. Must be set with the ini...
void unregisterPlaylistCommandsMediaItem(in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMed...
readonly attribute nsIDOMNode playlist
The playlist against which the commands are acting.
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...
void unregisterPlaylistCommandsMediaList(in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj)
Unregister a sbIPlaylistCommands object that was previously registered to registerPlaylistCommandsMed...
void addCommandObject(in sbIPlaylistCommands aCommandObjectAction)
Adds a command object as a child of this sbIPlaylistCommands object.
sbIPlaylistCommands getCommandSubObject(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return an sbIPlaylistCommands secondary object.
sbIPlaylistCommands getPlaylistCommandsMediaList(in AString aContextGUID, in AString aPlaylistType)
Retrieve the root sbIPlaylistCommands object for a specific playlist.
void removeListener(in sbIPlaylistCommandsListener aListener)
Removes a listener from this command object.
void unregisterPlaylistCommandsForLibrary(in PRBool aTargetServicePane, in sbiLibrary aLibrary, in sbIPlaylistCommands aCommandObj)
Unregister an sbIPlaylistCommands object from aLibrary. This will only successfully unregister comman...
nsIDOMNode instantiateCustomCommand(in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMDocument aDocument)
Instantiate the custom element associated with the requested command.
void addListenerForMediaList(in sbIMediaList aMediaList, in sbIPlaylistCommandsListener aListener)
Adds the param listener to the root sbIPlaylistCommands for the param medialist. Every medialist can ...
Media library abstraction.
Definition: sbILibrary.idl:82
PRInt32 getNumCommands(in AString aSubMenu, in AString aHost)
Return the number of command elements to be displayed.
An interface that represents the set of command buttons and context menu items available on a display...
AString getCommandShortcutModifiers(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the shortcut modifiers of the requested command element index.
PRBool getVisible(in AString aHost)
Return the visible state for the entire command object.
readonly attribute sbIMediaItem medialist
The medialist against which the commands are acting.
sbIPlaylistCommands duplicate()
Duplicate the command object.
void removeCommandObject(in sbIPlaylistCommands aCommandObject)
Removes a child command object from this sbIPlaylistCommands object.
The interface for giving context to a playlistcommands object.
Interface that defines a single item of media in the system.
void onCommandChanged(in sbIPlaylistCommands aCommandObject)
Callback method when a Command Object is modified.
sbIPlaylistCommands request(in AString aContextGUID)
Request a copy of a published sbIPlaylistCommands interface.
AString getCommandShortcutKey(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the shortcut key of the requested command element index.
PRBool getCommandFlag(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the value of the flag for the requested command element index.
PRInt32 getCommandFlex(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the flex value for the requested command element index.
AString getCommandShortcutKeycode(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the shortcut keycode of the requested command element index.
AString getCommandValue(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the value of the requested command element index.
AString getCommandId(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the id string for the requested command element index.
The service used to register, unregister, and list playlist commands for a particular playlist guid o...
sbIPlaylistCommands getPlaylistCommandsMediaItem(in AString aContextGUID, in AString aPlaylistType)
Retrieve the root sbIPlaylistCommands object registered to a specific medialist guid or type...
AString getCommandType(in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
Return the type of the requested command element index.
void refreshCustomCommand(in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMNode aCustomCommandElement)
Refresh the custom element associated with the requested command.
attribute sbIPlaylistCommands parentCommandObject
The parent sbIPlaylistCommands of this object. The parentCommandObject is set by sbIPlaylistCommands...