CMsvServerEntry Class Reference

class CMsvServerEntry : public CActive

Accesses and acts upon a particular Message Server entry.

It provides similar functionality to that which CMsvEntry gives to client-side programs. The current entry that a CMsvServerEntry object relates is similarly referred to as its context.

A difference to note is that CMsvEntry functions, when used on a remote context, can result in requests to Server-side MTMs to change data on a remote server, as well as the local Message Server index. Naturally, as CMsvServerEntry is designed to be used by Server-side MTMs themselves, its comparable functions only alter the Message Server index.

A CBaseServerMTM-derived object gets an initial CMsvServerEntry on construction. It can get further CMsvServerEntry objects by calling NewEntryL(). The context can be changed by SetEntry().

The context is locked, preventing it being accessed by other MTMs. The lock is released when the object is deleted, or the context changes.

As with CMsvEntry, CBaseServerMTM functions can be divided into two broad groups. The first provides means to access the various types of storage associated with an entry. The second provides a means to discover and access other entries that the entry owns (its children).

Inherits from

Public Member Functions
~CMsvServerEntry()
IMPORT_C TIntChangeAttributes(const CMsvEntrySelection &, TUint, TUint)
IMPORT_C TIntChangeEntry(const TMsvEntry &, TSecureId)
IMPORT_C TIntChangeEntry(const TMsvEntry &)
IMPORT_C TIntChangeEntryBulk(const TMsvEntry &, TSecureId)
IMPORT_C TIntChangeEntryBulk(const TMsvEntry &)
IMPORT_C voidCompleteBulk()
IMPORT_C voidCopyEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)
IMPORT_C voidCopyEntriesL(const CMsvEntrySelection &, TMsvId, CMsvEntrySelection &, TRequestStatus &)
IMPORT_C voidCopyEntryL(TMsvId, TMsvId, TRequestStatus &)
IMPORT_C voidCopyEntryL(TMsvId, TMsvId, TMsvId &, TRequestStatus &)
IMPORT_C TIntCreateEntry(TMsvEntry &)
IMPORT_C TIntCreateEntry(TMsvEntry &, TSecureId)
IMPORT_C TIntCreateEntry(TMsvEntry &, TSecureId, TBool)
IMPORT_C TIntCreateEntryBulk(TMsvEntry &, TSecureId)
IMPORT_C TIntCreateEntryBulk(TMsvEntry &)
IMPORT_C TIntDeleteEntries(CMsvEntrySelection &)
IMPORT_C TIntDeleteEntry(TMsvId)
IMPORT_C CMsvStore *EditStoreL()
const TMsvEntry &Entry()
IMPORT_C RFs &FileSession()
IMPORT_C TIntGetChildren(CMsvEntrySelection &)
IMPORT_C TIntGetChildrenWithMtm(TUid, CMsvEntrySelection &)
IMPORT_C TIntGetChildrenWithService(TMsvId, CMsvEntrySelection &)
IMPORT_C TIntGetChildrenWithType(TUid, CMsvEntrySelection &)
IMPORT_C TIntGetEntryFromId(TMsvId, TMsvEntry *&)
voidHandleStoreEvent(MMsvStoreObserver::TMsvStoreEvent, TMsvId)
IMPORT_C TBoolHasStoreL()
IMPORT_C voidMoveEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)
IMPORT_C TIntMoveEntriesWithinService(CMsvEntrySelection &, TMsvId)
IMPORT_C voidMoveEntryL(TMsvId, TMsvId, TRequestStatus &)
IMPORT_C TIntMoveEntryWithinService(TMsvId, TMsvId)
IMPORT_C CMsvServerEntry *NewEntryL(TMsvId)
IMPORT_C CMsvServerEntry *NewL(CMsvServer &, TMsvId)
IMPORT_C TMsvIdOwningService()
IMPORT_C CMsvStore *ReadStoreL()
IMPORT_C TIntSetEntry(TMsvId)
voidSetMtm(TUid)
voidSetSort(TMsvSelectionOrdering &)
const TMsvSelectionOrdering &Sort()
Protected Member Functions
CMsvServerEntry(CMsvServer &)
voidConstructL(TMsvId)
voidDoCancel()
voidRunL()
Private Member Functions
TBool AreChildren(const CMsvEntrySelection &)
TInt DoChangeEntry(const TMsvEntry &, TSecureId, TBool, TBool)
voidDoCopyEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)
voidDoDeleteEntriesL(CMsvEntrySelection &, CMsvEntrySelection *&, CMsvEntrySelection *&)
voidDoDeleteEntryL(TMsvId, CMsvEntrySelection *&, CMsvEntrySelection *&)
TInt DoGetChildren(TMsvId, TUid, TUid, CMsvEntrySelection &)
voidDoGetChildrenL(TMsvId, TUid, TUid, CMsvEntrySelection &)
voidDoMoveEntriesL(CMsvEntrySelection &, TMsvId, CMsvEntrySelection *&)
voidDoMoveEntryL(TMsvId, TMsvId)
TInt IncreaseBufferSizes(TInt, TInt)
TBool IsAChild(TMsvId)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Inherited Enumerations
CActive:TPriority
Private Attributes
TMsvId *iCompletedEntryId
CMsvEntrySelection *iCompletedSelection
TSecureId iContextOwnerId
CMsvCopyMoveEntriesBase *iCopyMove
HBufC *iDescription
HBufC *iDetails
TMsvEntry iEntry
enum CMsvServerEntry::@230iEntryState
TBool iLockedStore
TUid iMtm
TRequestStatus *iObserverStatus
TMsvSelectionOrdering iOrdering
CMsvServer &iServer
TMsvId iSource
CMsvStore *iStore
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CMsvServerEntry(CMsvServer &)

CMsvServerEntry(CMsvServer &aIndex)[protected]

Parameters

CMsvServer & aIndex

~CMsvServerEntry()

~CMsvServerEntry()

Member Functions Documentation

AreChildren(const CMsvEntrySelection &)

TBool AreChildren(const CMsvEntrySelection &aSelection)const [private]

Parameters

const CMsvEntrySelection & aSelection

ChangeAttributes(const CMsvEntrySelection &, TUint, TUint)

IMPORT_C TIntChangeAttributes(const CMsvEntrySelection &aSelection,
TUintaSetAttributes,
TUintaClearAttributes
)

Parameters

const CMsvEntrySelection & aSelection
TUint aSetAttributes
TUint aClearAttributes

ChangeEntry(const TMsvEntry &, TSecureId)

IMPORT_C TIntChangeEntry(const TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId

ChangeEntry(const TMsvEntry &)

IMPORT_C TIntChangeEntry(const TMsvEntry &aEntry)

Parameters

const TMsvEntry & aEntry

ChangeEntryBulk(const TMsvEntry &, TSecureId)

IMPORT_C TIntChangeEntryBulk(const TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId

ChangeEntryBulk(const TMsvEntry &)

IMPORT_C TIntChangeEntryBulk(const TMsvEntry &aEntry)

Parameters

const TMsvEntry & aEntry

CompleteBulk()

IMPORT_C voidCompleteBulk()

ConstructL(TMsvId)

voidConstructL(TMsvIdaId)[protected]

Parameters

TMsvId aId

CopyEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)

IMPORT_C voidCopyEntriesL(const CMsvEntrySelection &aSelection,
TMsvIdaDestination,
TRequestStatus &aObserverStatus
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aDestination
TRequestStatus & aObserverStatus

CopyEntriesL(const CMsvEntrySelection &, TMsvId, CMsvEntrySelection &, TRequestStatus &)

IMPORT_C voidCopyEntriesL(const CMsvEntrySelection &aSelection,
TMsvIdaDestination,
CMsvEntrySelection &aCompletedSelection,
TRequestStatus &aObserverStatus
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aDestination
CMsvEntrySelection & aCompletedSelection
TRequestStatus & aObserverStatus

CopyEntryL(TMsvId, TMsvId, TRequestStatus &)

IMPORT_C voidCopyEntryL(TMsvIdaId,
TMsvIdaDestination,
TRequestStatus &aObserverStatus
)

Parameters

TMsvId aId
TMsvId aDestination
TRequestStatus & aObserverStatus

CopyEntryL(TMsvId, TMsvId, TMsvId &, TRequestStatus &)

IMPORT_C voidCopyEntryL(TMsvIdaId,
TMsvIdaDestination,
TMsvId &aCompletedEntry,
TRequestStatus &aObserverStatus
)

Parameters

TMsvId aId
TMsvId aDestination
TMsvId & aCompletedEntry
TRequestStatus & aObserverStatus

CreateEntry(TMsvEntry &)

IMPORT_C TIntCreateEntry(TMsvEntry &aEntry)

Parameters

TMsvEntry & aEntry

CreateEntry(TMsvEntry &, TSecureId)

IMPORT_C TIntCreateEntry(TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

TMsvEntry & aEntry
TSecureId aOwnerId

CreateEntry(TMsvEntry &, TSecureId, TBool)

IMPORT_C TIntCreateEntry(TMsvEntry &aEntry,
TSecureIdaOwnerId,
TBoolaBulk
)

Parameters

TMsvEntry & aEntry
TSecureId aOwnerId
TBool aBulk

CreateEntryBulk(TMsvEntry &, TSecureId)

IMPORT_C TIntCreateEntryBulk(TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

TMsvEntry & aEntry
TSecureId aOwnerId

CreateEntryBulk(TMsvEntry &)

IMPORT_C TIntCreateEntryBulk(TMsvEntry &aEntry)

Parameters

TMsvEntry & aEntry

DeleteEntries(CMsvEntrySelection &)

IMPORT_C TIntDeleteEntries(CMsvEntrySelection &aSelection)

Parameters

CMsvEntrySelection & aSelection

DeleteEntry(TMsvId)

IMPORT_C TIntDeleteEntry(TMsvIdaId)

Parameters

TMsvId aId

DoCancel()

voidDoCancel()[protected, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

CActive::Cancel

DoChangeEntry(const TMsvEntry &, TSecureId, TBool, TBool)

TInt DoChangeEntry(const TMsvEntry &aEntry,
TSecureIdaOwnerId,
TBoolaForcedUpdate,
TBoolaBulk
)[private]

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId
TBool aForcedUpdate
TBool aBulk

DoCopyEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)

voidDoCopyEntriesL(const CMsvEntrySelection &aSelection,
TMsvIdaDestination,
TRequestStatus &aObserverStatus
)[private]

Parameters

const CMsvEntrySelection & aSelection
TMsvId aDestination
TRequestStatus & aObserverStatus

DoDeleteEntriesL(CMsvEntrySelection &, CMsvEntrySelection *&, CMsvEntrySelection *&)

voidDoDeleteEntriesL(CMsvEntrySelection &aSelection,
CMsvEntrySelection *&aDeleted,
CMsvEntrySelection *&aMoved
)[private]

Parameters

CMsvEntrySelection & aSelection
CMsvEntrySelection *& aDeleted
CMsvEntrySelection *& aMoved

DoDeleteEntryL(TMsvId, CMsvEntrySelection *&, CMsvEntrySelection *&)

voidDoDeleteEntryL(TMsvIdaId,
CMsvEntrySelection *&aDeleted,
CMsvEntrySelection *&aMoved
)[private]

Parameters

TMsvId aId
CMsvEntrySelection *& aDeleted
CMsvEntrySelection *& aMoved

DoGetChildren(TMsvId, TUid, TUid, CMsvEntrySelection &)

TInt DoGetChildren(TMsvIdaServiceId,
TUidaMtm,
TUidaType,
CMsvEntrySelection &aSelection
)[private]

Parameters

TMsvId aServiceId
TUid aMtm
TUid aType
CMsvEntrySelection & aSelection

DoGetChildrenL(TMsvId, TUid, TUid, CMsvEntrySelection &)

voidDoGetChildrenL(TMsvIdaServiceId,
TUidaMtm,
TUidaType,
CMsvEntrySelection &aSelection
)[private]

Parameters

TMsvId aServiceId
TUid aMtm
TUid aType
CMsvEntrySelection & aSelection

DoMoveEntriesL(CMsvEntrySelection &, TMsvId, CMsvEntrySelection *&)

voidDoMoveEntriesL(CMsvEntrySelection &aSelection,
TMsvIdaDestination,
CMsvEntrySelection *&aMoved
)[private]

Parameters

CMsvEntrySelection & aSelection
TMsvId aDestination
CMsvEntrySelection *& aMoved

DoMoveEntryL(TMsvId, TMsvId)

voidDoMoveEntryL(TMsvIdaId,
TMsvIdaDestination
)[private]

Parameters

TMsvId aId
TMsvId aDestination

EditStoreL()

IMPORT_C CMsvStore *EditStoreL()

Entry()

const TMsvEntry &Entry()const [inline]

Gets the context's index entry.

The current entry

FileSession()

IMPORT_C RFs &FileSession()

GetChildren(CMsvEntrySelection &)

IMPORT_C TIntGetChildren(CMsvEntrySelection &aSelection)

Parameters

CMsvEntrySelection & aSelection

GetChildrenWithMtm(TUid, CMsvEntrySelection &)

IMPORT_C TIntGetChildrenWithMtm(TUidaMtm,
CMsvEntrySelection &aSelection
)

Parameters

TUid aMtm
CMsvEntrySelection & aSelection

GetChildrenWithService(TMsvId, CMsvEntrySelection &)

IMPORT_C TIntGetChildrenWithService(TMsvIdaServiceId,
CMsvEntrySelection &aSelection
)

Parameters

TMsvId aServiceId
CMsvEntrySelection & aSelection

GetChildrenWithType(TUid, CMsvEntrySelection &)

IMPORT_C TIntGetChildrenWithType(TUidaType,
CMsvEntrySelection &aSelection
)

Parameters

TUid aType
CMsvEntrySelection & aSelection

GetEntryFromId(TMsvId, TMsvEntry *&)

IMPORT_C TIntGetEntryFromId(TMsvIdaId,
TMsvEntry *&aEntry
)

Parameters

TMsvId aId
TMsvEntry *& aEntry

HandleStoreEvent(MMsvStoreObserver::TMsvStoreEvent, TMsvId)

voidHandleStoreEvent(MMsvStoreObserver::TMsvStoreEventaEvent,
TMsvIdaId
)

HasStoreL()

IMPORT_C TBoolHasStoreL()const

IncreaseBufferSizes(TInt, TInt)

TInt IncreaseBufferSizes(TIntaNewDescriptionSize,
TIntaNewDetailsSize
)[private]

Parameters

TInt aNewDescriptionSize
TInt aNewDetailsSize

IsAChild(TMsvId)

TBool IsAChild(TMsvIdaId)const [private]

Parameters

TMsvId aId

MoveEntriesL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)

IMPORT_C voidMoveEntriesL(const CMsvEntrySelection &aSelection,
TMsvIdaDestination,
TRequestStatus &aObserverStatus
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aDestination
TRequestStatus & aObserverStatus

MoveEntriesWithinService(CMsvEntrySelection &, TMsvId)

IMPORT_C TIntMoveEntriesWithinService(CMsvEntrySelection &aSelection,
TMsvIdaDestination
)

Parameters

CMsvEntrySelection & aSelection
TMsvId aDestination

MoveEntryL(TMsvId, TMsvId, TRequestStatus &)

IMPORT_C voidMoveEntryL(TMsvIdaId,
TMsvIdaDestination,
TRequestStatus &aObserverStatus
)

Parameters

TMsvId aId
TMsvId aDestination
TRequestStatus & aObserverStatus

MoveEntryWithinService(TMsvId, TMsvId)

IMPORT_C TIntMoveEntryWithinService(TMsvIdaId,
TMsvIdaDestination
)

Parameters

TMsvId aId
TMsvId aDestination

NewEntryL(TMsvId)

IMPORT_C CMsvServerEntry *NewEntryL(TMsvIdaId)

Parameters

TMsvId aId

NewL(CMsvServer &, TMsvId)

IMPORT_C CMsvServerEntry *NewL(CMsvServer &aServer,
TMsvIdaId
)[static]

Parameters

CMsvServer & aServer
TMsvId aId

OwningService()

IMPORT_C TMsvIdOwningService()const

ReadStoreL()

IMPORT_C CMsvStore *ReadStoreL()

RunL()

voidRunL()[protected, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start

CActiveScheduler::Error

CActiveScheduler::WaitForAnyRequest

TRAPD

SetEntry(TMsvId)

IMPORT_C TIntSetEntry(TMsvIdaId)

Parameters

TMsvId aId

SetMtm(TUid)

voidSetMtm(TUidaMtm)[inline]

Sets this MTM sorting type to specified UID. When children of an entry are sorted, entries belonging to the same MTM type can be grouped together.

Parameters

TUid aMtmUID of MTM for sort

SetSort(TMsvSelectionOrdering &)

voidSetSort(TMsvSelectionOrdering &aOrdering)[inline]

Sets the sort order that is used when listing children, for example with GetChildren().

Parameters

TMsvSelectionOrdering & aOrderingSort order to use

Sort()

const TMsvSelectionOrdering &Sort()[inline]

Gets the current sort order of children of the entry.

Current sort type

Member Data Documentation

TMsvId * iCompletedEntryId

TMsvId *iCompletedEntryId[private]

CMsvEntrySelection * iCompletedSelection

CMsvEntrySelection *iCompletedSelection[private]

TSecureId iContextOwnerId

TSecureId iContextOwnerId[private]

CMsvCopyMoveEntriesBase * iCopyMove

CMsvCopyMoveEntriesBase *iCopyMove[private]

HBufC * iDescription

HBufC *iDescription[private]

HBufC * iDetails

HBufC *iDetails[private]

TMsvEntry iEntry

TMsvEntry iEntry[private]

enum CMsvServerEntry::@230 iEntryState

enum CMsvServerEntry::@230iEntryState[private]

TBool iLockedStore

TBool iLockedStore[private]

TUid iMtm

TUid iMtm[private]

TRequestStatus * iObserverStatus

TRequestStatus *iObserverStatus[private]

TMsvSelectionOrdering iOrdering

TMsvSelectionOrdering iOrdering[private]

CMsvServer & iServer

CMsvServer &iServer[private]

TMsvId iSource

TMsvId iSource[private]

CMsvStore * iStore

CMsvStore *iStore[private]