sbIMediacoreEvent.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 
25 #include "nsISupports.idl"
26 
27 interface nsIVariant;
28 
29 interface sbIMediacore;
30 interface sbIMediacoreError;
31 interface sbIMediacoreEventTarget;
32 
37 [scriptable, uuid(c5f679e0-d695-11df-937b-0800200c9a66)]
39 {
40  const unsigned long UNINTIALIZED = 0x00000000;
41 
46  const unsigned long METADATA_CHANGE = 0x00001000;
51  const unsigned long URI_CHANGE = 0x00001001;
56  const unsigned long DURATION_CHANGE = 0x00001002;
61  const unsigned long VOLUME_CHANGE = 0x00001003;
66  const unsigned long MUTE_CHANGE = 0x00001004;
67 
68  // Sequencer Events
69 
75  const unsigned long BEFORE_TRACK_CHANGE = 0x00001500;
81  const unsigned long TRACK_CHANGE = 0x00001501;
87  const unsigned long TRACK_INDEX_CHANGE = 0x00001502;
92  const unsigned long BEFORE_VIEW_CHANGE = 0x00001503;
97  const unsigned long VIEW_CHANGE = 0x00001504;
103  const unsigned long SEQUENCE_CHANGE = 0x00001505;
115  const unsigned long SEQUENCE_END = 0x00001507;
116 
128  const unsigned long EXPLICIT_TRACK_CHANGE = 0x00001508;
129 
130  // End Sequencer Events
131 
136  const unsigned long STREAM_FOUND = 0x00002000;
137 
142  const unsigned long STREAM_HAS_VIDEO = 0x00002001;
143 
148  const unsigned long BUFFERING = 0x00003000;
154  const unsigned long BUFFER_UNDERRUN = 0x00003001;
155 
163  const unsigned long STREAM_BEFORE_START = 0x00004000;
168  const unsigned long STREAM_START = 0x00004001;
180  const unsigned long STREAM_BEFORE_PAUSE = 0x00004002;
185  const unsigned long STREAM_PAUSE = 0x00004003;
190  const unsigned long STREAM_END = 0x00004004;
203  const unsigned long STREAM_BEFORE_STOP = 0x00004005;
208  const unsigned long STREAM_STOP = 0x00004006;
219  const unsigned long EXPLICIT_STOP = 0x00004007;
220 
226  const unsigned long SEEKED = 0x00001005;
227 
228  // Video specific events
229 
235  const unsigned long VIDEO_SIZE_CHANGED = 0x00005000;
236 
237  // End video specifc events
238 
243  const unsigned long PLUGIN_MISSING = 0x00008000;
244 
248  const unsigned long CUSTOM_EVENT_BASE = 0x40000000;
249 
253  const unsigned long ERROR_EVENT = 0x80000000;
254 
258  readonly attribute unsigned long type;
262  readonly attribute sbIMediacoreError error;
263 
267  readonly attribute nsIVariant data;
268 
272  readonly attribute sbIMediacore origin;
276  readonly attribute sbIMediacoreEventTarget target;
277 };
278 
279 %{C++
280 
281 #define SB_MEDIACORE_EVENT_DESCRIPTION \
282  "Songbird Mediacore Event"
283 #define SB_MEDIACORE_EVENT_CONTRACTID \
284  "@songbirdnest.com/Songbird/Mediacore/event;1"
285 #define SB_MEDIACORE_EVENT_CLASSNAME \
286  "sbMediacoreEvent"
287 #define SB_MEDIACORE_EVENT_CID \
288  {0xedf0959d, 0x21bf, 0x411f, {0x8d, 0x3d, 0x85, 0x9a, 0x76, 0xe7, 0x14, 0x12}}
289 
290 %};
const unsigned long CUSTOM_EVENT_BASE
Custom event base value.
const unsigned long STREAM_FOUND
Stream found.
const unsigned long UNINTIALIZED
const unsigned long SEQUENCE_END
Sequence end.
const unsigned long STREAM_HAS_VIDEO
Stream has video.
const unsigned long BEFORE_TRACK_CHANGE
Before the track playing is changed.
const unsigned long TRACK_CHANGE
Track playing has changed.
readonly attribute sbIMediacoreError error
Error member is only set when type of event is set to ERROR.
const unsigned long STREAM_BEFORE_STOP
Stream is about to stop.
const unsigned long ERROR_EVENT
Indicates the event is an error and will have its error member set.
readonly attribute unsigned long type
The event type.
const unsigned long SEQUENCE_CHANGE
Sequence recalculated.
const unsigned long METADATA_CHANGE
Metadata describing current item has changed.
var uuid
const unsigned long EXPLICIT_STOP
Explicit call to stop the playback.
readonly attribute sbIMediacore origin
Mediacore that generated the event.
const unsigned long STREAM_STOP
Stream was stopped.
function C(H)
Definition of the sbIMediacoreEvent interface.
const unsigned long PLUGIN_MISSING
Plugin missing for requested format.
const unsigned long BUFFERING
Buffering.
const unsigned long EXPLICIT_TRACK_CHANGE
Explicit call to next or previous.
const unsigned long STREAM_START
Stream has started.
const unsigned long VIDEO_SIZE_CHANGED
Video size has changed.
const unsigned long TRACK_INDEX_CHANGE
Index in view of item currently playing has changed.
const unsigned long STREAM_BEFORE_START
Stream is about to start.
const unsigned long VIEW_CHANGE
Sequencer view changed.
const unsigned long SEEKED
Playback has progressed in an unusual way.
const unsigned long VOLUME_CHANGE
Volume has changed.
const unsigned long BUFFER_UNDERRUN
Buffer underrun, operation is likely to halt.
const unsigned long STREAM_PAUSE
Stream is now paused.
const unsigned long BEFORE_VIEW_CHANGE
Sequencer view is about to change.
const unsigned long MUTE_CHANGE
Mute status has changed.
const unsigned long STREAM_BEFORE_PAUSE
Stream is about to pause.
const unsigned long DURATION_CHANGE
Current duration has changed.
readonly attribute sbIMediacoreEventTarget target
Event Target that dispatched the event.
const unsigned long URI_CHANGE
URI used for operation has changed.
const unsigned long STREAM_END
End of stream.
readonly attribute nsIVariant data
The event data. Payload varies per event type.