Songbird / Development / Songbird Add-Ons API Documentation

sbIAlbumArtService Interface Reference

Interface for the album art service. Instantiate as a component service. More...

import "sbIAlbumArtService.idl";

List of all members.

Public Member Functions

nsIArray getFetcherList (in unsigned long type)
boolean imageIsValidAlbumArt (in AUTF8String aMimeType,[const, array, size_is(aDataLen)] in octet aData, in unsigned long aDataLen)
 Determine whether the image specified by aData and aDataLen of type specified by aMimeType is a valid album art image. Return true if so.
nsIFileURL cacheImage (in AUTF8String aMimeType,[const, array, size_is(aDataLen)] in octet aData, in unsigned long aDataLen)
 Write the album art image specified by aData and aDataLen of type specified by aMimeType to a cache file and return the cache file URL.
void cacheTemporaryData (in AString aKey, in nsISupports aData)
 Add arbitrary data to a temporary cache.
nsISupports retrieveTemporaryData (in AString aKey)
 Get data previously placed into the temporary cache.


Detailed Description

Interface for the album art service. Instantiate as a component service.

"@songbirdnest.com/Songbird/album-art-service;1"

Definition at line 51 of file sbIAlbumArtService.idl.


Member Function Documentation

nsIArray sbIAlbumArtService::getFetcherList ( in unsigned long  type  ) 

Return a list of album art fetcher contract ID's as an array of nsIVariant ACStrings. Use type to specify if local, remote, or all fetchers.

Parameters:
type sbIAlbumArtFetcherSet.TYPE_LOCAL, etc.
Returns:
List of album art fetcher contract ID's.

boolean sbIAlbumArtService::imageIsValidAlbumArt ( in AUTF8String  aMimeType,
[const, array, size_is(aDataLen)] in octet  aData,
in unsigned long  aDataLen 
)

Determine whether the image specified by aData and aDataLen of type specified by aMimeType is a valid album art image. Return true if so.

Parameters:
aMimeType MIME type of image data.
aData Album art image data.
aDataLen Length in bytes of image data.
Returns:
True if image is valid album art.

nsIFileURL sbIAlbumArtService::cacheImage ( in AUTF8String  aMimeType,
[const, array, size_is(aDataLen)] in octet  aData,
in unsigned long  aDataLen 
)

Write the album art image specified by aData and aDataLen of type specified by aMimeType to a cache file and return the cache file URL.

Parameters:
aMimeType MIME type of image data.
aData Album art image data.
aDataLen Length in bytes of image data.
Returns:
Album art image cache file URL.

void sbIAlbumArtService::cacheTemporaryData ( in AString  aKey,
in nsISupports  aData 
)

Add arbitrary data to a temporary cache.

Used by art fetchers to cache intermediate results for a short period of time. Allows fetchers to avoid additional work without keeping their own static cache.

Note: The contents of this cache is flushed periodically

Parameters:
aKey Hash key
aData Arbitrary data to store.

nsISupports sbIAlbumArtService::retrieveTemporaryData ( in AString  aKey  ) 

Get data previously placed into the temporary cache.

Parameters:
aKey Hash key
Returns:
Arbitrary data
Exceptions:
NS_ERROR_NOT_AVAILABLE if the key is not found


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:28:56 2009 for Songbird by  doxygen 1.5.2