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 00033 #include "sbILibraryResource.idl" 00034 00035 interface nsIObserver; 00036 interface nsIURI; 00037 interface nsIChannel; 00038 interface nsIStreamListener; 00039 interface nsIInputStream; 00040 interface nsIOutputStream; 00041 interface sbILibrary; 00042 00053 [scriptable, uuid(1c1c9f2a-75c0-4741-aac1-3254b08287ae)] 00054 interface sbIMediaItem : sbILibraryResource 00055 { 00056 /* 00057 Group: MediaItem Properties 00058 */ 00059 00063 readonly attribute sbILibrary library; 00064 00065 /* 00066 * \brief The library that this media item is linked from. This is to aid 00067 * in support of foreign media items 00068 readonly attribute sbILibrary originLibrary; 00069 */ 00070 00074 readonly attribute boolean isMutable; 00075 00076 00077 // Convenience Attributes (these should thunk directly to the sbILibraryResource::G/SetProperty calls) 00078 00086 /* 00087 Prop: mediaCreated 00088 00089 A timestamp representing the date and time at which this <MediaItem> was created. 00090 00091 Type: 00092 Number 00093 */ 00094 attribute long long mediaCreated; 00095 00103 /* 00104 Prop: mediaUpdated 00105 00106 A timestamp representing the date and time at which this <MediaItem> was last updated. 00107 00108 Type: 00109 Number 00110 */ 00111 attribute long long mediaUpdated; 00112 00117 /* 00118 Prop: contentSrc 00119 00120 The URI representing the location of the <MediaItem>. If the URI is a URL, it 00121 may be QI'ed to an nsIURL. 00122 00123 Type: 00124 Number, in bytes. 00125 */ 00126 attribute nsIURI contentSrc; 00127 00132 /* 00133 Prop: contentLength 00134 00135 The size (in bytes) of the content of the <MediaItem>. If this <MediaItem> 00136 is also a <MediaList>, the contentLength will always be 0. 00137 00138 The contentLength may not be available for streams 00139 00140 Type: 00141 Number, in bytes. 00142 */ 00143 attribute long long contentLength; 00144 00150 /* 00151 Prop: contentType 00152 00153 The content type, also called mime type, of the <MediaItem>. 00154 00155 Type: 00156 String 00157 00158 Note: 00159 This property is never filled currently. 00160 */ 00161 attribute AString contentType; 00162 00167 void testIsAvailable(in nsIObserver aObserver); 00168 00178 nsIChannel openInputStreamAsync(in nsIStreamListener aListener, in nsISupports aContext); 00179 00184 nsIInputStream openInputStream(); 00185 00190 nsIOutputStream openOutputStream(); 00191 00196 AString toString(); 00197 }; 00198 00203 [scriptable, uuid(691f4342-4dcb-471f-a0f4-c4ac94cbd805)] 00204 interface sbIIndexedMediaItem : nsISupports 00205 { 00206 readonly attribute unsigned long index; 00207 readonly attribute sbIMediaItem mediaItem; 00208 }; 00209