CMsvEntry Class Reference

class CMsvEntry : public CBase

Accesses and acts upon a particular Message Server entry. The current entry that a CMsvEntry object relates is referred to as its context.

It may be helpful to consider CMsvEntry functions in 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).

Message client applications, Client-side MTMs, and User Interface MTMs all commonly use CMsvEntry objects. CMsvEntry objects though represent a lower level of access to an entry than that provided by a Client-side MTM or User Interface MTM. In particular, any MTM-specific functionality, such as address lists or subject fields, must be accessed by a message client application through an MTM inteface.

A CMsvEntry object is relatively expensive in RAM usage, as it caches its children, updating them as necessary when notified of changes. They should therefore be created sparingly.

Note that Server-side MTMs do not use this class, but a similar one, CMsvServerEntry.

Inherits from

Public Member Functions
~CMsvEntry()
IMPORT_C voidAddObserverL(MMsvEntryObserver &)
IMPORT_C voidChangeAttributesL(const CMsvEntrySelection &, TUint, TUint)
IMPORT_C voidChangeL(const TMsvEntry &)
IMPORT_C voidChangeL(const TMsvEntry &, TSecureId)
IMPORT_C CMsvOperation *ChangeL(const TMsvEntry &, TRequestStatus &)
IMPORT_C CMsvOperation *ChangeL(const TMsvEntry &, TSecureId, TRequestStatus &)
IMPORT_C const TMsvEntry &ChildDataL(TMsvId)
IMPORT_C CMsvEntry *ChildEntryL(TMsvId)
IMPORT_C CMsvEntrySelection *ChildrenL()
IMPORT_C CMsvEntrySelection *ChildrenWithMtmL(TUid)
IMPORT_C CMsvEntrySelection *ChildrenWithServiceL(TMsvId)
IMPORT_C CMsvEntrySelection *ChildrenWithTypeL(TUid)
IMPORT_C CMsvOperation *CopyL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)
IMPORT_C CMsvOperation *CopyL(TMsvId, TMsvId, TRequestStatus &)
IMPORT_C voidCopyL(const CMsvEntrySelection &, TMsvId, TMsvLocalOperationProgress &)
IMPORT_C voidCopyL(TMsvId, TMsvId)
TInt Count()
IMPORT_C CMsvOperation *CreateL(const TMsvEntry &, TRequestStatus &)
IMPORT_C CMsvOperation *CreateL(const TMsvEntry &, TSecureId, TRequestStatus &)
IMPORT_C voidCreateL(TMsvEntry &)
IMPORT_C voidCreateL(TMsvEntry &, TSecureId)
IMPORT_C CMsvOperation *DeleteL(const CMsvEntrySelection &, TRequestStatus &)
IMPORT_C CMsvOperation *DeleteL(TMsvId, TRequestStatus &)
IMPORT_C voidDeleteL(TMsvId)
IMPORT_C voidDeleteL(const CMsvEntrySelection &, TMsvLocalOperationProgress &)
IMPORT_C CMsvStore *EditStoreL()
const TMsvEntry &Entry()
TMsvId EntryId()
voidHandleSessionEventL(TMsvSessionEvent, TAny *, TAny *, TAny *)
voidHandleStoreEvent(TMsvStoreEvent, TMsvId)
IMPORT_C TBoolHasStoreL()
IMPORT_C CMsvOperation *MoveL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)
IMPORT_C CMsvOperation *MoveL(TMsvId, TMsvId, TRequestStatus &)
IMPORT_C voidMoveL(TMsvId, TMsvId)
IMPORT_C voidMoveL(const CMsvEntrySelection &, TMsvId, TMsvLocalOperationProgress &)
IMPORT_C CMsvEntry *NewL(CMsvSession &, TMsvId, const TMsvSelectionOrdering &)
TMsvId OwningService()
IMPORT_C CMsvStore *ReadStoreL()
IMPORT_C voidRemoveObserver(MMsvEntryObserver &)
CMsvSession &Session()
IMPORT_C voidSetEntryL(TMsvId)
IMPORT_C voidSetEntryNoCheckL(TMsvId)
IMPORT_C voidSetMtmListL(const CArrayFix< TUid > &)
IMPORT_C voidSetSortTypeL(const TMsvSelectionOrdering &)
const TMsvSelectionOrdering &SortType()
IMPORT_C const TMsvEntry &operator[](TInt)
Private Member Functions
CMsvEntry(CMsvSession &, const TMsvSelectionOrdering &)
TBool AreChildren(const CMsvEntrySelection &)
voidCheckDeletedGrandchildrenL(TMsvId)
voidCheckIfContextMovedL(const CMsvEntrySelection &)
voidCheckNewGrandchildrenL(TMsvId)
voidChildrenChangedL(const CMsvEntrySelection &)
voidConstructL(TMsvId)
voidContextChangedL(MMsvEntryObserver::TMsvEntryEvent)
TInt CopyOneL(TMsvId, TMsvId)
voidDeleteChild(TInt)
TInt DeleteOneL(TMsvId)
voidDeletedChildrenL(const CMsvEntrySelection &)
CMsvOperation *DoDeleteL(const CMsvEntrySelection &, TRequestStatus &)
voidDoGetChildrenL()
CMsvClientEntry *DoGetEntryLC(TMsvId, TMsvId &)
CMsvEntrySelection *DoGetNewChildrenL(const CMsvEntrySelection &)
CMsvEntrySelection *DoMakeSelectionL(TMsvId)
voidDoSortTypeL(CMsvClientEntry *)
CMsvEntryArray *GetNewSortedListL(const TMsvSelectionOrdering &, const CArrayFix< TUid > &)
voidHandleMediaChangeL()
TBool IsAChild(TMsvId)
voidLog(TRefByValue< const TDesC >, ...)
TInt MoveOneL(TMsvId, TMsvId)
voidNewChildrenL(const CMsvEntrySelection &)
voidNotifyAllObserversL(MMsvEntryObserver::TMsvEntryEvent, TAny *, TAny *, TAny *)
voidNotifyChildChangedL(TMsvId)
voidReplaceChildL(TInt, const TMsvEntry &)
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 Member Enumerations
enumTEntryState { EValid, EInvalidChangingContext, EInvalidDeletedContext, EInvalidOldContext, EInvalidMissingChildren }
Private Attributes
CArrayPtrFlat< CMsvClientEntry > *iEntries
const TMsvEntry *iEntryPtr
CMsvSession &iMsvSession
CArrayFixFlat< TUid > *iMtmList
TUint32 iNotifySequence
TBool iOberserverAdded
CArrayPtrFlat< MMsvEntryObserver > *iObservers
TMsvSelectionOrdering iOrdering
TMsvId iOwningService
CMsvEntryArray *iSortedChildren
TEntryState iState
CMsvStore *iStore

Constructor & Destructor Documentation

CMsvEntry(CMsvSession &, const TMsvSelectionOrdering &)

CMsvEntry(CMsvSession &aMsvSession,
const TMsvSelectionOrdering &aOrdering
)[private]

Parameters

CMsvSession & aMsvSession
const TMsvSelectionOrdering & aOrdering

~CMsvEntry()

IMPORT_C~CMsvEntry()

Member Functions Documentation

AddObserverL(MMsvEntryObserver &)

IMPORT_C voidAddObserverL(MMsvEntryObserver &aObserver)

Parameters

MMsvEntryObserver & aObserver

AreChildren(const CMsvEntrySelection &)

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

Parameters

const CMsvEntrySelection & aSelection

ChangeAttributesL(const CMsvEntrySelection &, TUint, TUint)

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

Parameters

const CMsvEntrySelection & aSelection
TUint aSetAttributes
TUint aClearAttributes

ChangeL(const TMsvEntry &)

IMPORT_C voidChangeL(const TMsvEntry &aEntry)

Parameters

const TMsvEntry & aEntry

ChangeL(const TMsvEntry &, TSecureId)

IMPORT_C voidChangeL(const TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId

ChangeL(const TMsvEntry &, TRequestStatus &)

IMPORT_C CMsvOperation *ChangeL(const TMsvEntry &aEntry,
TRequestStatus &aStatus
)

Parameters

const TMsvEntry & aEntry
TRequestStatus & aStatus

ChangeL(const TMsvEntry &, TSecureId, TRequestStatus &)

IMPORT_C CMsvOperation *ChangeL(const TMsvEntry &aEntry,
TSecureIdaOwnerId,
TRequestStatus &aStatus
)

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId
TRequestStatus & aStatus

CheckDeletedGrandchildrenL(TMsvId)

voidCheckDeletedGrandchildrenL(TMsvIdaId)[private]

Parameters

TMsvId aId

CheckIfContextMovedL(const CMsvEntrySelection &)

voidCheckIfContextMovedL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

CheckNewGrandchildrenL(TMsvId)

voidCheckNewGrandchildrenL(TMsvIdaId)[private]

Parameters

TMsvId aId

ChildDataL(TMsvId)

IMPORT_C const TMsvEntry &ChildDataL(TMsvIdaId)const

Parameters

TMsvId aId

ChildEntryL(TMsvId)

IMPORT_C CMsvEntry *ChildEntryL(TMsvIdaId)const

Parameters

TMsvId aId

ChildrenChangedL(const CMsvEntrySelection &)

voidChildrenChangedL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

ChildrenL()

IMPORT_C CMsvEntrySelection *ChildrenL()const

ChildrenWithMtmL(TUid)

IMPORT_C CMsvEntrySelection *ChildrenWithMtmL(TUidaMtm)const

Parameters

TUid aMtm

ChildrenWithServiceL(TMsvId)

IMPORT_C CMsvEntrySelection *ChildrenWithServiceL(TMsvIdaServiceId)const

Parameters

TMsvId aServiceId

ChildrenWithTypeL(TUid)

IMPORT_C CMsvEntrySelection *ChildrenWithTypeL(TUidaType)const

Parameters

TUid aType

ConstructL(TMsvId)

voidConstructL(TMsvIdaMsvId)[private]

Parameters

TMsvId aMsvId

ContextChangedL(MMsvEntryObserver::TMsvEntryEvent)

voidContextChangedL(MMsvEntryObserver::TMsvEntryEventaEvent)[private]

CopyL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)

IMPORT_C CMsvOperation *CopyL(const CMsvEntrySelection &aSelection,
TMsvIdaTargetId,
TRequestStatus &aStatus
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aTargetId
TRequestStatus & aStatus

CopyL(TMsvId, TMsvId, TRequestStatus &)

IMPORT_C CMsvOperation *CopyL(TMsvIdaMsvId,
TMsvIdaTargetId,
TRequestStatus &aStatus
)

Parameters

TMsvId aMsvId
TMsvId aTargetId
TRequestStatus & aStatus

CopyL(const CMsvEntrySelection &, TMsvId, TMsvLocalOperationProgress &)

IMPORT_C voidCopyL(const CMsvEntrySelection &aSelection,
TMsvIdaTargetId,
TMsvLocalOperationProgress &aProgress
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aTargetId
TMsvLocalOperationProgress & aProgress

CopyL(TMsvId, TMsvId)

IMPORT_C voidCopyL(TMsvIdaMsvId,
TMsvIdaTargetId
)

Parameters

TMsvId aMsvId
TMsvId aTargetId

CopyOneL(TMsvId, TMsvId)

TInt CopyOneL(TMsvIdaMsvId,
TMsvIdaTargetId
)[private]

Parameters

TMsvId aMsvId
TMsvId aTargetId

Count()

TInt Count()const [inline]

Gets the number of children of the context.

Count of the child entries for the current context

CreateL(const TMsvEntry &, TRequestStatus &)

IMPORT_C CMsvOperation *CreateL(const TMsvEntry &aEntry,
TRequestStatus &aStatus
)

Parameters

const TMsvEntry & aEntry
TRequestStatus & aStatus

CreateL(const TMsvEntry &, TSecureId, TRequestStatus &)

IMPORT_C CMsvOperation *CreateL(const TMsvEntry &aEntry,
TSecureIdaOwnerId,
TRequestStatus &aStatus
)

Parameters

const TMsvEntry & aEntry
TSecureId aOwnerId
TRequestStatus & aStatus

CreateL(TMsvEntry &)

IMPORT_C voidCreateL(TMsvEntry &aEntry)

Parameters

TMsvEntry & aEntry

CreateL(TMsvEntry &, TSecureId)

IMPORT_C voidCreateL(TMsvEntry &aEntry,
TSecureIdaOwnerId
)

Parameters

TMsvEntry & aEntry
TSecureId aOwnerId

DeleteChild(TInt)

voidDeleteChild(TIntaPosition)[private]

Parameters

TInt aPosition

DeleteL(const CMsvEntrySelection &, TRequestStatus &)

IMPORT_C CMsvOperation *DeleteL(const CMsvEntrySelection &aSelection,
TRequestStatus &aStatus
)

Parameters

const CMsvEntrySelection & aSelection
TRequestStatus & aStatus

DeleteL(TMsvId, TRequestStatus &)

IMPORT_C CMsvOperation *DeleteL(TMsvIdaMsvId,
TRequestStatus &aStatus
)

Parameters

TMsvId aMsvId
TRequestStatus & aStatus

DeleteL(TMsvId)

IMPORT_C voidDeleteL(TMsvIdaId)

Parameters

TMsvId aId

DeleteL(const CMsvEntrySelection &, TMsvLocalOperationProgress &)

IMPORT_C voidDeleteL(const CMsvEntrySelection &aSelection,
TMsvLocalOperationProgress &aProgress
)

Parameters

const CMsvEntrySelection & aSelection
TMsvLocalOperationProgress & aProgress

DeleteOneL(TMsvId)

TInt DeleteOneL(TMsvIdaMsvId)[private]

Parameters

TMsvId aMsvId

DeletedChildrenL(const CMsvEntrySelection &)

voidDeletedChildrenL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

DoDeleteL(const CMsvEntrySelection &, TRequestStatus &)

CMsvOperation *DoDeleteL(const CMsvEntrySelection &aSelection,
TRequestStatus &aStatus
)[private]

Parameters

const CMsvEntrySelection & aSelection
TRequestStatus & aStatus

DoGetChildrenL()

voidDoGetChildrenL()[private]

DoGetEntryLC(TMsvId, TMsvId &)

CMsvClientEntry *DoGetEntryLC(TMsvIdaId,
TMsvId &aOwningService
)[private]

Parameters

TMsvId aId
TMsvId & aOwningService

DoGetNewChildrenL(const CMsvEntrySelection &)

CMsvEntrySelection *DoGetNewChildrenL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

DoMakeSelectionL(TMsvId)

CMsvEntrySelection *DoMakeSelectionL(TMsvIdaId)[private]

Parameters

TMsvId aId

DoSortTypeL(CMsvClientEntry *)

voidDoSortTypeL(CMsvClientEntry *aContext)[private]

Parameters

CMsvClientEntry * aContext

EditStoreL()

IMPORT_C CMsvStore *EditStoreL()

Entry()

const TMsvEntry &Entry()const [inline]

Gets the index entry for the context.

Current context's index entry

EntryId()

TMsvId EntryId()const [inline]

Gets the ID of the context.

Current context's entry ID

GetNewSortedListL(const TMsvSelectionOrdering &, const CArrayFix< TUid > &)

CMsvEntryArray *GetNewSortedListL(const TMsvSelectionOrdering &aOrdering,
const CArrayFix< TUid > &aMtmList
)[private]

Parameters

const TMsvSelectionOrdering & aOrdering
const CArrayFix< TUid > & aMtmList

HandleMediaChangeL()

voidHandleMediaChangeL()[private]

HandleSessionEventL(TMsvSessionEvent, TAny *, TAny *, TAny *)

voidHandleSessionEventL(TMsvSessionEventaEvent,
TAny *aArg1,
TAny *aArg2,
TAny *aArg3
)

Parameters

TMsvSessionEvent aEvent
TAny * aArg1
TAny * aArg2
TAny * aArg3

HandleStoreEvent(TMsvStoreEvent, TMsvId)

voidHandleStoreEvent(TMsvStoreEventaEvent,
TMsvIdaId
)

Parameters

TMsvStoreEvent aEvent
TMsvId aId

HasStoreL()

IMPORT_C TBoolHasStoreL()const

IsAChild(TMsvId)

TBool IsAChild(TMsvIdaId)const [private]

Parameters

TMsvId aId

Log(TRefByValue< const TDesC >, ...)

voidLog(TRefByValue< const TDesC >aFmt,
...
)[private]

Parameters

TRefByValue< const TDesC > aFmt
...

MoveL(const CMsvEntrySelection &, TMsvId, TRequestStatus &)

IMPORT_C CMsvOperation *MoveL(const CMsvEntrySelection &aSelection,
TMsvIdaTargetId,
TRequestStatus &aStatus
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aTargetId
TRequestStatus & aStatus

MoveL(TMsvId, TMsvId, TRequestStatus &)

IMPORT_C CMsvOperation *MoveL(TMsvIdaMsvId,
TMsvIdaTargetId,
TRequestStatus &aStatus
)

Parameters

TMsvId aMsvId
TMsvId aTargetId
TRequestStatus & aStatus

MoveL(TMsvId, TMsvId)

IMPORT_C voidMoveL(TMsvIdaMsvId,
TMsvIdaTargetId
)

Parameters

TMsvId aMsvId
TMsvId aTargetId

MoveL(const CMsvEntrySelection &, TMsvId, TMsvLocalOperationProgress &)

IMPORT_C voidMoveL(const CMsvEntrySelection &aSelection,
TMsvIdaTargetId,
TMsvLocalOperationProgress &aProgress
)

Parameters

const CMsvEntrySelection & aSelection
TMsvId aTargetId
TMsvLocalOperationProgress & aProgress

MoveOneL(TMsvId, TMsvId)

TInt MoveOneL(TMsvIdaMsvId,
TMsvIdaTargetId
)[private]

Parameters

TMsvId aMsvId
TMsvId aTargetId

NewChildrenL(const CMsvEntrySelection &)

voidNewChildrenL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

NewL(CMsvSession &, TMsvId, const TMsvSelectionOrdering &)

IMPORT_C CMsvEntry *NewL(CMsvSession &aMsvSession,
TMsvIdaMsvId,
const TMsvSelectionOrdering &aOrdering
)[static]

Parameters

CMsvSession & aMsvSession
TMsvId aMsvId
const TMsvSelectionOrdering & aOrdering

NotifyAllObserversL(MMsvEntryObserver::TMsvEntryEvent, TAny *, TAny *, TAny *)

voidNotifyAllObserversL(MMsvEntryObserver::TMsvEntryEventaEvent,
TAny *aArg1,
TAny *aArg2,
TAny *aArg3
)[private]

Parameters

MMsvEntryObserver::TMsvEntryEvent aEvent
TAny * aArg1
TAny * aArg2
TAny * aArg3

NotifyChildChangedL(TMsvId)

voidNotifyChildChangedL(TMsvIdaId)[private]

Parameters

TMsvId aId

OwningService()

TMsvId OwningService()const [inline]

Gets the ID of the service entry that owns the context.

Local entries are considered as being members of the local service:

ID of the service entry that the context is under.

ReadStoreL()

IMPORT_C CMsvStore *ReadStoreL()

RemoveObserver(MMsvEntryObserver &)

IMPORT_C voidRemoveObserver(MMsvEntryObserver &aObserver)

Parameters

MMsvEntryObserver & aObserver

ReplaceChildL(TInt, const TMsvEntry &)

voidReplaceChildL(TIntpos,
const TMsvEntry &aEntry
)[private]

Parameters

TInt pos
const TMsvEntry & aEntry

Session()

CMsvSession &Session()[inline]

Gets the Message Server session used by this object. This is the same session passed by the client in NewL().

The session used by the object

SetEntryL(TMsvId)

IMPORT_C voidSetEntryL(TMsvIdaId)

Parameters

TMsvId aId

SetEntryNoCheckL(TMsvId)

IMPORT_C voidSetEntryNoCheckL(TMsvIdaId)

Parameters

TMsvId aId

SetMtmListL(const CArrayFix< TUid > &)

IMPORT_C voidSetMtmListL(const CArrayFix< TUid > &aMtmList)

Parameters

const CArrayFix< TUid > & aMtmList

SetSortTypeL(const TMsvSelectionOrdering &)

IMPORT_C voidSetSortTypeL(const TMsvSelectionOrdering &aOrdering)

Parameters

const TMsvSelectionOrdering & aOrdering

SortType()

const TMsvSelectionOrdering &SortType()const [inline]

Gets the current sort order of children of the entry. The sort order is initially set through NewL().

Current sort order

operator[](TInt)

IMPORT_C const TMsvEntry &operator[](TIntaIndex)const

Parameters

TInt aIndex

Member Enumerations Documentation

Enum TEntryState

Enumerators

EValid
EInvalidChangingContext
EInvalidDeletedContext
EInvalidOldContext
EInvalidMissingChildren

Member Data Documentation

CArrayPtrFlat< CMsvClientEntry > * iEntries

CArrayPtrFlat< CMsvClientEntry > *iEntries[private]

const TMsvEntry * iEntryPtr

const TMsvEntry *iEntryPtr[private]

CMsvSession & iMsvSession

CMsvSession &iMsvSession[private]

CArrayFixFlat< TUid > * iMtmList

CArrayFixFlat< TUid > *iMtmList[private]

TUint32 iNotifySequence

TUint32 iNotifySequence[private]

TBool iOberserverAdded

TBool iOberserverAdded[private]

CArrayPtrFlat< MMsvEntryObserver > * iObservers

CArrayPtrFlat< MMsvEntryObserver > *iObservers[private]

TMsvSelectionOrdering iOrdering

TMsvSelectionOrdering iOrdering[private]

TMsvId iOwningService

TMsvId iOwningService[private]

CMsvEntryArray * iSortedChildren

CMsvEntryArray *iSortedChildren[private]

TEntryState iState

TEntryState iState[private]

CMsvStore * iStore

CMsvStore *iStore[private]