00001 /* vim: ts=2 sw=2 expandtab 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 sbIServicePaneNode; 00035 interface sbILibrary; 00036 interface sbILibraryResource; 00037 00042 [scriptable, uuid(15928572-66fc-4eb8-a430-a5bac5bf350e)] 00043 interface sbILibraryServicePaneService : nsISupports { 00044 00045 /* \brief Suggest a library for creating a new media list 00046 * 00047 * \param aMediaListType string identifying a media list type, eg "simple" 00048 * \param aNode A service pane node to provide context for new list creation 00049 * \return a library, or null if this service can't suggest anything based on 00050 * the given context and type. 00051 */ 00052 sbILibrary suggestLibraryForNewList (in AString aMediaListType, 00053 in sbIServicePaneNode aNode); 00054 00055 /* \brief Attempts to create a service pane node for a given library. 00056 * 00057 * The node is created hidden. After you have parented or positioned your 00058 * node appropriately, show it by changing the hidden attribute to false 00059 * (node.hidden = false). 00060 * 00061 * \param aLibrary an sbILibrary. 00062 * \return a service pane node that represents the given library, null 00063 * if aLibrary is not an sbILibrary. 00064 */ 00065 sbIServicePaneNode createNodeForLibrary (in sbILibrary aLibrary); 00066 00067 /* \brief Attempt to get a service pane node for the given library resource 00068 * 00069 * \param aResource an sbIMediaItem, sbIMediaItem, or sbILibrary 00070 * \return a service pane node that represents the given resource, if one exists 00071 */ 00072 sbIServicePaneNode getNodeForLibraryResource (in sbILibraryResource aResource); 00073 00074 00075 /* \brief Attempt to get a library resource for the given service pane node. 00076 * 00077 * Note that there is no guarantee that hidden service pane nodes 00078 * will have corresponding library resources 00079 * 00080 * \param aNode 00081 * \return a sbIMediaItem, sbIMediaItem, sbILibrary, or null 00082 */ 00083 sbILibraryResource getLibraryResourceForNode (in sbIServicePaneNode aNode); 00084 00085 /* \brief Set node read-only property. 00086 * 00087 * \param aNode Node to set. 00088 * \param aReadOnly If true, node is read-only. 00089 */ 00090 void setNodeReadOnly(in sbIServicePaneNode aNode, 00091 in boolean aReadOnly); 00092 };