sbILibraryManager.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
33 #include "nsISupports.idl"
34 
35 interface nsIRDFDataSource;
36 interface nsISimpleEnumerator;
37 interface sbILibrary;
38 interface sbILibraryFactory;
40 
46 [scriptable, uuid(c299b8fc-7aab-4247-a2f8-0ef88b06958f)]
48 {
52  readonly attribute sbILibrary mainLibrary;
53 
58  readonly attribute nsIRDFDataSource dataSource;
59 
65  sbILibrary getLibrary(in AString aGuid);
66 
71 
76 
84  void registerLibrary(in sbILibrary aLibrary,
85  in boolean aLoadAtStartup);
86 
91  void unregisterLibrary(in sbILibrary aLibrary);
92 
96  void setLibraryLoadsAtStartup(in sbILibrary aLibrary,
97  in boolean aLoadAtStartup);
98 
102  boolean getLibraryLoadsAtStartup(in sbILibrary aLibrary);
103 
107  boolean hasLibrary(in sbILibrary aLibrary);
108 
112  void addListener(in sbILibraryManagerListener aListener);
113 
117  void removeListener(in sbILibraryManagerListener aListener);
118 };
119 
120 %{C++
121 
122 // The Library Manager will use this topic to notify interested components that
123 // its startup libraries have all been registered.
124 #define SB_LIBRARY_MANAGER_READY_TOPIC "songbird-library-manager-ready"
125 
126 // This notification is sent when shutdown has begun but before the individual
127 // libraries are notified of shutdown
128 #define SB_LIBRARY_MANAGER_BEFORE_SHUTDOWN_TOPIC "songbird-library-manager-before-shutdown"
129 
130 // This notification is sent when shutdown has begun and notifies individual
131 // libraries to immediately shutdown
132 #define SB_LIBRARY_MANAGER_SHUTDOWN_TOPIC "songbird-library-manager-shutdown"
133 
134 // This notification is sent when shutdown has begun and after the individual
135 // libraries are notified of shutdown
136 #define SB_LIBRARY_MANAGER_AFTER_SHUTDOWN_TOPIC "songbird-library-manager-after-shutdown"
137 
138 %}
Manages the lifecycle of libraries in the system.
void addListener(in sbILibraryManagerListener aListener)
Adds a listener.
readonly attribute nsIRDFDataSource dataSource
RDF datasource that exposes the currently active libraries and library factories. ...
void setLibraryLoadsAtStartup(in sbILibrary aLibrary, in boolean aLoadAtStartup)
Configures a library to run at startup.
Factory for new library instances.
readonly attribute sbILibrary mainLibrary
Returns the main library.
nsISimpleEnumerator getLibraries()
Returns a simple enumerator to enumerate all registered libraries.
var uuid
function C(H)
Manages the lifecycle of libraries in the system.
boolean hasLibrary(in sbILibrary aLibrary)
Returns whether or not a library has been registered.
Media library abstraction.
Definition: sbILibrary.idl:82
void removeListener(in sbILibraryManagerListener aListener)
Removes a listener.
nsISimpleEnumerator getStartupLibraries()
Returns a simple enumerator to enumerate all startup libraries.
void registerLibrary(in sbILibrary aLibrary, in boolean aLoadAtStartup)
Runtime registration of a library.
sbILibrary getLibrary(in AString aGuid)
Get a library by its guid.
void unregisterLibrary(in sbILibrary aLibrary)
Runtime removal of a library.
boolean getLibraryLoadsAtStartup(in sbILibrary aLibrary)
Returns whether or not a library loads at startup.