CNSmlChangeFinder Class Reference

class CNSmlChangeFinder : public CBase

CNSmlChangeFinder .

nsmlchangefinder.lib

Inherits from

Public Member Functions
~CNSmlChangeFinder ()
IMPORT_C void CloseL ()
IMPORT_C void CommitChangesL ()
IMPORT_C void CommitChangesL (const MSmlDataItemUidSet &)
IMPORT_C TInt64 DataStoreUid ()
IMPORT_C void FindChangedItemsL ( CNSmlDataItemUidSet &)
IMPORT_C void FindDeletedItemsL ( CNSmlDataItemUidSet &)
IMPORT_C void FindMovedItemsL ( CNSmlDataItemUidSet &)
IMPORT_C void FindNewItemsL ( CNSmlDataItemUidSet &)
IMPORT_C void FindSoftDeletedItemsL ( CNSmlDataItemUidSet &)
IMPORT_C void ItemAddedL (const TNSmlSnapshotItem &)
IMPORT_C void ItemDeleted (const TNSmlSnapshotItem &)
IMPORT_C void ItemMovedL (const TNSmlSnapshotItem &)
IMPORT_C void ItemSoftDeletedL (const TNSmlSnapshotItem &)
IMPORT_C void ItemUpdatedL (const TNSmlSnapshotItem &)
IMPORT_C CNSmlChangeFinder * NewL ( MSmlSyncRelationship &, TKeyArrayFix , TBool &, TInt )
IMPORT_C void ResetL ()
IMPORT_C void SetDataStoreUid ( TInt64 )
IMPORT_C void SetNewSnapshot ( CArrayFixSeg < TNSmlSnapshotItem > *)
Protected Member Functions
CNSmlChangeFinder ( MSmlSyncRelationship &, TKeyArrayFix , TInt )
void ConstructL ( TBool &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CArrayFixSeg < TNSmlSnapshotItem > * iCurrentSnapshot
TInt64 iDataStoreUid
TKeyArrayFix iKey
CArrayFixSeg < TNSmlSnapshotItem > * iOldSnapshot
TInt iStreamUid
MSmlSyncRelationship & iSyncRelationship

Constructor & Destructor Documentation

CNSmlChangeFinder(MSmlSyncRelationship &, TKeyArrayFix, TInt)

CNSmlChangeFinder ( MSmlSyncRelationship & aSyncRelationship,
TKeyArrayFix aKey,
TInt aStreamUid
) [protected]

Parameters

MSmlSyncRelationship & aSyncRelationship
TKeyArrayFix aKey
TInt aStreamUid

~CNSmlChangeFinder()

IMPORT_C ~CNSmlChangeFinder ( )

C++ destructor.

Member Functions Documentation

CloseL()

IMPORT_C void CloseL ( )

Closes and saves snapshot.

CommitChangesL()

IMPORT_C void CommitChangesL ( )

Update snapshot for all items.

CommitChangesL(const MSmlDataItemUidSet &)

IMPORT_C void CommitChangesL ( const MSmlDataItemUidSet & aUids )

Update snapshot for all items that are synchronized correctly..

Parameters

const MSmlDataItemUidSet & aUids UIDs that are synchronized correctly.

ConstructL(TBool &)

void ConstructL ( TBool & aHasHistory ) [protected]

Parameters

TBool & aHasHistory

DataStoreUid()

IMPORT_C TInt64 DataStoreUid ( ) const

Gets old UID of DataStore. Return TInt. Old UID of DataStore. Returns -1 (KErrNotFound) if UID of DataStore is not set.

FindChangedItemsL(CNSmlDataItemUidSet &)

IMPORT_C void FindChangedItemsL ( CNSmlDataItemUidSet & aChangedUids )

Returns changed items. Item is changed, not soft deleted currently or not only moved

Parameters

CNSmlDataItemUidSet & aChangedUids On return contains changed items.

FindDeletedItemsL(CNSmlDataItemUidSet &)

IMPORT_C void FindDeletedItemsL ( CNSmlDataItemUidSet & aDeletedUids )

Returns deleted items. Item is deleted permanently

Parameters

CNSmlDataItemUidSet & aDeletedUids On return contains deleted items.

FindMovedItemsL(CNSmlDataItemUidSet &)

IMPORT_C void FindMovedItemsL ( CNSmlDataItemUidSet & aMovedUids )

Returns moved items. Item is moved, not changed.

Parameters

CNSmlDataItemUidSet & aMovedUids On return contains moved items.

FindNewItemsL(CNSmlDataItemUidSet &)

IMPORT_C void FindNewItemsL ( CNSmlDataItemUidSet & aNewUids )

Returns new items.

Parameters

CNSmlDataItemUidSet & aNewUids On return contains new items.

FindSoftDeletedItemsL(CNSmlDataItemUidSet &)

IMPORT_C void FindSoftDeletedItemsL ( CNSmlDataItemUidSet & aSoftDeletedUids )

Returns soft deleted items. Item is soft deleted, it can be also modified or moved.

Parameters

CNSmlDataItemUidSet & aSoftDeletedUids

ItemAddedL(const TNSmlSnapshotItem &)

IMPORT_C void ItemAddedL ( const TNSmlSnapshotItem & aItem )

Update snapshot for added item.

Parameters

const TNSmlSnapshotItem & aItem Item that needs update.

ItemDeleted(const TNSmlSnapshotItem &)

IMPORT_C void ItemDeleted ( const TNSmlSnapshotItem & aItem )

Update snapshot for deleted item.

Parameters

const TNSmlSnapshotItem & aItem Item that needs update.

ItemMovedL(const TNSmlSnapshotItem &)

IMPORT_C void ItemMovedL ( const TNSmlSnapshotItem & aItem )

Update snapshot for moved item.

Parameters

const TNSmlSnapshotItem & aItem Item that needs update.

ItemSoftDeletedL(const TNSmlSnapshotItem &)

IMPORT_C void ItemSoftDeletedL ( const TNSmlSnapshotItem & aItem )

Update snapshot for soft deleted item.

Parameters

const TNSmlSnapshotItem & aItem Item that needs update.

ItemUpdatedL(const TNSmlSnapshotItem &)

IMPORT_C void ItemUpdatedL ( const TNSmlSnapshotItem & aItem )

Update snapshot for updated item.

Parameters

const TNSmlSnapshotItem & aItem Item that needs update.

NewL(MSmlSyncRelationship &, TKeyArrayFix, TBool &, TInt)

IMPORT_C CNSmlChangeFinder * NewL ( MSmlSyncRelationship & aSyncRelationship,
TKeyArrayFix aKey,
TBool & aHasHistory,
TInt aStreamUid =  KNSmlDefaultSnapshotStreamUID
) [static]

Two-phase constructor for CNSmlChangeFinder class.

Parameters

MSmlSyncRelationship & aSyncRelationship Reference to MSmlSyncRelationship interface.
TKeyArrayFix aKey Key that is used in sorting snapshot.
TBool & aHasHistory Boolean that is true if change finder has history for current uid.
TInt aStreamUid =  KNSmlDefaultSnapshotStreamUID Snapshot stream UID.

ResetL()

IMPORT_C void ResetL ( )

Resets (clears) snapshot.

SetDataStoreUid(TInt64)

IMPORT_C void SetDataStoreUid ( TInt64 aUid )

Sets new UID of DataStore.

Parameters

TInt64 aUid

SetNewSnapshot(CArrayFixSeg< TNSmlSnapshotItem > *)

IMPORT_C void SetNewSnapshot ( CArrayFixSeg < TNSmlSnapshotItem > * aNewSnapshot )

Sets new (current) snapshot.

Parameters

CArrayFixSeg < TNSmlSnapshotItem > * aNewSnapshot New snapshot.

Member Data Documentation

CArrayFixSeg< TNSmlSnapshotItem > * iCurrentSnapshot

CArrayFixSeg < TNSmlSnapshotItem > * iCurrentSnapshot [private]

TInt64 iDataStoreUid

TInt64 iDataStoreUid [private]

TKeyArrayFix iKey

TKeyArrayFix iKey [private]

CArrayFixSeg< TNSmlSnapshotItem > * iOldSnapshot

CArrayFixSeg < TNSmlSnapshotItem > * iOldSnapshot [private]

TInt iStreamUid

TInt iStreamUid [private]

MSmlSyncRelationship & iSyncRelationship

MSmlSyncRelationship & iSyncRelationship [private]