CNSmlChangeFinder Class Reference

class CNSmlChangeFinder : public CBase

CNSmlChangeFinder.

nsmlchangefinder.lib

Inherits from

Public Member Functions
~CNSmlChangeFinder()
IMPORT_C voidCloseL()
IMPORT_C voidCommitChangesL()
IMPORT_C voidCommitChangesL(const MSmlDataItemUidSet &)
IMPORT_C TInt64DataStoreUid()
IMPORT_C voidFindChangedItemsL(CNSmlDataItemUidSet &)
IMPORT_C voidFindDeletedItemsL(CNSmlDataItemUidSet &)
IMPORT_C voidFindMovedItemsL(CNSmlDataItemUidSet &)
IMPORT_C voidFindNewItemsL(CNSmlDataItemUidSet &)
IMPORT_C voidFindSoftDeletedItemsL(CNSmlDataItemUidSet &)
IMPORT_C voidItemAddedL(const TNSmlSnapshotItem &)
IMPORT_C voidItemDeleted(const TNSmlSnapshotItem &)
IMPORT_C voidItemMovedL(const TNSmlSnapshotItem &)
IMPORT_C voidItemSoftDeletedL(const TNSmlSnapshotItem &)
IMPORT_C voidItemUpdatedL(const TNSmlSnapshotItem &)
IMPORT_C CNSmlChangeFinder *NewL(MSmlSyncRelationship &, TKeyArrayFix, TBool &, TInt)
IMPORT_C voidResetL()
IMPORT_C voidSetDataStoreUid(TInt64)
IMPORT_C voidSetNewSnapshot(CArrayFixSeg< TNSmlSnapshotItem > *)
Protected Member Functions
CNSmlChangeFinder(MSmlSyncRelationship &, TKeyArrayFix, TInt)
voidConstructL(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,
TKeyArrayFixaKey,
TIntaStreamUid
)[protected]

Parameters

MSmlSyncRelationship & aSyncRelationship
TKeyArrayFix aKey
TInt aStreamUid

~CNSmlChangeFinder()

IMPORT_C~CNSmlChangeFinder()

C++ destructor.

Member Functions Documentation

CloseL()

IMPORT_C voidCloseL()

Closes and saves snapshot.

CommitChangesL()

IMPORT_C voidCommitChangesL()

Update snapshot for all items.

CommitChangesL(const MSmlDataItemUidSet &)

IMPORT_C voidCommitChangesL(const MSmlDataItemUidSet &aUids)

Update snapshot for all items that are synchronized correctly..

Parameters

const MSmlDataItemUidSet & aUidsUIDs that are synchronized correctly.

ConstructL(TBool &)

voidConstructL(TBool &aHasHistory)[protected]

Parameters

TBool & aHasHistory

DataStoreUid()

IMPORT_C TInt64DataStoreUid()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 voidFindChangedItemsL(CNSmlDataItemUidSet &aChangedUids)

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

Parameters

CNSmlDataItemUidSet & aChangedUidsOn return contains changed items.

FindDeletedItemsL(CNSmlDataItemUidSet &)

IMPORT_C voidFindDeletedItemsL(CNSmlDataItemUidSet &aDeletedUids)

Returns deleted items. Item is deleted permanently

Parameters

CNSmlDataItemUidSet & aDeletedUidsOn return contains deleted items.

FindMovedItemsL(CNSmlDataItemUidSet &)

IMPORT_C voidFindMovedItemsL(CNSmlDataItemUidSet &aMovedUids)

Returns moved items. Item is moved, not changed.

Parameters

CNSmlDataItemUidSet & aMovedUidsOn return contains moved items.

FindNewItemsL(CNSmlDataItemUidSet &)

IMPORT_C voidFindNewItemsL(CNSmlDataItemUidSet &aNewUids)

Returns new items.

Parameters

CNSmlDataItemUidSet & aNewUidsOn return contains new items.

FindSoftDeletedItemsL(CNSmlDataItemUidSet &)

IMPORT_C voidFindSoftDeletedItemsL(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 voidItemAddedL(const TNSmlSnapshotItem &aItem)

Update snapshot for added item.

Parameters

const TNSmlSnapshotItem & aItemItem that needs update.

ItemDeleted(const TNSmlSnapshotItem &)

IMPORT_C voidItemDeleted(const TNSmlSnapshotItem &aItem)

Update snapshot for deleted item.

Parameters

const TNSmlSnapshotItem & aItemItem that needs update.

ItemMovedL(const TNSmlSnapshotItem &)

IMPORT_C voidItemMovedL(const TNSmlSnapshotItem &aItem)

Update snapshot for moved item.

Parameters

const TNSmlSnapshotItem & aItemItem that needs update.

ItemSoftDeletedL(const TNSmlSnapshotItem &)

IMPORT_C voidItemSoftDeletedL(const TNSmlSnapshotItem &aItem)

Update snapshot for soft deleted item.

Parameters

const TNSmlSnapshotItem & aItemItem that needs update.

ItemUpdatedL(const TNSmlSnapshotItem &)

IMPORT_C voidItemUpdatedL(const TNSmlSnapshotItem &aItem)

Update snapshot for updated item.

Parameters

const TNSmlSnapshotItem & aItemItem that needs update.

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

IMPORT_C CNSmlChangeFinder *NewL(MSmlSyncRelationship &aSyncRelationship,
TKeyArrayFixaKey,
TBool &aHasHistory,
TIntaStreamUid =  KNSmlDefaultSnapshotStreamUID
)[static]

Two-phase constructor for CNSmlChangeFinder class.

Parameters

MSmlSyncRelationship & aSyncRelationshipReference to MSmlSyncRelationship interface.
TKeyArrayFix aKeyKey that is used in sorting snapshot.
TBool & aHasHistoryBoolean that is true if change finder has history for current uid.
TInt aStreamUid =  KNSmlDefaultSnapshotStreamUID Snapshot stream UID.

ResetL()

IMPORT_C voidResetL()

Resets (clears) snapshot.

SetDataStoreUid(TInt64)

IMPORT_C voidSetDataStoreUid(TInt64aUid)

Sets new UID of DataStore.

Parameters

TInt64 aUid

SetNewSnapshot(CArrayFixSeg< TNSmlSnapshotItem > *)

IMPORT_C voidSetNewSnapshot(CArrayFixSeg< TNSmlSnapshotItem > *aNewSnapshot)

Sets new (current) snapshot.

Parameters

CArrayFixSeg< TNSmlSnapshotItem > * aNewSnapshotNew 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]