sbIAlbumArtService Interface Reference

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

import"sbIAlbumArtService.idl";

Inheritance diagram for sbIAlbumArtService:
[legend]
Collaboration diagram for sbIAlbumArtService:
[legend]

Public Member Functions

nsIArray getFetcherList (in unsigned long type, [optional] in boolean includeDisabled)
 
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. More...
 
nsIURI 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. More...
 
void cacheTemporaryData (in AString aKey, in nsISupports aData)
 Add arbitrary data to a temporary cache. More...
 
nsISupports retrieveTemporaryData (in AString aKey)
 Get data previously placed into the temporary cache. More...
 

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

nsIURI 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
aMimeTypeMIME type of image data.
aDataAlbum art image data.
aDataLenLength 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
aKeyHash key
aDataArbitrary data to store.
nsIArray sbIAlbumArtService::getFetcherList ( in unsigned long  type,
[optional] in boolean  includeDisabled 
)

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
typesbIAlbumArtFetcherSet.TYPE_LOCAL, etc.
includeDisabledIncludes fetchers that are disabled. (defaults to false)
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
aMimeTypeMIME type of image data.
aDataAlbum art image data.
aDataLenLength in bytes of image data.
Returns
True if image is valid album art.
nsISupports sbIAlbumArtService::retrieveTemporaryData ( in AString  aKey)

Get data previously placed into the temporary cache.

Parameters
aKeyHash key
Returns
Arbitrary data
Exceptions
NS_ERROR_NOT_AVAILABLEif the key is not found

The documentation for this interface was generated from the following file: