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 00032 #include "nsISupports.idl" 00033 00034 interface sbIRemotePlayer; 00035 00036 /* 00037 Class: Commands 00038 The Commands Object allows remote web pages to add and remove commands. 00039 00040 The Commands Object is associated with a <MediaList>. This means that 00041 when <Commands> are modified, the modifications are scoped to the media list. 00042 */ 00050 [scriptable, uuid(cff760df-5fe0-4657-8eb5-1d5d3ca12369)] 00051 interface sbIRemoteCommands : nsISupports 00052 { 00053 /* 00054 Group: Command Methods 00055 */ 00056 00057 /* 00058 Method: addCommand 00059 Add a command. 00060 00061 Arguments: 00062 type - The type of the command. This can be any one of 00063 "action", "separator", "value", or "submenu". 00064 id - The id of the command. 00065 name - The name of the command. 00066 tooltip - The tooltip for the command. 00067 */ 00068 void addCommand(in AString aType, in AString aID, in AString aName, in AString aTooltip); 00069 00070 /* 00071 Method: removeCommand 00072 Remove a command. 00073 00074 Arguments: 00075 id - The id of the command. 00076 00077 See Also: 00078 <addCommand> 00079 */ 00080 void removeCommand(in AString aID); 00081 00082 // Ew. this is so ugly. I'm hoping to be able to clean this up with nsIXPCScriptable 00083 void setCommandData( in unsigned long aNumCommands, 00084 [const, array, size_is(aNumCommands)] in wstring aTypeArray, 00085 [const, array, size_is(aNumCommands)] in wstring aIDArray, 00086 [const, array, size_is(aNumCommands)] in wstring aNameArray, 00087 [const, array, size_is(aNumCommands)] in wstring aTooltipArray); 00088 00089 // the remotePlayer sets this after it creates it. 00090 [noscript] attribute sbIRemotePlayer owner; 00091 }; 00092