sbLocalDatabaseDiffingService Class Reference

#include <sbLocalDatabaseDiffingService.h>

Inheritance diagram for sbLocalDatabaseDiffingService:
[legend]
Collaboration diagram for sbLocalDatabaseDiffingService:
[legend]

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSICLASSINFO
NS_DECL_SBILIBRARYDIFFINGSERVICE 
sbLocalDatabaseDiffingService ()
 
nsresult Init ()
 
- Public Member Functions inherited from sbILibraryDiffingService
sbILibraryChangeset createChangeset (in sbIMediaList aSource, in sbIMediaList aDestination)
 
sbILibraryChangeset createMultiChangeset (in nsIArray aSources, in sbIMediaList aDestination)
 
AString createChangesetAsync (in sbIMediaList aSource, in sbIMediaList aDestination, [optional] in nsIObserver aObserver)
 
sbILibraryChangeset createMultiChangesetAsync (in nsIArray aSources, in sbIMediaList aDestination, [optional] in nsIObserver aObserver)
 
sbILibraryChangeset getChangeset (in AString aChangesetCookie)
 

Static Public Member Functions

static NS_METHOD RegisterSelf (nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aLoaderStr, const char *aType, const nsModuleComponentInfo *aInfo)
 

Protected Member Functions

nsresult GetPropertyIDs (nsIStringEnumerator **aPropertyIDs)
 
nsresult CreateLibraryChangeFromItems (sbIMediaItem *aSourceItem, sbIMediaItem *aDestinationItem, sbILibraryChange **aLibraryChange)
 
nsresult CreateItemAddedLibraryChange (sbIMediaItem *aSourceItem, sbILibraryChange **aLibraryChange)
 
nsresult CreateItemMovedLibraryChange (sbIMediaItem *aSourceItem, PRUint32 aItemOrdinal, sbILibraryChange **aLibraryChange)
 
nsresult CreateItemDeletedLibraryChange (sbIMediaItem *aDestinationItem, sbILibraryChange **aLibraryChange)
 
nsresult CreatePropertyChangesFromProperties (sbIPropertyArray *aSourceProperties, sbIPropertyArray *aDestinationProperties, nsIArray **aPropertyChanges)
 
nsresult CreateLibraryChangesetFromLists (sbIMediaList *aSourceList, sbIMediaList *aDestinationList, sbILibraryChangeset **aLibraryChangeset)
 
nsresult CreateChanges (sbIMediaList *aSrcLibrary, sbIMediaList *aDestLibrary, sbLDBDSEnumerator *aSrcEnum, sbLDBDSEnumerator *aDestEnum, nsIArray **aChanges)
 
nsresult CreateLibraryChangesetFromLibraries (sbILibrary *aSourceLibrary, sbILibrary *aDestinationLibrary, sbILibraryChangeset **aLibraryChangeset)
 
nsresult CreateLibraryChangesetFromListsToLibrary (nsIArray *aSourceLists, sbILibrary *aDestinationLibrary, sbILibraryChangeset **aLibraryChangeset)
 
nsresult AddToUniqueItemList (sbIMediaItem *aSourceItem, sbIPropertyArray *aUniquePropSet, nsInterfaceHashtable< nsStringHashKey, sbIMediaItem > &aUniqueItemList, nsTArray< nsString > &aUniqueItemGUIDList, nsTHashtable< nsStringHashKey > &aUniqueItemPropTable)
 

Static Protected Member Functions

static PLDHashOperator Enumerator (nsIDHashKey *aEntry, void *userArg)
 

Protected Attributes

nsCOMPtr< nsIThread > mProcessorThread
 
nsCOMPtr< sbIPropertyManagermPropertyManager
 

Detailed Description

Definition at line 51 of file sbLocalDatabaseDiffingService.h.

Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSICLASSINFO NS_DECL_SBILIBRARYDIFFINGSERVICE sbLocalDatabaseDiffingService::sbLocalDatabaseDiffingService ( )

Member Function Documentation

nsresult sbLocalDatabaseDiffingService::AddToUniqueItemList ( sbIMediaItem aSourceItem,
sbIPropertyArray aUniquePropSet,
nsInterfaceHashtable< nsStringHashKey, sbIMediaItem > &  aUniqueItemList,
nsTArray< nsString > &  aUniqueItemGUIDList,
nsTHashtable< nsStringHashKey > &  aUniqueItemPropTable 
)
protected

Add an item to a unique item list.

Parameters
aItemThe item to add.
aUniquePropSetSet of properties to use to test for uniqueness.
aUniqueItemListList of unique items.
aUniqueItemGUIDListList of unique item GUIDs.
aUniqueItemPropTableTable of unique item properties.
nsresult sbLocalDatabaseDiffingService::CreateChanges ( sbIMediaList aSrcLibrary,
sbIMediaList aDestLibrary,
sbLDBDSEnumerator aSrcEnum,
sbLDBDSEnumerator aDestEnum,
nsIArray **  aChanges 
)
protected

Creates a list of change given two libraries and two enumerators

Parameters
aSrcLibraryThe source library
aDestLibraryThe destination library
aSrcEnumThe source items to compare, all items must belong to aSrcLibrary
aDestEnumThe items in the destination to compare, all items must belong to aDestLibrary

Definition at line 621 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateItemAddedLibraryChange ( sbIMediaItem aSourceItem,
sbILibraryChange **  aLibraryChange 
)
protected

Definition at line 841 of file sbLocalDatabaseDiffingService.cpp.

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateItemDeletedLibraryChange ( sbIMediaItem aDestinationItem,
sbILibraryChange **  aLibraryChange 
)
protected

Definition at line 960 of file sbLocalDatabaseDiffingService.cpp.

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateItemMovedLibraryChange ( sbIMediaItem aSourceItem,
PRUint32  aItemOrdinal,
sbILibraryChange **  aLibraryChange 
)
protected

Definition at line 910 of file sbLocalDatabaseDiffingService.cpp.

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateLibraryChangeFromItems ( sbIMediaItem aSourceItem,
sbIMediaItem aDestinationItem,
sbILibraryChange **  aLibraryChange 
)
protected

Create a sbILibraryChange from a source and destination sbIMediaItem.

Parameters
aSourceItemThe source item.
aDestinationItemThe destination item.
[out]aLibraryChangeThe newly created library change.

Definition at line 796 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateLibraryChangesetFromLibraries ( sbILibrary aSourceLibrary,
sbILibrary aDestinationLibrary,
sbILibraryChangeset **  aLibraryChangeset 
)
protected

Create an sbILibraryChangeset from a source and a destination sbILibrary.

Parameters
aSourceLibraryThe source library.
aDestinationLibraryThe destination library.
[out]aLibraryChangesetThe newly created library changeset.

Definition at line 1284 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateLibraryChangesetFromLists ( sbIMediaList aSourceList,
sbIMediaList aDestinationList,
sbILibraryChangeset **  aLibraryChangeset 
)
protected

Create a sbILibraryChangeset from a source and destination sbIMediaList.

Parameters
aSourceListThe source list.
aDestinationListThe destination list.
[out]

Definition at line 1196 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

nsresult sbLocalDatabaseDiffingService::CreateLibraryChangesetFromListsToLibrary ( nsIArray *  aSourceLists,
sbILibrary aDestinationLibrary,
sbILibraryChangeset **  aLibraryChangeset 
)
protected

Definition at line 1449 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

nsresult sbLocalDatabaseDiffingService::CreatePropertyChangesFromProperties ( sbIPropertyArray aSourceProperties,
sbIPropertyArray aDestinationProperties,
nsIArray **  aPropertyChanges 
)
protected

Create an array of sbIPropertyChange elements from a source and destination sbIPropertyArray.

Parameters
aSourcePropertiesThe source property array.
aDestinationPropertiesThe destination property array.
[out]aPropertyChangesThe newly created property changes array.

Definition at line 982 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PLDHashOperator sbLocalDatabaseDiffingService::Enumerator ( nsIDHashKey *  aEntry,
void *  userArg 
)
staticprotected

Enumerator function for enumerating libraries and building change lists

Definition at line 1368 of file sbLocalDatabaseDiffingService.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbLocalDatabaseDiffingService::GetPropertyIDs ( nsIStringEnumerator **  aPropertyIDs)
protected

Get all property info elements from the property manager.

Definition at line 780 of file sbLocalDatabaseDiffingService.cpp.

nsresult sbLocalDatabaseDiffingService::Init ( )

Initialize the local database diffing service.

Exceptions
NS_ERROR_ALREADY_INITIALIZEDif called more than once.

Definition at line 769 of file sbLocalDatabaseDiffingService.cpp.

NS_METHOD sbLocalDatabaseDiffingService::RegisterSelf ( nsIComponentManager *  aCompMgr,
nsIFile *  aPath,
const char *  aLoaderStr,
const char *  aType,
const nsModuleComponentInfo *  aInfo 
)
static

Definition at line 505 of file sbLocalDatabaseDiffingService.cpp.

Member Data Documentation

nsCOMPtr<nsIThread> sbLocalDatabaseDiffingService::mProcessorThread
protected

Definition at line 178 of file sbLocalDatabaseDiffingService.h.

nsCOMPtr<sbIPropertyManager> sbLocalDatabaseDiffingService::mPropertyManager
protected

Definition at line 179 of file sbLocalDatabaseDiffingService.h.


The documentation for this class was generated from the following files: