sbILibraryServicePaneService.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 
30 #include "nsISupports.idl"
31 
32 interface nsIArray;
33 interface sbIServicePaneNode;
34 interface sbILibrary;
35 interface sbILibraryResource;
36 interface sbIMediaListView;
37 
42 [scriptable, uuid(01b1d300-82ca-11df-8395-0800200c9a66)]
44 
45  /* \brief Suggest a library for creating a new media list
46  *
47  * \param aMediaListType string identifying a media list type, eg "simple"
48  * \param aNode A service pane node to provide context for new list creation
49  * \return a library, or null if this service can't suggest anything based on
50  * the given context and type.
51  */
52  sbILibrary suggestLibraryForNewList (in AString aMediaListType,
53  in sbIServicePaneNode aNode);
54 
55  /* \brief Suggest a unique name for creating a new playlist
56  *
57  * \param aLibrary an sbILibrary.
58  * \return a unique playlist name.
59  */
60  AString suggestNameForNewPlaylist (in sbILibrary aLibrary);
61 
62  /* \brief Attempts to create a service pane node for a given library.
63  *
64  * The node is created hidden. After you have parented or positioned your
65  * node appropriately, show it by changing the hidden attribute to false
66  * (node.hidden = false).
67  *
68  * The result is a service pane folder node, containing video, music, etc.
69  * sub-nodes. You may wish to hide irrelevant nodes before showing the parent
70  * node.
71  *
72  * \param aLibrary an sbILibrary.
73  * \return a service pane node that represents the given library, null
74  * if aLibrary is not an sbILibrary.
75  */
77 
78  /* \brief Attempt to get a service pane node for the given library resource
79  *
80  * \param aResource an sbIMediaItem, sbIMediaItem, or sbILibrary
81  * \param [optional] aType resource media type: "audio", "video", etc.
82  * \return a service pane node that represents the given resource, if one
83  * exists. Note that in the case that more than one node related to a
84  * given library exists, it is not specified which node will be
85  * returned. However, nodes that are not hidden will be preferred.
86  */
88  [optional] in AString aType);
89 
99  nsIArray getNodesForLibraryResource(in sbILibraryResource aResource);
100 
109 
119  AString getNodeContentTypeFromMediaListView (in sbIMediaListView aMediaListView);
120 
121  /* \brief Attempt to get a library resource for the given service pane node.
122  *
123  * Note that there is no guarantee that hidden service pane nodes
124  * will have corresponding library resources
125  *
126  * \param aNode
127  * \return a sbIMediaItem, sbIMediaItem, sbILibrary, or null
128  */
130 
131  /* \brief Set node read-only property.
132  *
133  * \param aNode Node to set.
134  * \param aReadOnly If true, node is read-only.
135  */
136  void setNodeReadOnly (in sbIServicePaneNode aNode,
137  in boolean aReadOnly);
138 };
void setNodeReadOnly(in sbIServicePaneNode aNode, in boolean aReadOnly)
sbILibraryResource getLibraryResourceForNode(in sbIServicePaneNode aNode)
Provides information about libraries and medialists needed by the service pane.
sbIServicePaneNode getNodeForLibraryResource(in sbILibraryResource aResource, [optional] in AString aType)
AString getNodeContentTypeFromMediaListView(in sbIMediaListView aMediaListView)
Attempt to get the content type of service pane node for the given media list view.
nsIArray getNodesForLibraryResource(in sbILibraryResource aResource)
Return all service pane nodes related to the library resource specified by aResource.
var uuid
A distinct view on a given media list.
sbILibrary suggestLibraryForNewList(in AString aMediaListType, in sbIServicePaneNode aNode)
sbIServicePaneNode createNodeForLibrary(in sbILibrary aLibrary)
General interface to data resources.
Media library abstraction.
Definition: sbILibrary.idl:82
AString suggestNameForNewPlaylist(in sbILibrary aLibrary)
sbIServicePaneNode getNodeFromMediaListView(in sbIMediaListView aMediaListView)
Attempt to get a service pane node for the given media list view.
The interface to interact with a particular node in the service pane.