00001 /* 00002 // 00003 // BEGIN SONGBIRD GPL 00004 // 00005 // This file is part of the Songbird web player. 00006 // 00007 // Copyright(c) 2005-2008 POTI, Inc. 00008 // http://songbirdnest.com 00009 // 00010 // This file may be licensed under the terms of of the 00011 // GNU General Public License Version 2 (the "GPL"). 00012 // 00013 // Software distributed under the License is distributed 00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 00015 // express or implied. See the GPL for the specific language 00016 // governing rights and limitations. 00017 // 00018 // You should have received a copy of the GPL along with this 00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html 00020 // or write to the Free Software Foundation, Inc., 00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 // 00023 // END SONGBIRD GPL 00024 // 00025 */ 00026 00027 #include "nsISupports.idl" 00028 00029 interface sbIMediaItem; 00030 00031 /* 00032 Event: MediaItemStatusEvent 00033 00034 A <MediaItemStatusEvent> is passed to any event handlers listening for 00035 media item status related events fired on the document object. 00036 00037 Note that the <Songbird> object must be accessed before any events will be 00038 raised. This will likely change in the future. 00039 00040 Example: 00041 (start code) 00042 function onDownloadComplete( aEvent ) { 00043 // we can get the downloaded media item 00044 alert(aEvent.item.guid); 00045 00046 // as well as the download status 00047 alert(aEvent.status); 00048 } 00049 00050 // initialize the event system 00051 songbird; 00052 00053 // attach the event handler 00054 document.addEventListener("downloadcomplete", onDownloadComplete, false); 00055 (end code) 00056 00057 See Also: 00058 <MediaItem> 00059 <http://developer.mozilla.org/en/docs/DOM:event> 00060 <http://developer.mozilla.org/en/docs/DOM:element.addEventListener> 00061 */ 00062 00068 [scriptable, uuid(0140514d-50d5-4f0b-8445-c1f18846ca3a)] 00069 interface sbIMediaItemStatusEvent : nsISupports 00070 { 00071 /* 00072 Prop: item 00073 00074 The <MediaItem> corresponding to the event. 00075 00076 Type: <MediaItem> 00077 */ 00078 readonly attribute sbIMediaItem item; 00079 00080 /* 00081 Prop: status 00082 00083 The status of the event as an nsresult value. A status of NS_OK indicates 00084 success. 00085 00086 Type: <long> 00087 */ 00088 readonly attribute long status; 00089 };