SyncEnumListenerBase Class Referenceabstract
Inheritance diagram for SyncEnumListenerBase:
[legend]
Collaboration diagram for SyncEnumListenerBase:
[legend]

Public Types

enum  DropAction { NOT_DROP, DROP_TRACKS, DROP_LIST }
 
enum  HandleMode { HANDLE_ALL, HANDLE_ITEMS, HANDLE_LISTS }
 
enum  ChangeType { CHANGE_NONE, CHANGE_ADD, CHANGE_CLOBBER, CHANGE_RETAIN }
 

Public Member Functions

 SyncEnumListenerBase ()
 
virtual nsresult Init (DropAction aDropAction, sbILibrary *aMainLibrary, sbILibrary *aDeviceLibrary)
 
virtual nsresult ProcessItem (sbIMediaList *aMediaList, sbIMediaItem *aMediaItem)=0
 
virtual nsresult SelectChangeForItem (sbIMediaItem *aMediaItem, ChangeType *aChangeType, sbIMediaItem **aDestMediaItem)=0
 
virtual nsresult SelectChangeForList (sbIMediaList *aMediaList, ChangeType *aChangeType, sbIMediaList **aDestMediaList)=0
 
nsresult AddChange (PRUint32 aChangeType, sbIMediaItem *aSrcItem, sbIMediaItem *aDstItem, nsIArray *aListItems=NULL)
 
nsresult AddListChange (PRUint32 aChangeType, sbIMediaList *aSrcList, sbIMediaList *aDstList)
 
void SetMediaTypes (PRUint32 aMediaTypes)
 
void SetHandleMode (HandleMode aMode)
 
nsresult Finish ()
 
- Public Member Functions inherited from sbIMediaListEnumerationListener
unsigned short onEnumerationBegin (in sbIMediaList aMediaList)
 Called when enumeration is about to begin. More...
 
unsigned short onEnumeratedItem (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem)
 Called once for each item in the enumeration. More...
 
void onEnumerationEnd (in sbIMediaList aMediaList, in nsresult aStatusCode)
 Called when enumeration has completed. More...
 

Public Attributes

nsRefPtr< sbLibraryChangeset > mChangeset
 
- Public Attributes inherited from sbIMediaListEnumerationListener
const unsigned short CONTINUE = 0
 
const unsigned short CANCEL = 1
 

Protected Member Functions

virtual ~SyncEnumListenerBase ()
 
nsresult CreatePropertyChangesForItemAdded (sbIMediaItem *aSourceItem, nsIArray **aPropertyChanges)
 
nsresult CreatePropertyChangesForItemModified (sbIMediaItem *aSourceItem, sbIMediaItem *aDestinationItem, nsIArray **aPropertyChanges)
 
nsresult GetTimeProperty (sbIMediaItem *aMediaItem, nsString aPropertyName, PRInt64 *_result)
 
virtual nsresult GetMatchingPlaylist (sbILibrary *aLibrary, sbIMediaList *aList, sbIMediaList **aMatchingList)=0
 
bool HasCorrectContentType (sbIMediaItem *aItem)
 
bool ListIsMixed (sbIMediaList *aList)
 
bool ListHasCorrectContentType (sbIMediaList *aList)
 
bool IsDrop () const
 

Protected Attributes

PRUint32 mMediaTypes
 
DropAction mDropAction
 
HandleMode mHandleMode
 
nsTHashtable< nsStringHashKey > mSeenMediaItems
 
nsCOMPtr< sbILibrarymMainLibrary
 
nsCOMPtr< sbILibrarymDeviceLibrary
 
nsCOMPtr< nsIMutableArray > mLibraryChanges
 

Detailed Description

Definition at line 81 of file sbDeviceLibrarySyncDiff.cpp.

Member Enumeration Documentation

Enumerator
CHANGE_NONE 
CHANGE_ADD 
CHANGE_CLOBBER 
CHANGE_RETAIN 

Definition at line 104 of file sbDeviceLibrarySyncDiff.cpp.

Enumerator
NOT_DROP 
DROP_TRACKS 
DROP_LIST 

Definition at line 88 of file sbDeviceLibrarySyncDiff.cpp.

Enumerator
HANDLE_ALL 
HANDLE_ITEMS 
HANDLE_LISTS 

Definition at line 96 of file sbDeviceLibrarySyncDiff.cpp.

Constructor & Destructor Documentation

SyncEnumListenerBase::SyncEnumListenerBase ( )
inline

Definition at line 112 of file sbDeviceLibrarySyncDiff.cpp.

virtual SyncEnumListenerBase::~SyncEnumListenerBase ( )
inlineprotectedvirtual

Definition at line 176 of file sbDeviceLibrarySyncDiff.cpp.

Member Function Documentation

nsresult SyncEnumListenerBase::AddChange ( PRUint32  aChangeType,
sbIMediaItem aSrcItem,
sbIMediaItem aDstItem,
nsIArray *  aListItems = NULL 
)

Definition at line 812 of file sbDeviceLibrarySyncDiff.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SyncEnumListenerBase::AddListChange ( PRUint32  aChangeType,
sbIMediaList aSrcList,
sbIMediaList aDstList 
)

Definition at line 774 of file sbDeviceLibrarySyncDiff.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SyncEnumListenerBase::CreatePropertyChangesForItemAdded ( sbIMediaItem aSourceItem,
nsIArray **  aPropertyChanges 
)
protected

Definition at line 720 of file sbDeviceLibrarySyncDiff.cpp.

Here is the caller graph for this function:

nsresult SyncEnumListenerBase::CreatePropertyChangesForItemModified ( sbIMediaItem aSourceItem,
sbIMediaItem aDestinationItem,
nsIArray **  aPropertyChanges 
)
protected

Definition at line 483 of file sbDeviceLibrarySyncDiff.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SyncEnumListenerBase::Finish ( )

Definition at line 347 of file sbDeviceLibrarySyncDiff.cpp.

virtual nsresult SyncEnumListenerBase::GetMatchingPlaylist ( sbILibrary aLibrary,
sbIMediaList aList,
sbIMediaList **  aMatchingList 
)
protectedpure virtual
nsresult SyncEnumListenerBase::GetTimeProperty ( sbIMediaItem aMediaItem,
nsString  aPropertyName,
PRInt64 *  _result 
)
protected

Definition at line 860 of file sbDeviceLibrarySyncDiff.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SyncEnumListenerBase::HasCorrectContentType ( sbIMediaItem aItem)
protected

Definition at line 466 of file sbDeviceLibrarySyncDiff.cpp.

Here is the caller graph for this function:

nsresult SyncEnumListenerBase::Init ( DropAction  aDropAction,
sbILibrary aMainLibrary,
sbILibrary aDeviceLibrary 
)
virtual

Definition at line 323 of file sbDeviceLibrarySyncDiff.cpp.

bool SyncEnumListenerBase::IsDrop ( ) const
inlineprotected

Definition at line 214 of file sbDeviceLibrarySyncDiff.cpp.

Here is the caller graph for this function:

bool SyncEnumListenerBase::ListHasCorrectContentType ( sbIMediaList aList)
protected

Definition at line 439 of file sbDeviceLibrarySyncDiff.cpp.

Here is the caller graph for this function:

bool SyncEnumListenerBase::ListIsMixed ( sbIMediaList aList)
protected

Definition at line 426 of file sbDeviceLibrarySyncDiff.cpp.

Here is the caller graph for this function:

virtual nsresult SyncEnumListenerBase::ProcessItem ( sbIMediaList aMediaList,
sbIMediaItem aMediaItem 
)
pure virtual
virtual nsresult SyncEnumListenerBase::SelectChangeForItem ( sbIMediaItem aMediaItem,
ChangeType aChangeType,
sbIMediaItem **  aDestMediaItem 
)
pure virtual
virtual nsresult SyncEnumListenerBase::SelectChangeForList ( sbIMediaList aMediaList,
ChangeType aChangeType,
sbIMediaList **  aDestMediaList 
)
pure virtual
void SyncEnumListenerBase::SetHandleMode ( HandleMode  aMode)
inline

Definition at line 166 of file sbDeviceLibrarySyncDiff.cpp.

void SyncEnumListenerBase::SetMediaTypes ( PRUint32  aMediaTypes)
inline

Definition at line 160 of file sbDeviceLibrarySyncDiff.cpp.

Member Data Documentation

nsRefPtr<sbLibraryChangeset> SyncEnumListenerBase::mChangeset

Definition at line 231 of file sbDeviceLibrarySyncDiff.cpp.

nsCOMPtr<sbILibrary> SyncEnumListenerBase::mDeviceLibrary
protected

Definition at line 225 of file sbDeviceLibrarySyncDiff.cpp.

DropAction SyncEnumListenerBase::mDropAction
protected

Definition at line 219 of file sbDeviceLibrarySyncDiff.cpp.

HandleMode SyncEnumListenerBase::mHandleMode
protected

Definition at line 220 of file sbDeviceLibrarySyncDiff.cpp.

nsCOMPtr<nsIMutableArray> SyncEnumListenerBase::mLibraryChanges
protected

Definition at line 227 of file sbDeviceLibrarySyncDiff.cpp.

nsCOMPtr<sbILibrary> SyncEnumListenerBase::mMainLibrary
protected

Definition at line 224 of file sbDeviceLibrarySyncDiff.cpp.

PRUint32 SyncEnumListenerBase::mMediaTypes
protected

Definition at line 218 of file sbDeviceLibrarySyncDiff.cpp.

nsTHashtable<nsStringHashKey> SyncEnumListenerBase::mSeenMediaItems
protected

Definition at line 222 of file sbDeviceLibrarySyncDiff.cpp.


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