29 #ifndef __SB_ALBUMARTSCANNER_H__
30 #define __SB_ALBUMARTSCANNER_H__
52 #include <sbIAlbumArtFetcherSet.h>
53 #include <sbIAlbumArtListener.h>
54 #include <sbIAlbumArtScanner.h>
55 #include <sbIAlbumArtService.h>
56 #include <sbIJobCancelable.h>
57 #include <sbIJobProgress.h>
58 #include <sbIJobProgressUI.h>
59 #include <sbILibrary.h>
62 #include <nsCOMArray.h>
65 #include <nsIClassInfo.h>
66 #include <nsIMutableArray.h>
67 #include <nsIStringBundle.h>
69 #include <nsStringGlue.h>
82 #define SB_ALBUMARTSCANNER_CLASSNAME "sbAlbumArtScanner"
83 #define SB_ALBUMARTSCANNER_CONTRACTID \
84 "@songbirdnest.com/Songbird/album-art/scanner;1"
85 #define SB_ALBUMARTSCANNER_CID \
91 { 0x8e, 0x2d, 0x2b, 0x0a, 0x8c, 0x9b, 0x06, 0x75 } \
95 #define ALBUMART_SCANNER_INTERVAL 10
98 #define PREF_ALBUMART_SCANNER_BRANCH "songbird.albumart.scanner."
99 #define PREF_ALBUMART_SCANNER_INTERVAL "interval"
120 NS_DECL_SBIALBUMARTSCANNER
122 NS_DECL_SBIJOBPROGRESS
123 NS_DECL_SBIJOBPROGRESSUI
124 NS_DECL_SBIJOBCANCELABLE
125 NS_DECL_NSITIMERCALLBACK
126 NS_DECL_SBIALBUMARTLISTENER
138 nsresult UpdateProgress();
143 nsresult ProcessAlbum();
148 nsresult GetNextAlbumItems();
157 nsresult MarkRemoteFetchAttempted(
sbIMediaItem* aMediaItem);
160 nsCOMPtr<nsITimer> mIntervalTimer;
161 PRInt32 mIntervalTimerValue;
164 nsCOMPtr<sbIAlbumArtFetcherSet> mFetcherSet;
167 PRBool mUpdateArtwork;
171 nsTArray<nsString> mErrorMessages;
173 nsCOMArray<sbIJobProgressListener> mListeners;
174 PRUint32 mCompletedItemCount;
175 PRUint32 mTotalItemCount;
178 nsCOMPtr<sbIAlbumArtFetcher> mCurrentFetcher;
179 nsAutoString mCurrentFetcherName;
180 nsAutoString mCurrentAlbumName;
183 PRBool mProcessNextAlbum;
186 nsCOMPtr<nsIMutableArray> mCurrentAlbumItemList;
189 nsCOMPtr<sbIMediaListView> mMediaListView;
192 nsCOMPtr<nsIStringBundle> mStringBundle;
195 #endif // __SB_ALBUMARTSCANNER_H__
Interface to control UI aspects of sbIJobProgress.
NS_DECL_ISUPPORTS NS_DECL_SBIALBUMARTSCANNER NS_DECL_NSICLASSINFO NS_DECL_SBIJOBPROGRESS NS_DECL_SBIJOBPROGRESSUI NS_DECL_SBIJOBCANCELABLE NS_DECL_NSITIMERCALLBACK NS_DECL_SBIALBUMARTLISTENER sbAlbumArtScanner()
Interface for an album art scanner. Instantiate as a component instance. It also implements the sbIJo...
A component which is interested in the result of an album art fetch request.
virtual ~sbAlbumArtScanner()