CPbkViewState Class Reference

class CPbkViewState : public CBase

Generic Phonebook view state class. Class can be used to pass parameters the Phonebook application when launching the application with the symbian view launching mechanism.

Inherits from

Public Member Functions
~CPbkViewState()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C CPbkFieldDataArray *FieldDataArray()
IMPORT_C TUintFlags()
IMPORT_C TContactItemIdFocusedContactId()
IMPORT_C TIntFocusedFieldIndex()
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C const CContactIdArray *MarkedContactIds()
IMPORT_C CContactIdArray *MarkedContactIds()
voidMergeViewState(CPbkViewState &)
IMPORT_C CPbkViewState *NewL()
IMPORT_C CPbkViewState *NewL(RReadStream &)
IMPORT_C CPbkViewState *NewL(const TDesC8 &)
IMPORT_C CPbkViewState *NewLC()
IMPORT_C CPbkViewState *NewLC(RReadStream &)
IMPORT_C CPbkViewState *NewLC(const TDesC8 &)
IMPORT_C HBufC8 *PackL()
IMPORT_C HBufC8 *PackLC()
IMPORT_C TContactItemIdParentContactId()
IMPORT_C voidReset()
IMPORT_C voidSetFieldDataArray(CPbkFieldDataArray *)
IMPORT_C voidSetFlags(TUint)
IMPORT_C voidSetFocusedContactId(TContactItemId)
IMPORT_C voidSetFocusedFieldIndex(TInt)
IMPORT_C voidSetMarkedContactIds(CContactIdArray *)
IMPORT_C voidSetParentContactId(TContactItemId)
IMPORT_C voidSetTopContactId(TContactItemId)
IMPORT_C voidSetTopFieldIndex(TInt)
IMPORT_C TContactItemIdTopContactId()
IMPORT_C TIntTopFieldIndex()
IMPORT_C TUidUid()
IMPORT_C voidUnpackL(const TDesC8 &)
IMPORT_C TBooloperator==(const CPbkViewState &)
Private Member Functions
CPbkViewState()
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
enumTDataType {
EEnd = 0, EFocusedContactId, ETopContactId, EMarkedContactIds, EFocusedFieldIndex, ETopFieldIndex, EFieldDataArray, EParentContactId, EFlags
}
enumTFlags { ENullFlags = 0, EFocusFirst = 0x0001, EFocusLast = 0x0002, EInitialized = 0x0004, ESendToBackground = 0x0008 }
Private Attributes
const TUidKUid
CPbkFieldDataArray *iFieldDataArray
TUint iFlags
TContactItemId iFocusedContactId
TInt iFocusedFieldIndex
CContactIdArray *iMarkedContactIds
TContactItemId iParentContactId
TContactItemId iTopContactId
TInt iTopFieldIndex

Constructor & Destructor Documentation

CPbkViewState()

CPbkViewState()[private]

~CPbkViewState()

~CPbkViewState()

Destructor.

Member Functions Documentation

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes this object to aStream. InternalizeL

Parameters

RWriteStream & aStream

FieldDataArray()

IMPORT_C CPbkFieldDataArray *FieldDataArray()const

Returns field data array, NULL if not set.

Flags()

IMPORT_C TUintFlags()const

Returns the view state flags. See CPbkViewState::TFlags.

FocusedContactId()

IMPORT_C TContactItemIdFocusedContactId()const

Returns id of the focused contact.

FocusedFieldIndex()

IMPORT_C TIntFocusedFieldIndex()const

Returns index of the focused field (field is from FocusedContactId()), -1 when no field focused.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalizes this object from aStream. ExternalizeL

Parameters

RReadStream & aStreamA stream from where this objects state can be internalized from.

MarkedContactIds()

IMPORT_C const CContactIdArray *MarkedContactIds()const

Returns const array of marked contacts ids, NULL if not set.

MarkedContactIds()

IMPORT_C CContactIdArray *MarkedContactIds()

Returns array of marked contacts ids, NULL if not set. Owmership not transferred.

MergeViewState(CPbkViewState &)

voidMergeViewState(CPbkViewState &aOtherState)

Merges another view state to this view state by setting values from the parameter and overriding any previous values in this state.

Parameters

CPbkViewState & aOtherStateThe state to merge to this state. The properties which have a value in aOtherState override properties in this object. The aOtherState object may be modified by this function.

NewL()

IMPORT_C CPbkViewState *NewL()[static]

Creates and returns a new instance of this class.

NewL(RReadStream &)

IMPORT_C CPbkViewState *NewL(RReadStream &aStream)[static]

Creates and returns a new instance of this class initialized from aStream.

Parameters

RReadStream & aStreamA view state stream to internalize.

NewL(const TDesC8 &)

IMPORT_C CPbkViewState *NewL(const TDesC8 &aBuf)[static]

Creates and returns a new instance of this class initialized from aBuf.

Parameters

const TDesC8 & aBufA view state buffer to internalize.

NewLC()

IMPORT_C CPbkViewState *NewLC()[static]

Like NewL(), but leaves the object on the cleanup stack NewL

NewLC(RReadStream &)

IMPORT_C CPbkViewState *NewLC(RReadStream &aStream)[static]

Like NewL(RReadStream& aStream) but leaves the object on the cleanup stack. NewL(RReadStream& aStream)

Parameters

RReadStream & aStreamA view state stream to internalize.

NewLC(const TDesC8 &)

IMPORT_C CPbkViewState *NewLC(const TDesC8 &aBuf)[static]

Like NewL(const TDesC8& aBuf) but leaves the object on the cleanup stack. NewL(const TDesC8& aBuf)

Parameters

const TDesC8 & aBufA view state buffer to internalize.

PackL()

IMPORT_C HBufC8 *PackL()const

Packages and returns this object in a buffer. Caller is responsible of deleting the buffer.

PackLC()

IMPORT_C HBufC8 *PackLC()const

Like PackL, but leaves the buffer on the cleanup stack. PackL

ParentContactId()

IMPORT_C TContactItemIdParentContactId()const

Returns the focused contact id's parent, KNullContactId if not set.

Reset()

IMPORT_C voidReset()

Reset this state to empty.

SetFieldDataArray(CPbkFieldDataArray *)

IMPORT_C voidSetFieldDataArray(CPbkFieldDataArray *aFieldDataArray)

Sets field data array to aArray. Destroys previous array and takes ownership of aArray.

Parameters

CPbkFieldDataArray * aFieldDataArraySets the field data array.

SetFlags(TUint)

IMPORT_C voidSetFlags(TUintaFlags)

Sets the view state flags.

Parameters

TUint aFlagsSets the view state parameters. See CPbkViewState::TFlags.

SetFocusedContactId(TContactItemId)

IMPORT_C voidSetFocusedContactId(TContactItemIdaId)

Sets id of the focused contact to aId.

Parameters

TContactItemId aIdSets the focused contact id.

SetFocusedFieldIndex(TInt)

IMPORT_C voidSetFocusedFieldIndex(TIntaIndex)

Sets index of the focused field to aIndex (field from FocusedContactId()), -1 when no field focused.

Parameters

TInt aIndexSets focused field index.

SetMarkedContactIds(CContactIdArray *)

IMPORT_C voidSetMarkedContactIds(CContactIdArray *aArray)

Sets the array of marked contact ids to aArray. Destroys previous array and takes ownership of aArray.

Parameters

CContactIdArray * aArraySets the marked contact ids.

SetParentContactId(TContactItemId)

IMPORT_C voidSetParentContactId(TContactItemIdaParentContactId)

Sets the focused contact ids parent contact id.

Parameters

TContactItemId aParentContactIdSets the contact ids parent id.

SetTopContactId(TContactItemId)

IMPORT_C voidSetTopContactId(TContactItemIdaId)

Sets id of the topmost contact to aId.

Parameters

TContactItemId aIdSets the topmost contact id.

SetTopFieldIndex(TInt)

IMPORT_C voidSetTopFieldIndex(TIntaIndex)

Sets index of the topmost field to aIndex (field from FocusedContactId()), -1 when no topmost field.

Parameters

TInt aIndexSets the topmost field index.

TopContactId()

IMPORT_C TContactItemIdTopContactId()const

Returns id of the topmost contact.

TopFieldIndex()

IMPORT_C TIntTopFieldIndex()const

Returns index of the topmost field (field is from FocusedContactId()), -1 when no topmost field.

Uid()

IMPORT_C TUidUid()[static]

Returns the message uid for use with view server messages.

UnpackL(const TDesC8 &)

IMPORT_C voidUnpackL(const TDesC8 &aPack)

Sets this state from aPack previously created with PackL. PackL PackLC

Parameters

const TDesC8 & aPackPreviously packaged state.

operator==(const CPbkViewState &)

IMPORT_C TBooloperator==(const CPbkViewState &aRhs)const

Parameters

const CPbkViewState & aRhs

Member Enumerations Documentation

Enum TDataType

Enumerators

EEnd = 0
EFocusedContactId
ETopContactId
EMarkedContactIds
EFocusedFieldIndex
ETopFieldIndex
EFieldDataArray
EParentContactId
EFlags

Enum TFlags

Enumerators

ENullFlags = 0
EFocusFirst = 0x0001
EFocusLast = 0x0002
EInitialized = 0x0004
ESendToBackground = 0x0008

Member Data Documentation

const TUid KUid

const TUidKUid[private, static]

CPbkFieldDataArray * iFieldDataArray

CPbkFieldDataArray *iFieldDataArray[private]

TUint iFlags

TUint iFlags[private]

TContactItemId iFocusedContactId

TContactItemId iFocusedContactId[private]

TInt iFocusedFieldIndex

TInt iFocusedFieldIndex[private]

CContactIdArray * iMarkedContactIds

CContactIdArray *iMarkedContactIds[private]

TContactItemId iParentContactId

TContactItemId iParentContactId[private]

TContactItemId iTopContactId

TContactItemId iTopContactId[private]

TInt iTopFieldIndex

TInt iTopFieldIndex[private]