sbAlbumArtService.cpp File Reference

Songbird Album Art Service Source. More...

#include "sbAlbumArtService.h"
#include <sbILibrary.h>
#include <sbILibraryManager.h>
#include <sbIAlbumArtFetcherSet.h>
#include <sbIPropertyArray.h>
#include <sbStandardProperties.h>
#include <sbVariantUtils.h>
#include <nsComponentManagerUtils.h>
#include <nsIBinaryOutputStream.h>
#include <nsICategoryManager.h>
#include <nsIConverterInputStream.h>
#include <nsIConverterOutputStream.h>
#include <nsICryptoHash.h>
#include <nsIFileURL.h>
#include <nsIMutableArray.h>
#include <nsIProperties.h>
#include <nsIProtocolHandler.h>
#include <nsIProxyObjectManager.h>
#include <nsIResProtocolHandler.h>
#include <nsISupportsPrimitives.h>
#include <nsIUnicharLineInputStream.h>
#include <nsIUnicharOutputStream.h>
#include <nsServiceManagerUtils.h>
#include <prprf.h>
#include "prlog.h"
Include dependency graph for sbAlbumArtService.cpp:

Go to the source code of this file.

Macros

#define TEMPORARY_CACHE_SIZE   1000
 
#define TEMPORARY_CACHE_CLEAR_TIME   60000
 
#define SB_RES_PROTO_PREFIX   "sb-artwork"
 
#define ALBUM_ART_CACHE_CLEANUP_INTERVAL   10000
 
#define TRACE(args)   /* nothing */
 
#define LOG(args)   /* nothing */
 
#define NS_FILE_OUTPUT_STREAM_OPEN_DEFAULT   -1
 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...
 

Functions

 NS_IMPL_ISUPPORTS2 (sbAlbumArtService, sbIAlbumArtService, nsIObserver) NS_IMETHODIMP sbAlbumArtService
 

Variables

static const char * sbAlbumArtServiceValidExtensionList []
 

Detailed Description

Songbird Album Art Service Source.

Definition in file sbAlbumArtService.cpp.

Macro Definition Documentation

#define ALBUM_ART_CACHE_CLEANUP_INTERVAL   10000

Definition at line 96 of file sbAlbumArtService.cpp.

#define LOG (   args)    /* nothing */

Definition at line 123 of file sbAlbumArtService.cpp.

#define NS_FILE_OUTPUT_STREAM_OPEN_DEFAULT   -1

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.

Definition at line 271 of file sbAlbumArtService.cpp.

#define SB_RES_PROTO_PREFIX   "sb-artwork"

Definition at line 92 of file sbAlbumArtService.cpp.

#define TEMPORARY_CACHE_CLEAR_TIME   60000

Definition at line 89 of file sbAlbumArtService.cpp.

#define TEMPORARY_CACHE_SIZE   1000

Definition at line 86 of file sbAlbumArtService.cpp.

#define TRACE (   args)    /* nothing */

To log this module, set the following environment variable: NSPR_LOG_MODULES=sbAlbumArtService:5 Use the following to output to a file: NSPR_LOG_FILE=path/to/file.log

Definition at line 122 of file sbAlbumArtService.cpp.

Function Documentation

NS_IMPL_ISUPPORTS2 ( sbAlbumArtService  ,
sbIAlbumArtService  ,
nsIObserver   
)

Return a list of album art fetcher contract ID's for the given type (remote, local, all) as an array of nsIVariant's of type ACString.

Parameters
aTypesbIAlbumArtFetcherSet.TYPE_[ALL|REMOTE|LOCAL]
aIncludeDisabledInclude disabled fetchers in the list.
Returns
List of album art fetcher contract ID's.

Definition at line 133 of file sbAlbumArtService.cpp.

Here is the call graph for this function:

Variable Documentation

const char* sbAlbumArtServiceValidExtensionList[]
static
Initial value:
=
{
"jpg",
"jpeg",
"gif",
"png"
}

Definition at line 102 of file sbAlbumArtService.cpp.