Songbird / Development / Songbird Add-Ons API Documentation

components/playlistcommands/public/sbIPlaylistCommands.idl

00001 /*
00002 //
00003 // BEGIN SONGBIRD GPL
00004 // 
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright(c) 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 // 
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 // 
00013 // Software distributed under the License is distributed 
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
00015 // express or implied. See the GPL for the specific language 
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this 
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc., 
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 // 
00023 // END SONGBIRD GPL
00024 //
00025  */
00026 
00027 #include "nsISupports.idl"
00028 
00029 interface nsIDOMDocument;
00030 interface nsIDOMNode;
00031 interface nsIDOMWindow;
00032 interface sbIPlaylistCommandsContext;
00033 interface sbIMediaItem;
00034 interface nsISimpleEnumerator;
00035 
00061 [scriptable, uuid(412e298d-957d-4f35-8528-ce053cf62807)]
00062 interface sbIPlaylistCommands : nsISupports 
00063 {
00073   PRBool getVisible( in AString aHost );
00074   
00085   void setContext( in sbIPlaylistCommandsContext aContext );
00086 
00099   PRInt32 getNumCommands( in AString aSubMenu, in AString aHost );
00100 
00112   AString getCommandType( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00113 
00129   AString getCommandId( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00130 
00143   AString getCommandText( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00144 
00157   PRInt32 getCommandFlex( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00158 
00172   AString getCommandToolTipText(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00173 
00186   PRBool getCommandEnabled(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00187 
00196   PRBool getCommandVisible(in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00197 
00208   PRBool getCommandFlag( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00209 
00220   AString getCommandValue( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00221 
00232   AString getCommandChoiceItem( in AString aChoiceMenu, in AString aHost );
00233 
00242   AString getCommandShortcutModifiers( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00243 
00252   AString getCommandShortcutKey( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00253 
00262   AString getCommandShortcutKeycode( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00263 
00272   PRBool getCommandShortcutLocal( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00273 
00285   sbIPlaylistCommands getCommandSubObject( in AString aSubMenu, in PRInt32 aIndex, in AString aHost );
00286 
00297   nsIDOMNode instantiateCustomCommand( in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMDocument aDocument );
00298 
00308   void refreshCustomCommand( in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMNode aCustomCommandElement );
00309 
00322   void onCommand( in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aId, in AString aValue );
00323 
00365   sbIPlaylistCommands duplicate( );
00366 
00375   void initCommands( in AString aHost );
00376 
00383   void shutdownCommands( );
00384 };
00385 
00390 [scriptable, uuid(f08d76b6-cbe6-4cad-945e-1b1eea10a16c)]
00391 interface sbIPlaylistCommandsContext : nsISupports
00392 {
00396   readonly attribute nsIDOMNode playlist;   
00397 
00401   readonly attribute sbIMediaItem medialist;
00402 
00406   readonly attribute nsIDOMWindow window;   
00407 
00411   readonly attribute sbIPlaylistCommands commands;   
00412 };
00413 
00419 [scriptable, uuid(33e9c67c-7966-4bd4-bb42-ecf2fa31058d)]
00420 interface sbIPlaylistCommandsManager : nsISupports
00421 {
00439   void registerPlaylistCommandsMediaItem( in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj );
00440   
00451   void unregisterPlaylistCommandsMediaItem( in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj );
00452   
00468   nsISimpleEnumerator getPlaylistCommandsMediaItem( in AString aContextGUID, in AString aPlaylistType );
00469 
00486   void registerPlaylistCommandsMediaList( in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj );
00487   
00497   void unregisterPlaylistCommandsMediaList( in AString aContextGUID, in AString aPlaylistType, in sbIPlaylistCommands aCommandObj );
00498   
00514   nsISimpleEnumerator getPlaylistCommandsMediaList( in AString aContextGUID, in AString aPlaylistType );
00515 
00527   void publish( in AString aCommandGUID, in sbIPlaylistCommands aCommandObj );
00528 
00542   void withdraw( in AString aCommandGUID, in sbIPlaylistCommands aCommandObj );
00543 
00553   sbIPlaylistCommands request( in AString aContextGUID );
00554 };
00555  // end of playlistcommands group
00557 
00558 

Generated on Tue Mar 10 14:28:55 2009 for Songbird by  doxygen 1.5.2