sbIMediaItemStatusEvent.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 
27 #include "nsISupports.idl"
28 
29 interface sbIMediaItem;
30 
31 /*
32 Event: MediaItemStatusEvent
33 
34 A <MediaItemStatusEvent> is passed to any event handlers listening for
35 media item status related events fired on the document object.
36 
37 Note that the <Songbird> object must be accessed before any events will be
38 raised. This will likely change in the future.
39 
40 Example:
41  (start code)
42  function onDownloadComplete( aEvent ) {
43  // we can get the downloaded media item
44  alert(aEvent.item.guid);
45 
46  // as well as the download status
47  alert(aEvent.status);
48  }
49 
50  // initialize the event system
51  songbird;
52 
53  // attach the event handler
54  document.addEventListener("downloadcomplete", onDownloadComplete, false);
55  (end code)
56 
57  See Also:
58  <MediaItem>
59  <http://developer.mozilla.org/en/docs/DOM:event>
60  <http://developer.mozilla.org/en/docs/DOM:element.addEventListener>
61 */
62 
68 [scriptable, uuid(0140514d-50d5-4f0b-8445-c1f18846ca3a)]
70 {
71  /*
72  Prop: item
73 
74  The <MediaItem> corresponding to the event.
75 
76  Type: <MediaItem>
77  */
78  readonly attribute sbIMediaItem item;
79 
80  /*
81  Prop: status
82 
83  The status of the event as an nsresult value. A status of NS_OK indicates
84  success.
85 
86  Type: <long>
87  */
88  readonly attribute long status;
89 };
readonly attribute long status
var uuid
function d(s)
Interface that defines a single item of media in the system.
an interface to maintain information about the last event that occurred
readonly attribute sbIMediaItem item