25 #ifndef __SB_LOCALDATABASEDIFFINGSERVICE_H__
26 #define __SB_LOCALDATABASEDIFFINGSERVICE_H__
28 #include <sbILibraryDiffingService.h>
30 #include <nsIClassInfo.h>
31 #include <nsIGenericFactory.h>
32 #include <nsIThread.h>
34 #include <sbILibrary.h>
35 #include <sbILibraryChangeset.h>
36 #include <sbIMediaItem.h>
37 #include <sbIMediaList.h>
38 #include <sbIMediaListListener.h>
39 #include <sbIPropertyArray.h>
40 #include <sbIPropertyManager.h>
42 #include <nsAutoPtr.h>
44 #include <nsInterfaceHashtable.h>
57 NS_DECL_SBILIBRARYDIFFINGSERVICE
61 static NS_METHOD
RegisterSelf(nsIComponentManager* aCompMgr,
63 const char* aLoaderStr,
65 const nsModuleComponentInfo *aInfo);
94 PRUint32 aItemOrdinal,
110 nsIArray **aPropertyChanges);
137 nsIArray ** aChanges);
166 nsInterfaceHashtable<nsStringHashKey, sbIMediaItem>& aUniqueItemList,
167 nsTArray<nsString>& aUniqueItemGUIDList,
168 nsTHashtable<nsStringHashKey>& aUniqueItemPropTable);
173 static PLDHashOperator
Enumerator(nsIDHashKey* aEntry,
void* userArg);
175 ~sbLocalDatabaseDiffingService();
NS_DECL_ISUPPORTS NS_DECL_NSICLASSINFO NS_DECL_SBILIBRARYDIFFINGSERVICE sbLocalDatabaseDiffingService()
nsresult CreatePropertyChangesFromProperties(sbIPropertyArray *aSourceProperties, sbIPropertyArray *aDestinationProperties, nsIArray **aPropertyChanges)
nsCOMPtr< sbIPropertyManager > mPropertyManager
static NS_METHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aLoaderStr, const char *aType, const nsModuleComponentInfo *aInfo)
nsresult CreateLibraryChangesetFromLists(sbIMediaList *aSourceList, sbIMediaList *aDestinationList, sbILibraryChangeset **aLibraryChangeset)
Library and media list diffing service.
nsresult CreateItemDeletedLibraryChange(sbIMediaItem *aDestinationItem, sbILibraryChange **aLibraryChange)
nsresult CreateItemMovedLibraryChange(sbIMediaItem *aSourceItem, PRUint32 aItemOrdinal, sbILibraryChange **aLibraryChange)
sbLibraryChangeset Definition.
nsresult AddToUniqueItemList(sbIMediaItem *aSourceItem, sbIPropertyArray *aUniquePropSet, nsInterfaceHashtable< nsStringHashKey, sbIMediaItem > &aUniqueItemList, nsTArray< nsString > &aUniqueItemGUIDList, nsTHashtable< nsStringHashKey > &aUniqueItemPropTable)
nsresult CreateLibraryChangesetFromLibraries(sbILibrary *aSourceLibrary, sbILibrary *aDestinationLibrary, sbILibraryChangeset **aLibraryChangeset)
nsresult CreateLibraryChangesetFromListsToLibrary(nsIArray *aSourceLists, sbILibrary *aDestinationLibrary, sbILibraryChangeset **aLibraryChangeset)
nsresult CreateItemAddedLibraryChange(sbIMediaItem *aSourceItem, sbILibraryChange **aLibraryChange)
nsresult CreateChanges(sbIMediaList *aSrcLibrary, sbIMediaList *aDestLibrary, sbLDBDSEnumerator *aSrcEnum, sbLDBDSEnumerator *aDestEnum, nsIArray **aChanges)
nsCOMPtr< nsIThread > mProcessorThread
Media library abstraction.
nsresult CreateLibraryChangeFromItems(sbIMediaItem *aSourceItem, sbIMediaItem *aDestinationItem, sbILibraryChange **aLibraryChange)
An interface to carry around arrays of nsIProperty instances. Users of this interface should only QI ...
static PLDHashOperator Enumerator(nsIDHashKey *aEntry, void *userArg)
nsresult GetPropertyIDs(nsIStringEnumerator **aPropertyIDs)