sbIMediaItem.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 
31 #include "sbILibraryResource.idl"
32 
33 interface nsIObserver;
34 interface nsIURI;
35 interface nsIChannel;
36 interface nsIStreamListener;
37 interface nsIInputStream;
38 interface nsIOutputStream;
39 interface sbILibrary;
40 interface sbIMediaItemController;
41 
52 [scriptable, uuid(64aa9b34-00e0-480e-b919-2322496175cb)]
54 {
55  /*
56  Group: MediaItem Properties
57  */
58 
62  readonly attribute sbILibrary library;
63 
64  /*
65  * \brief The library that this media item is linked from. This is to aid
66  * in support of foreign media items
67  readonly attribute sbILibrary originLibrary;
68  */
69 
73  readonly attribute boolean isMutable;
74 
80 
81 // Convenience Attributes (these should thunk directly to the sbILibraryResource::G/SetProperty calls)
82 
90  /*
91  Prop: mediaCreated
92 
93  A timestamp representing the date and time at which this <MediaItem> was created.
94 
95  Type:
96  Number
97  */
98  attribute long long mediaCreated;
99 
107  /*
108  Prop: mediaUpdated
109 
110  A timestamp representing the date and time at which this <MediaItem> was last updated.
111 
112  Type:
113  Number
114  */
115  attribute long long mediaUpdated;
116 
121  /*
122  Prop: contentSrc
123 
124  The URI representing the location of the <MediaItem>. If the URI is a URL, it
125  may be QI'ed to an nsIURL.
126 
127  Type:
128  Number, in bytes.
129  */
130  attribute nsIURI contentSrc;
131 
136  /*
137  Prop: contentLength
138 
139  The size (in bytes) of the content of the <MediaItem>. If this <MediaItem>
140  is also a <MediaList>, the contentLength will always be 0.
141 
142  The contentLength may not be available for streams
143 
144  Type:
145  Number, in bytes.
146  */
147  attribute long long contentLength;
148 
154  /*
155  Prop: contentType
156 
157  The content type, also called mime type, of the <MediaItem>.
158 
159  Type:
160  String
161 
162  Note:
163  This property is never filled currently.
164  */
165  attribute AString contentType;
166 
171  void testIsURIAvailable(in nsIObserver aObserver);
172 
182  nsIChannel openInputStreamAsync(in nsIStreamListener aListener, in nsISupports aContext);
183 
188  nsIInputStream openInputStream();
189 
194  nsIOutputStream openOutputStream();
195 
200  AString toString();
201 };
202 
207 [scriptable, uuid(691f4342-4dcb-471f-a0f4-c4ac94cbd805)]
209 {
210  readonly attribute unsigned long index;
211  readonly attribute sbIMediaItem mediaItem;
212 };
213 
readonly attribute sbIMediaItem mediaItem
attribute AString contentType
Content type of the content of the media item, typically a mime type (should this be renamed...
readonly attribute unsigned long index
readonly attribute sbILibrary library
The library that this media item is contained in.
nsIOutputStream openOutputStream()
Get an output stream to the content of the media item.
var uuid
Definition of the sbILibraryResource interface.
attribute long long contentLength
Size (in bytes) of the content of the media item.
attribute long long mediaUpdated
Last modification time of the media item as a unix timestamp.
readonly attribute sbIMediaItemController itemController
An interface to the media item controller (if any) that determines this item's availability for playb...
nsIChannel openInputStreamAsync(in nsIStreamListener aListener, in nsISupports aContext)
Asynchronously get an input stream to the content of the media item.
const nsIChannel
General interface to data resources.
A container for a media item and its index.
Media library abstraction.
Definition: sbILibrary.idl:82
attribute long long mediaCreated
Creation time of the media item as a unix timestamp.
void testIsURIAvailable(in nsIObserver aObserver)
Test if this media item is available for playback.
AString toString()
Get a string representation of the media item, useful for debugging.
Interface that defines a single item of media in the system.
readonly attribute boolean isMutable
Can the media item be changed?
Interface that defines a mediaitem controller.
nsIInputStream openInputStream()
Synchronously get an input stream to the content of the media item.
attribute nsIURI contentSrc
A nsIURI that resolves to the content of the media item.