27 #ifndef __SB_ALBUMARTSERVICE_H__
28 #define __SB_ALBUMARTSERVICE_H__
50 #include <sbIAlbumArtFetcher.h>
51 #include <sbIAlbumArtService.h>
57 #include <nsIFileStreams.h>
58 #include <nsIIOService.h>
59 #include <nsIMIMEService.h>
60 #include <nsIObserver.h>
61 #include <nsIObserverService.h>
62 #include <nsStringAPI.h>
63 #include <nsStringGlue.h>
65 #include <nsInterfaceHashtable.h>
78 #define SB_ALBUMARTSERVICE_CLASSNAME "sbAlbumArtService"
79 #define SB_ALBUMARTSERVICE_CID \
85 { 0x85, 0x52, 0xD7, 0x4D, 0x31, 0x3C, 0x62, 0xB6 } \
114 NS_DECL_SBIALBUMARTSERVICE
158 return (priority <= right.priority);
162 PRBool
operator==(
const FetcherInfo& right)
const {
179 nsCOMPtr<nsIIOService> mIOService;
180 nsCOMPtr<nsIMIMEService> mMIMEService;
181 nsCOMPtr<nsIFile> mAlbumArtCacheDir;
183 PRBool mPrefsAvailable;
184 nsTArray<FetcherInfo> mFetcherInfoList;
185 nsTArray<nsCString> mValidExtensionList;
186 nsInterfaceHashtable<nsStringHashKey, nsISupports>
188 nsCOMPtr<nsITimer> mCacheFlushTimer;
198 nsresult InitializeLibraryWatch();
202 nsresult GetAlbumArtCacheDir();
204 nsresult GetAlbumArtFetcherInfo();
206 nsresult UpdateAlbumArtFetcherInfo();
208 nsresult GetCacheFileBaseName(
const PRUint8*
aData,
210 nsACString& aFileBaseName);
212 nsresult GetAlbumArtFileExtension(
const nsACString& aMimeType,
213 nsACString& aFileExtension);
225 nsCOMPtr<nsIFileOutputStream>,
230 #endif // __SB_ALBUMARTSERVICE_H__
bool operator==(sbFraction const &aLeft, sbFraction const &aRight)
NS_DECL_ISUPPORTS NS_DECL_SBIALBUMARTSERVICE NS_DECL_NSIOBSERVER sbAlbumArtService()
virtual ~sbAlbumArtService()
SB_AUTO_CLASS(sbAutoFileOutputStream, nsCOMPtr< nsIFileOutputStream >, mValue, mValue->Close(), mValue=nsnull)
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
bool operator<(sbFraction const &aLeft, sbFraction const &aRight)
Interface for the album art service. Instantiate as a component service.
_updateTextAndScrollDataForFrame aData