sbIPlaylistReader.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 
34 #include "nsISupports.idl"
35 #include "nsIWebProgressListener.idl"
36 
37 interface nsIObserver;
38 interface nsIFile;
39 interface sbIMediaList;
40 interface sbIPlaylistFormatType;
41 
48 [scriptable, uuid(a1fd4697-6459-473f-a660-1915f91cd469)]
49 interface sbIPlaylistReaderListener : nsIWebProgressListener
50 {
56  attribute nsIURI originalURI;
57 
63  attribute nsIURI destinationURI;
64 
71 
77  attribute boolean addDistinctOnly;
78 
84  attribute boolean playWhenLoaded;
85 
90  attribute nsIObserver observer;
91 
95  attribute boolean mediaMimetypesOnly;
96 
100  attribute AString state;
101 };
102 
109 [scriptable, uuid(be2cd0d9-eed3-47f4-8a6e-c1e5b2bf508a)]
111 {
117  attribute nsIURI originalURI;
118 
124  void read(in nsIFile aFile,
125  in sbIMediaList aMediaList,
126  in PRBool aReplace,
127  [optional] in sbIPlaylistFormatType aPlaylistFormatType);
128 
134  long vote(in AString aURL);
135 
141  AString name();
142 
148  AString description();
149 
155  void supportedMIMETypes(out unsigned long aMIMECount,
156  [array, size_is (aMIMECount), retval] out wstring aMIMETypes);
157 
163  void supportedFileExtensions(out unsigned long aExtCount,
164  [array, size_is (aExtCount), retval] out wstring aExts);
165 };
166 
174 [scriptable, uuid(dee1ccec-b3d1-47cf-bbf0-c20222f84398)]
176 {
182  attribute nsIURI originalURI;
183 
189  long loadPlaylist(in nsIURI aURL,
190  in sbIMediaList aMediaList,
191  in AString aContentType,
192  in boolean aAddDistinctOnly,
193  in sbIPlaylistReaderListener aPlaylistReaderListener);
194 
200  void read(in nsIFile aFile,
201  in sbIMediaList aMediaList,
202  in AString aContentType,
203  in PRBool aAddDistinctOnly,
204  [optional] in sbIPlaylistFormatType aPlaylistFormatType);
205 
211  void supportedMIMETypes(out PRUint32 aMIMECount,
212  [array, size_is (aMIMECount), retval] out wstring aMIMETypes);
213 
219  void supportedFileExtensions(out PRUint32 aExtCount,
220  [array, size_is (aExtCount), retval] out wstring aExts);
221 };
222 
223 
long vote(in AString aURL)
void read(in nsIFile aFile, in sbIMediaList aMediaList, in PRBool aReplace, [optional] in sbIPlaylistFormatType aPlaylistFormatType)
inArray array
An interface to be used to read playlists. It will try to find the proper sbIPlaylistReader subclass ...
attribute AString state
expose the state of the web downloading (currently only set to "" or STATE_STOP)
var uuid
A brief description of the contents of this interface.
attribute boolean addDistinctOnly
void supportedMIMETypes(out unsigned long aMIMECount, [array, size_is(aMIMECount), retval] out wstring aMIMETypes)
attribute sbIMediaList mediaList
AString description()
long loadPlaylist(in nsIURI aURL, in sbIMediaList aMediaList, in AString aContentType, in boolean aAddDistinctOnly, in sbIPlaylistReaderListener aPlaylistReaderListener)
A listener interface for use with sbIPlaylistReader interfaces.
attribute boolean mediaMimetypesOnly
Only create playlists for media mime-types ( audio* or video* ), not text/html.
void read(in nsIFile aFile, in sbIMediaList aMediaList, in AString aContentType, in PRBool aAddDistinctOnly, [optional] in sbIPlaylistFormatType aPlaylistFormatType)
A subclass from which one may derive instances to read specific playlist types.
void supportedFileExtensions(out unsigned long aExtCount, [array, size_is(aExtCount), retval] out wstring aExts)
attribute nsIURI originalURI
void supportedMIMETypes(out PRUint32 aMIMECount, [array, size_is(aMIMECount), retval] out wstring aMIMETypes)
void supportedFileExtensions(out PRUint32 aExtCount, [array, size_is(aExtCount), retval] out wstring aExts)
attribute boolean playWhenLoaded
Automatically start playing when stream is done loading.
attribute nsIObserver observer
Observer to get notified about the failure or success of creating a playlist.