sbIAlbumArtFetcher.idl
Go to the documentation of this file.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 :miv */
3 /*
4  *=BEGIN SONGBIRD GPL
5  *
6  * This file is part of the Songbird web player.
7  *
8  * Copyright(c) 2005-2010 POTI, Inc.
9  * http://www.songbirdnest.com
10  *
11  * This file may be licensed under the terms of of the
12  * GNU General Public License Version 2 (the ``GPL'').
13  *
14  * Software distributed under the License is distributed
15  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
16  * express or implied. See the GPL for the specific language
17  * governing rights and limitations.
18  *
19  * You should have received a copy of the GPL along with this
20  * program. If not, go to http://www.gnu.org/licenses/gpl.html
21  * or write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23  *
24  *=END SONGBIRD GPL
25  */
26 
27 //------------------------------------------------------------------------------
28 //------------------------------------------------------------------------------
29 //
30 // Interface description for the album art fetcher interface.
31 //
32 //------------------------------------------------------------------------------
33 //------------------------------------------------------------------------------
34 
35 #include "nsISupports.idl"
36 
37 
45 interface nsIArray;
46 interface nsIDOMWindow;
47 interface sbIAlbumArtListener;
48 interface sbIMediaItem;
49 
50 [scriptable, uuid(3792b0e2-1dd2-11b2-bdc8-cf5bc3f7931c)]
52 {
56  readonly attribute AString shortName;
57 
62  readonly attribute AString name;
63 
67  readonly attribute AString description;
68 
72  readonly attribute boolean isLocal;
73 
77  attribute boolean isEnabled;
78 
87  attribute PRInt32 priority;
88 
92  attribute nsIArray albumArtSourceList;
93 
97  readonly attribute boolean isFetching;
98 
106  void fetchAlbumArtForAlbum(in nsIArray aMediaItems,
107  in sbIAlbumArtListener aListener);
108 
109 
115  void fetchAlbumArtForTrack(in sbIMediaItem aMediaItem,
116  in sbIAlbumArtListener aListener);
117 
118  /* \brief shut down the fetcher
119  */
120  void shutdown();
121 };
122 
123 
124 //
125 // C++ defs.
126 //
127 
128 %{C++
129 #define SB_ALBUM_ART_FETCHER_CATEGORY "songbird-album-art-fetcher"
130 
131 #define SB_FILEALBUMARTFETCHER_CONTRACTID \
132  "@songbirdnest.com/Songbird/album-art/file-fetcher;1"
133 
134 #define SB_METADATAALBUMARTFETCHER_CONTRACTID \
135  "@songbirdnest.com/Songbird/album-art/metadata-fetcher;1"
136 %}C++
137 
attribute boolean isEnabled
Flag to indicate if this Fetcher is enabled or not.
void fetchAlbumArtForAlbum(in nsIArray aMediaItems, in sbIAlbumArtListener aListener)
Try to fetch album art for a list of items that belong to the same album. This function infers that a...
readonly attribute AString name
Name of AlbumArtFetcher to display to the user on things like menus.
attribute PRInt32 priority
Priority of this fetcher, a lower number represents a higher priority (so 0 is higher than 10)...
readonly attribute AString shortName
Short name of AlbumArtFetcher.
void fetchAlbumArtForTrack(in sbIMediaItem aMediaItem, in sbIAlbumArtListener aListener)
Try to fetch album art for a single track.
var uuid
function C(H)
const nsIDOMWindow
A component which is interested in the result of an album art fetch request.
readonly attribute boolean isFetching
Flag to indicate if this fetcher is currently fetching.
readonly attribute AString description
Description of the AlbumArtFetcher to display to the user.
readonly attribute boolean isLocal
Flag to indicate if this Fetcher fetches from local sources.
attribute nsIArray albumArtSourceList
List of sources of album art (e.g., sbIMetadataHandler).
Interface that defines a single item of media in the system.
Interface for an album art fetcher. Instantiate as a component instance.