Interface for the album art service. Instantiate as a component service. More...
import"sbIAlbumArtService.idl";
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... | |
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.
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.
aMimeType | MIME type of image data. |
aData | Album art image data. |
aDataLen | Length in bytes of image data. |
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
aKey | Hash key |
aData | Arbitrary 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.
type | sbIAlbumArtFetcherSet.TYPE_LOCAL, etc. |
includeDisabled | Includes fetchers that are disabled. (defaults to false) |
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.
aMimeType | MIME type of image data. |
aData | Album art image data. |
aDataLen | Length in bytes of image data. |
nsISupports sbIAlbumArtService::retrieveTemporaryData | ( | in AString | aKey | ) |
Get data previously placed into the temporary cache.
aKey | Hash key |
NS_ERROR_NOT_AVAILABLE | if the key is not found |