Songbird / Development / Songbird Add-Ons API Documentation

components/library/base/public/sbILibraryResource.idl

Go to the documentation of this file.
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 
00032 #include "nsISupports.idl"
00033 
00034 interface nsIStringEnumerator;
00035 interface nsIURI;
00036 interface sbIPropertyArray;
00037 
00047 [scriptable, uuid(d0ed8ac0-1a2a-11dd-bd0b-0800200c9a66)]
00048 interface sbILibraryResource : nsISupports
00049 {
00054   /*
00055   Group: Resource Properties
00056   */
00057 
00058   /*
00059   Prop: guid
00060 
00061   The global unique identifier of this Library object.
00062   
00063   Type:
00064     String
00065 
00066   Note:
00067     <MediaItem>, <MediaList> and <Library> are all Library Objects.
00068   */
00069   readonly attribute AString guid;
00070 
00075   /*
00076   Prop: created
00077 
00078   The creation time of this Library object.
00079 
00080   Type:
00081     Number, in (TODO units???)
00082 
00083   Note:
00084     <MediaItem>, <MediaList> and <Library> are all Library Objects.
00085   */
00086   readonly attribute long long created;
00087 
00092   /*
00093   Prop: updated
00094 
00095   The last update time of this Library object. Changing any property
00096   constitutes an update.
00097 
00098   Type:
00099     Number, in (TODO units???)
00100   
00101   Note:
00102     <MediaItem>, <MediaList> and <Library> are all Library Objects.
00103   */
00104   readonly attribute long long updated;
00105 
00110   readonly attribute nsIStringEnumerator propertyIDs;
00111   
00116   readonly attribute boolean userEditable;
00117 
00129   /*
00130   Group: Resource Methods
00131   */
00132 
00133   /*
00134   Method: getProperty()
00135 
00136   Get the value of a property for this library object.
00137 
00138   Prototype:
00139     String getProperty(String id)
00140 
00141   Parameters:
00142     id - The ID property value requested.
00143 
00144   Example:
00145     (start code)
00146     //This example assumes you already have created 
00147     //a mediaitem and assigned it to mediaItem.
00148 
00149     //Get the albumName property from a mediaitem.
00150     var albumName = mediaItem.getProperty("http://songbirdnest.com/data/1.0#albumName");
00151     (end)
00152 
00153   Standard Properties:
00154     http://songbirdnest.com/data/1.0#albumDetailUrl - A URL with information on the album
00155     http://songbirdnest.com/data/1.0#albumName - The name of the album
00156     http://songbirdnest.com/data/1.0#artistDetailUrl - A URL with information on the artist
00157     http://songbirdnest.com/data/1.0#artistName - The name of the artist
00158     http://songbirdnest.com/data/1.0#bitRate - The bit rate of the media, in bits per second
00159     http://songbirdnest.com/data/1.0#bpm - The number of beats per minute
00160     http://songbirdnest.com/data/1.0#columnSpec - Column display data
00161     http://songbirdnest.com/data/1.0#composerName - The name of the composer
00162     http://songbirdnest.com/data/1.0#copyrightURL - A URL with information on the copyright
00163     http://songbirdnest.com/data/1.0#defaultColumnSpec - Default column display data
00164     http://songbirdnest.com/data/1.0#disableDownload - Prevent this item from being downloaded
00165     http://songbirdnest.com/data/1.0#discNumber - The number of disc this media appears on in a compilation
00166     http://songbirdnest.com/data/1.0#downloadDetails - Download state and progress
00167     http://songbirdnest.com/data/1.0#duration - The duration of this media, in microseconds
00168     http://songbirdnest.com/data/1.0#enableAutoDownload - whether this item should be automatically downloaded when added to the main library
00169     http://songbirdnest.com/data/1.0#excludeFromHistory - This track should not be logged in playback history when played
00170     http://songbirdnest.com/data/1.0#genre - The genre of this media
00171     http://songbirdnest.com/data/1.0#hidden - Whether this item should be hidden from the user
00172     http://songbirdnest.com/data/1.0#isPartOfCompilation - Whether this media is part of a compilation
00173     http://songbirdnest.com/data/1.0#lastPlayTime - The last time the media was played
00174     http://songbirdnest.com/data/1.0#lyricistName - The name of the lyricist
00175     http://songbirdnest.com/data/1.0#lyrics - The lyrics of the media
00176     http://songbirdnest.com/data/1.0#originPage - The page this media was located on
00177     http://songbirdnest.com/data/1.0#originPageTitle - The title of the page this media was located on
00178     http://songbirdnest.com/data/1.0#originURL - The URL this media was retrived from
00179     http://songbirdnest.com/data/1.0#playCount - The number of times this media has been played
00180     http://songbirdnest.com/data/1.0#primaryImageURL - The URL of the primary image
00181     http://songbirdnest.com/data/1.0#producerName - The name of the producer
00182     http://songbirdnest.com/data/1.0#rating - The user-set rating of the item, either 0 (unset) or in the range 1-5
00183     http://songbirdnest.com/data/1.0#recordLabelName - The name of the record label
00184     http://songbirdnest.com/data/1.0#sampleRate - The sample rate of the media, in samples per second
00185     http://songbirdnest.com/data/1.0#skipCount - The number of times this item was skipped
00186     http://songbirdnest.com/data/1.0#totalDiscs - The total number of discs in a compilation
00187     http://songbirdnest.com/data/1.0#totalTracks - The total number of tracks in a compilation
00188     http://songbirdnest.com/data/1.0#trackName - The name of the track
00189     http://songbirdnest.com/data/1.0#trackNumber - The track number of this media in a compilation
00190     http://songbirdnest.com/data/1.0#year - The year the media was released
00191 
00192   Note:
00193     Metadata for the <MediaItems> may get updated and overwritten during playback.
00194     See <Metadata Updates> for more details about cases where metadata may 
00195     get updated.
00196 
00197   See Also:
00198     <setProperty()>
00199   */
00200   AString getProperty(in AString aID);
00201 
00208   /*
00209   Method: setProperty()
00210 
00211   Set the value of a property for this library object.
00212 
00213   Prototype:
00214     setProperty(String id, String value)
00215 
00216   Example:
00217     (start code)
00218     //This example assumes you already have created 
00219     //a mediaitem and assigned it to mediaItem.
00220 
00221     //Set the albumName property from a mediaitem.
00222     mediaItem.setProperty("http://songbirdnest.com/data/1.0#albumName", "Let Us Play");
00223     (end)
00224 
00225   Standard Properties:
00226     http://songbirdnest.com/data/1.0#albumDetailUrl - A URL with information on the album
00227     http://songbirdnest.com/data/1.0#albumName - The name of the album
00228     http://songbirdnest.com/data/1.0#artistDetailUrl - A URL with information on the artist
00229     http://songbirdnest.com/data/1.0#artistName - The name of the artist
00230     http://songbirdnest.com/data/1.0#bitRate - The bit rate of the media, in bits per second
00231     http://songbirdnest.com/data/1.0#bpm - The number of beats per minute
00232     http://songbirdnest.com/data/1.0#columnSpec - Column display data
00233     http://songbirdnest.com/data/1.0#composerName - The name of the composer
00234     http://songbirdnest.com/data/1.0#defaultColumnSpec - Default column display data
00235     http://songbirdnest.com/data/1.0#disableDownload - Prevent this item from being downloaded
00236     http://songbirdnest.com/data/1.0#discNumber - The number of disc this media appears on in a compilation
00237     http://songbirdnest.com/data/1.0#downloadDetails - Download state and progress
00238     http://songbirdnest.com/data/1.0#duration - The duration of this media, in microseconds
00239     http://songbirdnest.com/data/1.0#enableAutoDownload - whether this item should be automatically downloaded when added to the main library
00240     http://songbirdnest.com/data/1.0#excludeFromHistory - This track should not be logged in playback history when played
00241     http://songbirdnest.com/data/1.0#genre - The genre of this media
00242     http://songbirdnest.com/data/1.0#hidden - Whether this item should be hidden from the user
00243     http://songbirdnest.com/data/1.0#isPartOfCompilation - Whether this media is part of a compilation
00244     http://songbirdnest.com/data/1.0#lyricistName - The name of the lyricist
00245     http://songbirdnest.com/data/1.0#lyrics - The lyrics of the media
00246     http://songbirdnest.com/data/1.0#primaryImageURL - The URL of the primary image
00247     http://songbirdnest.com/data/1.0#producerName - The name of the producer
00248     http://songbirdnest.com/data/1.0#rating - The user-set rating of the item, either 0 (unset) or in the range 1-5
00249     http://songbirdnest.com/data/1.0#recordLabelName - The name of the record label
00250     http://songbirdnest.com/data/1.0#sampleRate - The sample rate of the media, in samples per second
00251     http://songbirdnest.com/data/1.0#totalDiscs - The total number of discs in a compilation
00252     http://songbirdnest.com/data/1.0#totalTracks - The total number of tracks in a compilation
00253     http://songbirdnest.com/data/1.0#trackName - The name of the track
00254     http://songbirdnest.com/data/1.0#trackNumber - The track number of this media in a compilation
00255     http://songbirdnest.com/data/1.0#year - The year the media was released
00256 
00257   Note:
00258     Metadata for the <MediaItems> may get updated and overwritten during playback.
00259     See <Metadata Updates> for more details about cases where metadata may 
00260     get updated.
00261 
00262   See Also:
00263     <getProperty()>
00264   */
00265   void setProperty(in AString aID, in AString aValue);
00266 
00275   sbIPropertyArray getProperties([optional] in sbIPropertyArray aPropertyIDs);
00276 
00289   void setProperties(in sbIPropertyArray aProperties);
00290 
00294   boolean equals(in sbILibraryResource aOtherLibraryResource);
00295 };
00296 
00297 

Generated on Tue Mar 10 14:28:55 2009 for Songbird by  doxygen 1.5.2