CRepository Class Reference

class CRepository : public CBase

Provides access to a repository.

There are potentially 2^32 repositories, each identified by a UID. Within each repository up to 2^32 settings can be stored. Settings within a repository are identified by a 32-bit key and may be of the types integer, real or descriptor.

Inherits from

Public Member Functions
~CRepository()
IMPORT_C voidCancelTransaction()
IMPORT_C voidCleanupCancelTransactionPushL()
IMPORT_C voidCleanupFailTransactionPushL()
voidCleanupRollbackTransactionPushL()
IMPORT_C TIntCommitTransaction(TUint32 &)
IMPORT_C voidCommitTransaction(TDes8 &, TRequestStatus &)
IMPORT_C TIntCreate(TUint32, TInt)
IMPORT_C TIntCreate(TUint32, const TReal &)
IMPORT_C TIntCreate(TUint32, const TDesC8 &)
IMPORT_C TIntCreate(TUint32, const TDesC16 &)
IMPORT_C TIntDelete(TUint32)
IMPORT_C TIntDelete(TUint32, TUint32, TUint32 &)
IMPORT_C voidFailTransaction()
IMPORT_C TIntFindEqL(TUint32, TUint32, TInt, RArray< TUint32 > &)
IMPORT_C TIntFindEqL(TUint32, TUint32, const TReal &, RArray< TUint32 > &)
IMPORT_C TIntFindEqL(TUint32, TUint32, const TDesC8 &, RArray< TUint32 > &)
IMPORT_C TIntFindEqL(TUint32, TUint32, const TDesC16 &, RArray< TUint32 > &)
IMPORT_C TIntFindL(TUint32, TUint32, RArray< TUint32 > &)
IMPORT_C TIntFindNeqL(TUint32, TUint32, TInt, RArray< TUint32 > &)
IMPORT_C TIntFindNeqL(TUint32, TUint32, const TReal &, RArray< TUint32 > &)
IMPORT_C TIntFindNeqL(TUint32, TUint32, const TDesC8 &, RArray< TUint32 > &)
IMPORT_C TIntFindNeqL(TUint32, TUint32, const TDesC16 &, RArray< TUint32 > &)
IMPORT_C TIntGet(TUint32, TInt &)
IMPORT_C TIntGet(TUint32, TReal &)
IMPORT_C TIntGet(TUint32, TDes8 &)
IMPORT_C TIntGet(TUint32, TDes8 &, TInt &)
IMPORT_C TIntGet(TUint32, TDes16 &)
IMPORT_C TIntGet(TUint32, TDes16 &, TInt &)
IMPORT_C TIntGetMeta(TUint32, TUint32 &)
IMPORT_C TIntMove(TUint32, TUint32, TUint32, TUint32 &)
IMPORT_C CRepository *NewL(TUid)
IMPORT_C CRepository *NewLC(TUid)
IMPORT_C TIntNotifyCancel(TUint32)
IMPORT_C TIntNotifyCancel(TUint32, TUint32)
IMPORT_C TIntNotifyCancelAll()
IMPORT_C TIntNotifyRequest(TUint32, TRequestStatus &)
IMPORT_C TIntNotifyRequest(TUint32, TUint32, TRequestStatus &)
IMPORT_C TIntReset()
IMPORT_C TIntReset(TUint32)
voidRollbackTransaction()
IMPORT_C TIntSet(TUint32, TInt)
IMPORT_C TIntSet(TUint32, const TReal &)
IMPORT_C TIntSet(TUint32, const TDesC8 &)
IMPORT_C TIntSet(TUint32, const TDesC16 &)
IMPORT_C TIntStartTransaction(TTransactionMode)
IMPORT_C voidStartTransaction(TTransactionMode, TRequestStatus &)
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()
Public Member Enumerations
enumTTransactionMode { EConcurrentReadWriteTransaction = 2, EReadTransaction = 1, EReadWriteTransaction = 3 }
Public Member Type Definitions
typedef TPckgBuf< TUint32 > TTransactionKeyInfoBuf

Constructor & Destructor Documentation

~CRepository()

IMPORT_C~CRepository()[virtual]

Member Functions Documentation

CancelTransaction()

IMPORT_C voidCancelTransaction()

CleanupCancelTransactionPushL()

IMPORT_C voidCleanupCancelTransactionPushL()

CleanupFailTransactionPushL()

IMPORT_C voidCleanupFailTransactionPushL()

CleanupRollbackTransactionPushL()

voidCleanupRollbackTransactionPushL()[inline]

Same as CleanupCancelTransactionPushL. CleanupCancelTransactionPushL

CommitTransaction(TUint32 &)

IMPORT_C TIntCommitTransaction(TUint32 &aKeyInfo)

Parameters

TUint32 & aKeyInfo

CommitTransaction(TDes8 &, TRequestStatus &)

IMPORT_C voidCommitTransaction(TDes8 &aKeyInfo,
TRequestStatus &aStatus
)

Parameters

TDes8 & aKeyInfo
TRequestStatus & aStatus

Create(TUint32, TInt)

IMPORT_C TIntCreate(TUint32aKey,
TIntaValue
)

Parameters

TUint32 aKey
TInt aValue

Create(TUint32, const TReal &)

IMPORT_C TIntCreate(TUint32aKey,
const TReal &aValue
)

Parameters

TUint32 aKey
const TReal & aValue

Create(TUint32, const TDesC8 &)

IMPORT_C TIntCreate(TUint32aKey,
const TDesC8 &aValue
)

Parameters

TUint32 aKey
const TDesC8 & aValue

Create(TUint32, const TDesC16 &)

IMPORT_C TIntCreate(TUint32aKey,
const TDesC16 &aValue
)

Parameters

TUint32 aKey
const TDesC16 & aValue

Delete(TUint32)

IMPORT_C TIntDelete(TUint32aKey)

Parameters

TUint32 aKey

Delete(TUint32, TUint32, TUint32 &)

IMPORT_C TIntDelete(TUint32aPartialKey,
TUint32aMask,
TUint32 &aErrorKey
)

Parameters

TUint32 aPartialKey
TUint32 aMask
TUint32 & aErrorKey

FailTransaction()

IMPORT_C voidFailTransaction()

FindEqL(TUint32, TUint32, TInt, RArray< TUint32 > &)

IMPORT_C TIntFindEqL(TUint32aPartialKey,
TUint32aMask,
TIntaValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
TInt aValue
RArray< TUint32 > & aFoundKeys

FindEqL(TUint32, TUint32, const TReal &, RArray< TUint32 > &)

IMPORT_C TIntFindEqL(TUint32aPartialKey,
TUint32aMask,
const TReal &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TReal & aValue
RArray< TUint32 > & aFoundKeys

FindEqL(TUint32, TUint32, const TDesC8 &, RArray< TUint32 > &)

IMPORT_C TIntFindEqL(TUint32aPartialKey,
TUint32aMask,
const TDesC8 &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TDesC8 & aValue
RArray< TUint32 > & aFoundKeys

FindEqL(TUint32, TUint32, const TDesC16 &, RArray< TUint32 > &)

IMPORT_C TIntFindEqL(TUint32aPartialKey,
TUint32aMask,
const TDesC16 &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TDesC16 & aValue
RArray< TUint32 > & aFoundKeys

FindL(TUint32, TUint32, RArray< TUint32 > &)

IMPORT_C TIntFindL(TUint32aPartialKey,
TUint32aMask,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
RArray< TUint32 > & aFoundKeys

FindNeqL(TUint32, TUint32, TInt, RArray< TUint32 > &)

IMPORT_C TIntFindNeqL(TUint32aPartialKey,
TUint32aMask,
TIntaValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
TInt aValue
RArray< TUint32 > & aFoundKeys

FindNeqL(TUint32, TUint32, const TReal &, RArray< TUint32 > &)

IMPORT_C TIntFindNeqL(TUint32aPartialKey,
TUint32aMask,
const TReal &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TReal & aValue
RArray< TUint32 > & aFoundKeys

FindNeqL(TUint32, TUint32, const TDesC8 &, RArray< TUint32 > &)

IMPORT_C TIntFindNeqL(TUint32aPartialKey,
TUint32aMask,
const TDesC8 &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TDesC8 & aValue
RArray< TUint32 > & aFoundKeys

FindNeqL(TUint32, TUint32, const TDesC16 &, RArray< TUint32 > &)

IMPORT_C TIntFindNeqL(TUint32aPartialKey,
TUint32aMask,
const TDesC16 &aValue,
RArray< TUint32 > &aFoundKeys
)

Parameters

TUint32 aPartialKey
TUint32 aMask
const TDesC16 & aValue
RArray< TUint32 > & aFoundKeys

Get(TUint32, TInt &)

IMPORT_C TIntGet(TUint32aKey,
TInt &aValue
)

Parameters

TUint32 aKey
TInt & aValue

Get(TUint32, TReal &)

IMPORT_C TIntGet(TUint32aKey,
TReal &aValue
)

Parameters

TUint32 aKey
TReal & aValue

Get(TUint32, TDes8 &)

IMPORT_C TIntGet(TUint32aKey,
TDes8 &aValue
)

Parameters

TUint32 aKey
TDes8 & aValue

Get(TUint32, TDes8 &, TInt &)

IMPORT_C TIntGet(TUint32aId,
TDes8 &aValue,
TInt &aActualLength
)

Parameters

TUint32 aId
TDes8 & aValue
TInt & aActualLength

Get(TUint32, TDes16 &)

IMPORT_C TIntGet(TUint32aKey,
TDes16 &aValue
)

Parameters

TUint32 aKey
TDes16 & aValue

Get(TUint32, TDes16 &, TInt &)

IMPORT_C TIntGet(TUint32aId,
TDes16 &aValue,
TInt &aActualLength
)

Parameters

TUint32 aId
TDes16 & aValue
TInt & aActualLength

GetMeta(TUint32, TUint32 &)

IMPORT_C TIntGetMeta(TUint32aKey,
TUint32 &aMeta
)

Parameters

TUint32 aKey
TUint32 & aMeta

Move(TUint32, TUint32, TUint32, TUint32 &)

IMPORT_C TIntMove(TUint32aSourcePartialKey,
TUint32aTargetPartialKey,
TUint32aMask,
TUint32 &aErrorKey
)

Parameters

TUint32 aSourcePartialKey
TUint32 aTargetPartialKey
TUint32 aMask
TUint32 & aErrorKey

NewL(TUid)

IMPORT_C CRepository *NewL(TUidaRepositoryUid)[static]

Parameters

TUid aRepositoryUid

NewLC(TUid)

IMPORT_C CRepository *NewLC(TUidaRepositoryUid)[static]

Parameters

TUid aRepositoryUid

NotifyCancel(TUint32)

IMPORT_C TIntNotifyCancel(TUint32aKey)

Parameters

TUint32 aKey

NotifyCancel(TUint32, TUint32)

IMPORT_C TIntNotifyCancel(TUint32aPartialKey,
TUint32aMask
)

Parameters

TUint32 aPartialKey
TUint32 aMask

NotifyCancelAll()

IMPORT_C TIntNotifyCancelAll()

NotifyRequest(TUint32, TRequestStatus &)

IMPORT_C TIntNotifyRequest(TUint32aKey,
TRequestStatus &aStatus
)

Parameters

TUint32 aKey
TRequestStatus & aStatus

NotifyRequest(TUint32, TUint32, TRequestStatus &)

IMPORT_C TIntNotifyRequest(TUint32aPartialKey,
TUint32aMask,
TRequestStatus &aStatus
)

Parameters

TUint32 aPartialKey
TUint32 aMask
TRequestStatus & aStatus

Reset()

IMPORT_C TIntReset()

Reset(TUint32)

IMPORT_C TIntReset(TUint32aKey)

Parameters

TUint32 aKey

RollbackTransaction()

voidRollbackTransaction()[inline]

Same as CancelTransaction. CancelTransaction

Set(TUint32, TInt)

IMPORT_C TIntSet(TUint32aKey,
TIntaValue
)

Parameters

TUint32 aKey
TInt aValue

Set(TUint32, const TReal &)

IMPORT_C TIntSet(TUint32aKey,
const TReal &aValue
)

Parameters

TUint32 aKey
const TReal & aValue

Set(TUint32, const TDesC8 &)

IMPORT_C TIntSet(TUint32aKey,
const TDesC8 &aValue
)

Parameters

TUint32 aKey
const TDesC8 & aValue

Set(TUint32, const TDesC16 &)

IMPORT_C TIntSet(TUint32aKey,
const TDesC16 &aValue
)

Parameters

TUint32 aKey
const TDesC16 & aValue

StartTransaction(TTransactionMode)

IMPORT_C TIntStartTransaction(TTransactionModeaMode)

Parameters

TTransactionMode aMode

StartTransaction(TTransactionMode, TRequestStatus &)

IMPORT_C voidStartTransaction(TTransactionModeaMode,
TRequestStatus &aStatus
)

Parameters

TTransactionMode aMode
TRequestStatus & aStatus

Member Enumerations Documentation

Enum TTransactionMode

Transaction mode chosen with StartTransaction.

Enumerators

EConcurrentReadWriteTransaction = 2

Standard optimistic non-serialised transaction. Can be started at any time Commit fails with KErrLocked if another client interrupts it by first committing changes: transaction should be repeated until KErrLocked is not returned.

EReadTransaction = 1

Pessimistic locking transaction intended for reading consistent values. Can only be started if EReadWriteTransaction is not in progress. Automatically promoted to EReadWriteTransaction on first write operation if no other read transaction is in progress (or fails if not attainable). Use ONLY if all clients can agree not to use EConcurrentReadWriteTransaction, and only make changes in an EReadWriteTransaction.

EReadWriteTransaction = 3

Pessimistic locking transaction intended for writing values. Can only be started if no EReadTransaction or EReadWriteTransactions are in progress. Use ONLY if all clients can agree not to use EConcurrentReadWriteTransaction, and only make changes in an EReadWriteTransaction.

Member Type Definitions Documentation

Typedef TTransactionKeyInfoBuf

typedef TPckgBuf< TUint32 >TTransactionKeyInfoBuf

Buffer type for aKeyInfo parameter to asynchronous CommitTransaction. CRepository::CommitTransaction(TDes8& aKeyInfo, TRequestStatus& aStatus)