sbITranscodeAlbumArt.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© 2005-2009 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 
32 #include "nsISupports.idl"
33 
34 interface sbIMediaItem;
35 interface nsIArray;
36 interface nsIInputStream;
37 
41 [scriptable, uuid(06ab285d-54c4-4423-8d20-298d3e2db4ac)]
43 {
44  /* Init device album art helper for this item, with this set of image formats
45  * supported on the device.
46  *
47  * \param aItem The media item to work on
48  * \param aSupportedFormats Array of sbIImageFormatType describing the
49  * album art formats that are supported.
50  */
51  void Init(in sbIMediaItem aItem,
52  in nsIArray aSupportedFormats);
53 
54  /* Does the album art on this item need conversion for the device? */
55  readonly attribute boolean needsAlbumArtConversion;
56 
57  /* Convert album art on the item to a supported format */
58  void ConvertArt();
59 
60  /* Get an input stream from which the transcoded art can be read */
61  nsIInputStream GetTranscodedArt();
62 
63  /* Get the target format that will be transcoded to */
64  void GetTargetFormat(out AUTF8String mimeType,
65  out long width,
66  out long height);
67 };
68 
69 %{C++
70 
71 #define SONGBIRD_TRANSCODEALBUMART_CONTRACTID \
72  "@songbirdnest.com/Songbird/Mediacore/TranscodeAlbumArt;1"
73 #define SONGBIRD_TRANSCODEALBUMART_CLASSNAME \
74  "Songbird Album Art Transcoder Interface"
75 #define SONGBIRD_TRANSCODEALBUMART_CID \
76 { /* 1f9e8770-0fa8-4a40-abd0-ba9202216d3e */ \
77  0x1f9e8770, \
78  0x0fa8, \
79  0x4a40, \
80  {0xab, 0xd0, 0xba, 0x92, 0x02, 0x21, 0x6d, 0x3e} \
81 }
82 
83 %}C++
84 
void GetTargetFormat(out AUTF8String mimeType, out long width, out long height)
void Init(in sbIMediaItem aItem, in nsIArray aSupportedFormats)
var uuid
function width(ele) rect(ele).width
nsIInputStream GetTranscodedArt()
function C(H)
_updateDatepicker height
Interface that defines a single item of media in the system.
readonly attribute boolean needsAlbumArtConversion