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 void ExternalizeL ( RWriteStream &)
IMPORT_C CPbkFieldDataArray * FieldDataArray ()
IMPORT_C TUint Flags ()
IMPORT_C TContactItemId FocusedContactId ()
IMPORT_C TInt FocusedFieldIndex ()
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C const CContactIdArray * MarkedContactIds ()
IMPORT_C CContactIdArray * MarkedContactIds ()
void MergeViewState ( 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 TContactItemId ParentContactId ()
IMPORT_C void Reset ()
IMPORT_C void SetFieldDataArray (CPbkFieldDataArray *)
IMPORT_C void SetFlags ( TUint )
IMPORT_C void SetFocusedContactId ( TContactItemId )
IMPORT_C void SetFocusedFieldIndex ( TInt )
IMPORT_C void SetMarkedContactIds ( CContactIdArray *)
IMPORT_C void SetParentContactId ( TContactItemId )
IMPORT_C void SetTopContactId ( TContactItemId )
IMPORT_C void SetTopFieldIndex ( TInt )
IMPORT_C TContactItemId TopContactId ()
IMPORT_C TInt TopFieldIndex ()
IMPORT_C TUid Uid ()
IMPORT_C void UnpackL (const TDesC8 &)
IMPORT_C TBool operator== (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
enum TDataType {
EEnd  = 0, EFocusedContactId , ETopContactId , EMarkedContactIds , EFocusedFieldIndex , ETopFieldIndex , EFieldDataArray , EParentContactId , EFlags
}
enum TFlags { ENullFlags  = 0, EFocusFirst  = 0x0001, EFocusLast  = 0x0002, EInitialized  = 0x0004, ESendToBackground  = 0x0008 }
Private Attributes
const TUid KUid
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 void ExternalizeL ( 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 TUint Flags ( ) const

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

FocusedContactId()

IMPORT_C TContactItemId FocusedContactId ( ) const

Returns id of the focused contact.

FocusedFieldIndex()

IMPORT_C TInt FocusedFieldIndex ( ) const

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

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Internalizes this object from aStream. ExternalizeL

Parameters

RReadStream & aStream A 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 &)

void MergeViewState ( 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 & aOtherState The 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 & aStream A 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 & aBuf A 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 & aStream A 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 & aBuf A 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 TContactItemId ParentContactId ( ) const

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

Reset()

IMPORT_C void Reset ( )

Reset this state to empty.

SetFieldDataArray(CPbkFieldDataArray *)

IMPORT_C void SetFieldDataArray ( CPbkFieldDataArray * aFieldDataArray )

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

Parameters

CPbkFieldDataArray * aFieldDataArray Sets the field data array.

SetFlags(TUint)

IMPORT_C void SetFlags ( TUint aFlags )

Sets the view state flags.

Parameters

TUint aFlags Sets the view state parameters. See CPbkViewState::TFlags.

SetFocusedContactId(TContactItemId)

IMPORT_C void SetFocusedContactId ( TContactItemId aId )

Sets id of the focused contact to aId.

Parameters

TContactItemId aId Sets the focused contact id.

SetFocusedFieldIndex(TInt)

IMPORT_C void SetFocusedFieldIndex ( TInt aIndex )

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

Parameters

TInt aIndex Sets focused field index.

SetMarkedContactIds(CContactIdArray *)

IMPORT_C void SetMarkedContactIds ( CContactIdArray * aArray )

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

Parameters

CContactIdArray * aArray Sets the marked contact ids.

SetParentContactId(TContactItemId)

IMPORT_C void SetParentContactId ( TContactItemId aParentContactId )

Sets the focused contact ids parent contact id.

Parameters

TContactItemId aParentContactId Sets the contact ids parent id.

SetTopContactId(TContactItemId)

IMPORT_C void SetTopContactId ( TContactItemId aId )

Sets id of the topmost contact to aId.

Parameters

TContactItemId aId Sets the topmost contact id.

SetTopFieldIndex(TInt)

IMPORT_C void SetTopFieldIndex ( TInt aIndex )

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

Parameters

TInt aIndex Sets the topmost field index.

TopContactId()

IMPORT_C TContactItemId TopContactId ( ) const

Returns id of the topmost contact.

TopFieldIndex()

IMPORT_C TInt TopFieldIndex ( ) const

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

Uid()

IMPORT_C TUid Uid ( ) [static]

Returns the message uid for use with view server messages.

UnpackL(const TDesC8 &)

IMPORT_C void UnpackL ( const TDesC8 & aPack )

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

Parameters

const TDesC8 & aPack Previously packaged state.

operator==(const CPbkViewState &)

IMPORT_C TBool operator== ( 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 TUid KUid [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]