32 #ifndef SBMETADATAJOB_H_
33 #define SBMETADATAJOB_H_
39 #include <nsAutoLock.h>
40 #include <nsStringGlue.h>
42 #include <nsCOMArray.h>
44 #include <nsAutoPtr.h>
45 #include <nsIClassInfo.h>
47 #include <sbIAlbumArtListener.h>
48 #include <sbIMediaItem.h>
49 #include <sbIJobProgress.h>
50 #include <sbIJobProgressUI.h>
51 #include <sbIJobCancelable.h>
52 #include <sbIPropertyManager.h>
90 NS_DECL_SBIJOBPROGRESS
91 NS_DECL_SBIJOBPROGRESSUI
92 NS_DECL_SBIJOBCANCELABLE
93 NS_DECL_SBIALBUMARTLISTENER
116 nsresult
Init(nsIArray *aMediaItemsArray,
246 PRBool aShouldRetry = PR_FALSE,
247 PRBool *aWillRetry = nsnull);
253 nsresult BatchCompleteItems();
260 static nsresult RunLibraryBatch(
nsISupports* aUserData);
265 nsresult BatchCompleteItemsCallback();
274 nsresult BeginLibraryBatch();
275 nsresult EndLibraryBatch();
281 nsresult CreateDefaultItemName(
sbIMediaItem* aMediaItem,
290 const nsAString& aID,
296 nsresult GetFileSize(
sbIMediaItem* aMediaItem, PRInt64* aFileSize);
301 nsresult LocalizeString(
const nsAString&
aName, nsAString&
aValue);
307 PRUint32 mCompletedItemCount;
308 PRUint32 mTotalItemCount;
309 nsTArray<nsString> mErrorMessages;
311 nsString mStatusText;
312 nsCOMArray<sbIJobProgressListener> mListeners;
319 nsCOMPtr<sbILibrary> mLibrary;
322 nsStringArray mRequiredProperties;
329 nsTArray<nsRefPtr<sbMetadataJobItem> > mMainThreadJobItems;
330 PRUint32 mNextMainThreadIndex;
334 nsTArray<nsRefPtr<sbMetadataJobItem> > mBackgroundThreadJobItems;
335 PRUint32 mNextBackgroundThreadIndex;
336 PRLock* mBackgroundItemsLock;
341 nsAutoPtr<nsTArray<nsRefPtr<sbMetadataJobItem> > >
342 mProcessedBackgroundThreadItems;
343 PRLock* mProcessedBackgroundItemsLock;
347 PRBool mInLibraryBatch;
350 nsCOMPtr<sbIAlbumArtFetcherSet> mArtFetcher;
352 nsCOMPtr<nsIStringBundle> mStringBundle;
355 #endif // SBMETADATAJOB_H_
Interface to control UI aspects of sbIJobProgress.
An interface to carry around arrays of nsIProperty instances Note that implementations of the interfa...
A component which is interested in the result of an album art fetch request.
Interface for an album art fetcher set. Instantiate as a component instance.
std::set< nsString > sbStringSet
Manager for system wide metadata properties.