CSmlDataStore Class Reference

#include <SmlDataProvider.h>

Link against: smldataprovider.lib

class CSmlDataStore : public CBase

Inherits from

  • CSmlDataStore
    Public Member Functions
    IMPORT_C const MSmlDataItemUidSet &AddedItems()
    IMPORT_C voidBeginBatchL()
    IMPORT_C voidBeginTransactionL()
    IMPORT_C voidCancelBatch()
    IMPORT_C voidCancelRequest()
    IMPORT_C voidCloseItem()
    IMPORT_C voidCommitBatchL(RArray< TInt > &, TRequestStatus &)
    IMPORT_C voidCommitChangeInfoL(TRequestStatus &, const MSmlDataItemUidSet &)
    IMPORT_C voidCommitChangeInfoL(TRequestStatus &)
    IMPORT_C voidCommitItemL(TRequestStatus &)
    IMPORT_C voidCommitTransactionL(TRequestStatus &)
    IMPORT_C voidCreateItemL(TSmlDbItemUid &, TInt, TSmlDbItemUid, const TDesC8 &, const TDesC8 &, TRequestStatus &)
    IMPORT_C voidDeleteAllItemsL(TRequestStatus &)
    IMPORT_C voidDeleteItemL(TSmlDbItemUid, TRequestStatus &)
    IMPORT_C const MSmlDataItemUidSet &DeletedItems()
    IMPORT_C TBoolHasSyncHistory()
    IMPORT_C TIntMaxObjectSize()
    IMPORT_C const MSmlDataItemUidSet &ModifiedItems()
    IMPORT_C voidMoveItemL(TSmlDbItemUid, TSmlDbItemUid, TRequestStatus &)
    IMPORT_C const MSmlDataItemUidSet &MovedItems()
    IMPORT_C voidOpenItemL(TSmlDbItemUid, TBool &, TInt &, TSmlDbItemUid &, TDes8 &, TDes8 &, TRequestStatus &)
    IMPORT_C voidOpenL(const TDesC &, MSmlSyncRelationship &, TRequestStatus &)
    IMPORT_C voidReadItemL(TDes8 &)
    IMPORT_C voidReplaceItemL(TSmlDbItemUid, TInt, TSmlDbItemUid, TBool, TRequestStatus &)
    IMPORT_C voidResetChangeInfoL(TRequestStatus &)
    IMPORT_C voidRevertTransaction(TRequestStatus &)
    IMPORT_C voidSetRemoteMaxObjectSize(TInt)
    IMPORT_C voidSetRemoteStoreFormatL(const CSmlDataStoreFormat &)
    IMPORT_C voidSoftDeleteItemL(TSmlDbItemUid, TRequestStatus &)
    IMPORT_C const MSmlDataItemUidSet &SoftDeletedItems()
    IMPORT_C const TDesC &StoreName()
    IMPORT_C voidWriteItemL(const TDesC8 &)
    Protected Member Functions
    pure virtual const MSmlDataItemUidSet &DoAddedItems()
    pure virtual voidDoBeginBatchL()
    pure virtual voidDoBeginTransactionL()
    pure virtual voidDoCancelBatch()
    pure virtual voidDoCancelRequest()
    pure virtual voidDoCloseItem()
    pure virtual voidDoCommitBatchL(RArray< TInt > &, TRequestStatus &)
    pure virtual voidDoCommitChangeInfoL(TRequestStatus &, const MSmlDataItemUidSet &)
    pure virtual voidDoCommitChangeInfoL(TRequestStatus &)
    pure virtual voidDoCommitItemL(TRequestStatus &)
    pure virtual voidDoCommitTransactionL(TRequestStatus &)
    pure virtual voidDoCreateItemL(TSmlDbItemUid &, TInt, TSmlDbItemUid, const TDesC8 &, const TDesC8 &, TRequestStatus &)
    pure virtual voidDoDeleteAllItemsL(TRequestStatus &)
    pure virtual voidDoDeleteItemL(TSmlDbItemUid, TRequestStatus &)
    pure virtual const MSmlDataItemUidSet &DoDeletedItems()
    pure virtual TBool DoHasSyncHistory()
    pure virtual TInt DoMaxObjectSize()
    pure virtual const MSmlDataItemUidSet &DoModifiedItems()
    pure virtual voidDoMoveItemL(TSmlDbItemUid, TSmlDbItemUid, TRequestStatus &)
    pure virtual const MSmlDataItemUidSet &DoMovedItems()
    pure virtual voidDoOpenItemL(TSmlDbItemUid, TBool &, TInt &, TSmlDbItemUid &, TDes8 &, TDes8 &, TRequestStatus &)
    pure virtual voidDoOpenL(const TDesC &, MSmlSyncRelationship &, TRequestStatus &)
    pure virtual voidDoReadItemL(TDes8 &)
    pure virtual voidDoReplaceItemL(TSmlDbItemUid, TInt, TSmlDbItemUid, TBool, TRequestStatus &)
    pure virtual voidDoResetChangeInfoL(TRequestStatus &)
    pure virtual voidDoRevertTransaction(TRequestStatus &)
    pure virtual voidDoSetRemoteMaxObjectSize(TInt)
    pure virtual voidDoSetRemoteStoreFormatL(const CSmlDataStoreFormat &)
    pure virtual voidDoSoftDeleteItemL(TSmlDbItemUid, TRequestStatus &)
    pure virtual const MSmlDataItemUidSet &DoSoftDeletedItems()
    pure virtual const TDesC &DoStoreName()
    pure virtual voidDoWriteItemL(const TDesC8 &)
    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()

    Detailed Description

    Data Store interface.

    Member Function Documentation

    AddedItems ( )

    IMPORT_C const MSmlDataItemUidSet &AddedItems()const

    BeginBatchL ( )

    IMPORT_C voidBeginBatchL()

    BeginBatchL() starts the batch mode. During this mode calls to CreateItemL, ReplaceItemL, WriteItemL, CommitItemL, MoveItemL, DeleteItemL and SoftDeleteItemL will be part of this batch. Their RequestStatus must be completed with KErrNone, which only signals acceptance of the operation for batch processing.

    BeginTransactionL ( )

    IMPORT_C voidBeginTransactionL()

    BeginTransactionL() starts the transaction mode. During this mode calls to CreateItemL, ReplaceItemL, WriteItemL, CommitItemL, MoveItemL, DeleteItemL and SoftDeleteItemL will be part of this transaction. Their RequestStatus must be completed, even if the change is not yet really executed in the Data Store. If a RequestStatus is completed with an error code, the transaction has failed and a rollback must be done. In this case RevertTransaction will be called.

    CancelBatch ( )

    IMPORT_C voidCancelBatch()

    CancelBatch() will be called to abort an ongoing batch mode. None of the operations already submitted may be applied to the Data Store.

    CancelRequest ( )

    IMPORT_C voidCancelRequest()

    Cancel the current asynchronous request, including open. Only one asynchronous request may be outstanding at any one time.

    CloseItem ( )

    IMPORT_C voidCloseItem()

    CommitBatchL ( RArray< TInt > &, TRequestStatus & )

    IMPORT_C voidCommitBatchL(RArray< TInt > &aResultArray,
    TRequestStatus &aStatus
    )

    CommitBatchL() will be called at the end of the batch mode. This tells the Data Store to process the batched operations (in the order they were submitted), and to append the error code for each operation to aResultArray. The error codes in aResultArray are only valid if the RequestStatus is completed with KErrNone. If the RequestStatus is completed with an error code none of the operations in the batch mode were applied to the Data Store.

    CommitChangeInfoL ( TRequestStatus &, const MSmlDataItemUidSet & )

    IMPORT_C voidCommitChangeInfoL(TRequestStatus &aStatus,
    const MSmlDataItemUidSet &aItems
    )

    CommitChangeInfoL ( TRequestStatus & )

    IMPORT_C voidCommitChangeInfoL(TRequestStatus &aStatus)

    CommitItemL ( TRequestStatus & )

    IMPORT_C voidCommitItemL(TRequestStatus &aStatus)

    CommitTransactionL ( TRequestStatus & )

    IMPORT_C voidCommitTransactionL(TRequestStatus &aStatus)

    CommitTransactionL() will be called at the end of a successful transaction. At this point in time the operations within the transaction are applied to the Data Store in an atomic way. If all operations succeed, the RequestStatus must be completed with KErrNone. If an operation fails, a rollback must be done and the RequestStatus must be completed with an appropriate error code.

    CreateItemL ( TSmlDbItemUid &, TInt, TSmlDbItemUid, const TDesC8 &, const TDesC8 &, TRequestStatus & )

    IMPORT_C voidCreateItemL(TSmlDbItemUid &aUid,
    TIntaSize,
    TSmlDbItemUidaParent,
    const TDesC8 &aMimeType,
    const TDesC8 &aMimeVer,
    TRequestStatus &aStatus
    )

    DeleteAllItemsL ( TRequestStatus & )

    IMPORT_C voidDeleteAllItemsL(TRequestStatus &aStatus)

    DeleteItemL ( TSmlDbItemUid, TRequestStatus & )

    IMPORT_C voidDeleteItemL(TSmlDbItemUidaUid,
    TRequestStatus &aStatus
    )

    DeletedItems ( )

    IMPORT_C const MSmlDataItemUidSet &DeletedItems()const

    DoAddedItems ( )

    const MSmlDataItemUidSet &DoAddedItems()const [protected, pure virtual]

    DoBeginBatchL ( )

    voidDoBeginBatchL()[protected, pure virtual]

    DoBeginTransactionL ( )

    voidDoBeginTransactionL()[protected, pure virtual]

    DoCancelBatch ( )

    voidDoCancelBatch()[protected, pure virtual]

    DoCancelRequest ( )

    voidDoCancelRequest()[protected, pure virtual]

    DoCloseItem ( )

    voidDoCloseItem()[protected, pure virtual]

    DoCommitBatchL ( RArray< TInt > &, TRequestStatus & )

    voidDoCommitBatchL(RArray< TInt > &aResultArray,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoCommitChangeInfoL ( TRequestStatus &, const MSmlDataItemUidSet & )

    voidDoCommitChangeInfoL(TRequestStatus &aStatus,
    const MSmlDataItemUidSet &aItems
    )[protected, pure virtual]

    DoCommitChangeInfoL ( TRequestStatus & )

    voidDoCommitChangeInfoL(TRequestStatus &aStatus)[protected, pure virtual]

    DoCommitItemL ( TRequestStatus & )

    voidDoCommitItemL(TRequestStatus &aStatus)[protected, pure virtual]

    DoCommitTransactionL ( TRequestStatus & )

    voidDoCommitTransactionL(TRequestStatus &aStatus)[protected, pure virtual]

    DoCreateItemL ( TSmlDbItemUid &, TInt, TSmlDbItemUid, const TDesC8 &, const TDesC8 &, TRequestStatus & )

    voidDoCreateItemL(TSmlDbItemUid &aUid,
    TIntaSize,
    TSmlDbItemUidaParent,
    const TDesC8 &aMimeType,
    const TDesC8 &aMimeVer,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoDeleteAllItemsL ( TRequestStatus & )

    voidDoDeleteAllItemsL(TRequestStatus &aStatus)[protected, pure virtual]

    DoDeleteItemL ( TSmlDbItemUid, TRequestStatus & )

    voidDoDeleteItemL(TSmlDbItemUidaUid,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoDeletedItems ( )

    const MSmlDataItemUidSet &DoDeletedItems()const [protected, pure virtual]

    DoHasSyncHistory ( )

    TBool DoHasSyncHistory()const [protected, pure virtual]

    DoMaxObjectSize ( )

    TInt DoMaxObjectSize()const [protected, pure virtual]

    DoModifiedItems ( )

    const MSmlDataItemUidSet &DoModifiedItems()const [protected, pure virtual]

    DoMoveItemL ( TSmlDbItemUid, TSmlDbItemUid, TRequestStatus & )

    voidDoMoveItemL(TSmlDbItemUidaUid,
    TSmlDbItemUidaNewParent,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoMovedItems ( )

    const MSmlDataItemUidSet &DoMovedItems()const [protected, pure virtual]

    DoOpenItemL ( TSmlDbItemUid, TBool &, TInt &, TSmlDbItemUid &, TDes8 &, TDes8 &, TRequestStatus & )

    voidDoOpenItemL(TSmlDbItemUidaUid,
    TBool &aFieldChange,
    TInt &aSize,
    TSmlDbItemUid &aParent,
    TDes8 &aMimeType,
    TDes8 &aMimeVer,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoOpenL ( const TDesC &, MSmlSyncRelationship &, TRequestStatus & )

    voidDoOpenL(const TDesC &aStoreName,
    MSmlSyncRelationship &aContext,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoReadItemL ( TDes8 & )

    voidDoReadItemL(TDes8 &aBuffer)[protected, pure virtual]

    DoReplaceItemL ( TSmlDbItemUid, TInt, TSmlDbItemUid, TBool, TRequestStatus & )

    voidDoReplaceItemL(TSmlDbItemUidaUid,
    TIntaSize,
    TSmlDbItemUidaParent,
    TBoolaFieldChange,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoResetChangeInfoL ( TRequestStatus & )

    voidDoResetChangeInfoL(TRequestStatus &aStatus)[protected, pure virtual]

    DoRevertTransaction ( TRequestStatus & )

    voidDoRevertTransaction(TRequestStatus &aStatus)[protected, pure virtual]

    DoSetRemoteMaxObjectSize ( TInt )

    voidDoSetRemoteMaxObjectSize(TIntaServerMaxObjectSize)[protected, pure virtual]

    DoSetRemoteStoreFormatL ( const CSmlDataStoreFormat & )

    voidDoSetRemoteStoreFormatL(const CSmlDataStoreFormat &aServerDataStoreFormat)[protected, pure virtual]

    DoSoftDeleteItemL ( TSmlDbItemUid, TRequestStatus & )

    voidDoSoftDeleteItemL(TSmlDbItemUidaUid,
    TRequestStatus &aStatus
    )[protected, pure virtual]

    DoSoftDeletedItems ( )

    const MSmlDataItemUidSet &DoSoftDeletedItems()const [protected, pure virtual]

    DoStoreName ( )

    const TDesC &DoStoreName()const [protected, pure virtual]

    DoWriteItemL ( const TDesC8 & )

    voidDoWriteItemL(const TDesC8 &aData)[protected, pure virtual]

    HasSyncHistory ( )

    IMPORT_C TBoolHasSyncHistory()const

    MaxObjectSize ( )

    IMPORT_C TIntMaxObjectSize()const

    Gets the Data Store maximum object size which is reported to the SyncML server. 0 means there is no limit.

    ModifiedItems ( )

    IMPORT_C const MSmlDataItemUidSet &ModifiedItems()const

    MoveItemL ( TSmlDbItemUid, TSmlDbItemUid, TRequestStatus & )

    IMPORT_C voidMoveItemL(TSmlDbItemUidaUid,
    TSmlDbItemUidaNewParent,
    TRequestStatus &aStatus
    )

    MovedItems ( )

    IMPORT_C const MSmlDataItemUidSet &MovedItems()const

    OpenItemL ( TSmlDbItemUid, TBool &, TInt &, TSmlDbItemUid &, TDes8 &, TDes8 &, TRequestStatus & )

    IMPORT_C voidOpenItemL(TSmlDbItemUidaUid,
    TBool &aFieldChange,
    TInt &aSize,
    TSmlDbItemUid &aParent,
    TDes8 &aMimeType,
    TDes8 &aMimeVer,
    TRequestStatus &aStatus
    )

    OpenL ( const TDesC &, MSmlSyncRelationship &, TRequestStatus & )

    IMPORT_C voidOpenL(const TDesC &aStoreName,
    MSmlSyncRelationship &aContext,
    TRequestStatus &aStatus
    )

    Opens the data store specified by aStoreName asynchronously.

    ParameterDescription
    aStoreNameThe name of the data store to open.
    aContextIdentifies the specific synchronisation relationship to use for the synchronisation.
    aStatusOn completion of the open, contains the result code.

    ReadItemL ( TDes8 & )

    IMPORT_C voidReadItemL(TDes8 &aBuffer)

    ReplaceItemL ( TSmlDbItemUid, TInt, TSmlDbItemUid, TBool, TRequestStatus & )

    IMPORT_C voidReplaceItemL(TSmlDbItemUidaUid,
    TIntaSize,
    TSmlDbItemUidaParent,
    TBoolaFieldChange,
    TRequestStatus &aStatus
    )

    ResetChangeInfoL ( TRequestStatus & )

    IMPORT_C voidResetChangeInfoL(TRequestStatus &aStatus)

    RevertTransaction ( TRequestStatus & )

    IMPORT_C voidRevertTransaction(TRequestStatus &aStatus)

    RevertTransaction() will be called to abort an ongoing transaction. None of the operations already submitted may be applied to the Data Store. The RequestStatus must be completed with KErrNone as a revert cannot fail.

    SetRemoteMaxObjectSize ( TInt )

    IMPORT_C voidSetRemoteMaxObjectSize(TIntaServerMaxObjectSize)

    Sets the SyncML server maximum object size - this may optionally be used by the Data Provider to not send items to the server exceeding its maximum size. 0 means there is no limit.

    SetRemoteStoreFormatL ( const CSmlDataStoreFormat & )

    IMPORT_C voidSetRemoteStoreFormatL(const CSmlDataStoreFormat &aServerDataStoreFormat)

    Sets the SyncML server Data Format - this may optionally be used by the Data Provider to filter out properties that the server does not support, and should be used to avoid deleting these properties in case the server sends a changed item to the Data Provider

    SoftDeleteItemL ( TSmlDbItemUid, TRequestStatus & )

    IMPORT_C voidSoftDeleteItemL(TSmlDbItemUidaUid,
    TRequestStatus &aStatus
    )

    SoftDeletedItems ( )

    IMPORT_C const MSmlDataItemUidSet &SoftDeletedItems()const

    StoreName ( )

    IMPORT_C const TDesC &StoreName()const

    Returns the name of the open data store.

    WriteItemL ( const TDesC8 & )

    IMPORT_C voidWriteItemL(const TDesC8 &aData)