sbILibraryImporter.idl
Go to the documentation of this file.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 :miv */
3 /*
4 //
5 // BEGIN SONGBIRD GPL
6 //
7 // This file is part of the Songbird web player.
8 //
9 // Copyright(c) 2005-2008 POTI, Inc.
10 // http://songbirdnest.com
11 //
12 // This file may be licensed under the terms of of the
13 // GNU General Public License Version 2 (the "GPL").
14 //
15 // Software distributed under the License is distributed
16 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
17 // express or implied. See the GPL for the specific language
18 // governing rights and limitations.
19 //
20 // You should have received a copy of the GPL along with this
21 // program. If not, go to http://www.gnu.org/licenses/gpl.html
22 // or write to the Free Software Foundation, Inc.,
23 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 // END SONGBIRD GPL
26 //
27 */
28 
29 /* *****************************************************************************
30  *******************************************************************************
31  *
32  * Interface description for the library importer interface.
33  *
34  *******************************************************************************
35  ******************************************************************************/
36 
37 #include "nsISupports.idl"
38 
39 
47 [scriptable, uuid(D2CC37F4-A5DB-4226-966F-C51A9AE5686F)]
49 {
59  void onLibraryChanged(
60  in AString aLibFilePath,
61  in AString aGUID);
62 
63 
69  void onImportError();
70 
71 
81  void onNonExistentMedia(
82  in unsigned long aNonExistentMediaCount,
83  in unsigned long aTrackCount);
84 
85 
91  void onUnsupportedMedia();
92 
93 
108  AString onDirtyPlaylist(
109  in AString aPlaylistName,
110  out boolean aApplyAll);
111 };
112 
113 
121 interface sbIJobProgress;
122 
123 [scriptable, uuid(04E3F8E9-70F4-4129-9A74-CEC88A8AEE93)]
125 {
126  /*
127  * Attributes.
128  *
129  * libraryType Library type.
130  * libraryReadableType Readable library type.
131  * libraryDefaultFileName Default library file name.
132  * libraryDefaultFilePath Default library file path.
133  * libraryFileExtensionList Comma separated list of library file extensions.
134  * libraryPreviouslyImported
135  * True if a library has previously been imported.
136  * libraryPreviousImportPath
137  * File path of previously imported library.
138  */
139 
140  readonly attribute AString libraryType;
141  readonly attribute AString libraryReadableType;
142  readonly attribute AString libraryDefaultFileName;
143  readonly attribute AString libraryDefaultFilePath;
144  readonly attribute AString libraryFileExtensionList;
145  readonly attribute boolean libraryPreviouslyImported;
146  readonly attribute AString libraryPreviousImportPath;
147 
148 
153  void initialize();
154 
155 
160  void finalize();
161 
162 
174  sbIJobProgress import(
175  in AString aLibFilePath,
176  in AString aGUID,
177  in boolean aCheckForChanges);
178 
179 
186  void setListener(
187  in sbILibraryImporterListener aListener);
188 };
189 
190 
203 [scriptable, uuid(81c027cd-1c4d-42d7-8b70-134cba5175a1)]
205 {
211 };
212 
213 
readonly attribute AString libraryReadableType
readonly attribute AString libraryDefaultFileName
Interface for importing external libraries.
readonly attribute AString libraryFileExtensionList
void onImportError()
Handle library import error events. These events occur whenever an error is encountered while importi...
void initialize()
Initialize the library importer.
void onNonExistentMedia(in unsigned long aNonExistentMediaCount, in unsigned long aTrackCount)
Handle non-existent media events. These events occur whenever the media file for an imported track do...
Generic interface for exposing long running jobs to the UI.
#define F(a)
readonly attribute AString libraryType
var uuid
readonly attribute AString libraryDefaultFilePath
void onLibraryChanged(in AString aLibFilePath, in AString aGUID)
Handle library changed events. These events occur when the contents of the import library change...
void onUnsupportedMedia()
Handle unsupported media events. These events occur whenever an attempt is made to import media that ...
readonly attribute boolean libraryPreviouslyImported
void setListener(in sbILibraryImporterListener aListener)
Set the listener for import events.
void finalize()
Finalize the library importer.
AString onDirtyPlaylist(in AString aPlaylistName, out boolean aApplyAll)
Handle dirty playlist events. These events occur when an imported library playlist has been modified ...
Interface for listening to library importer events.
readonly attribute AString libraryPreviousImportPath
attribute sbILibraryImporter defaultLibraryImporter