CPbk2ViewState Class Reference

#include <app/CPbk2ViewState.h>

class CPbk2ViewState : public CBase

Inherits from

  • CPbk2ViewState
    Public Member Enumerations
    enumTDataType { EEnd, EFocusedContact, ETopContact, EMarkedContacts, ..., ETopPropertiesIndex }
    enumTFlags { ENullFlags, EFocusFirst, EFocusLast, EInitialized, ESendToBackground }
    Public Member Functions
    ~CPbk2ViewState()
    IMPORT_C TUintFlags()
    IMPORT_C const MVPbkContactLink *FocusedContact()
    IMPORT_C TIntFocusedFieldIndex()
    IMPORT_C TIntFocusedPropertiesIndex()
    IMPORT_C const MVPbkContactLinkArray *MarkedContacts()
    IMPORT_C CPbk2ViewState *NewL()
    IMPORT_C CPbk2ViewState *NewL(const TDesC8 &)
    IMPORT_C CPbk2ViewState *NewLC()
    IMPORT_C CPbk2ViewState *NewLC(const TDesC8 &)
    IMPORT_C HBufC8 *PackL()
    IMPORT_C HBufC8 *PackLC()
    IMPORT_C const MVPbkContactLink *ParentContact()
    IMPORT_C voidReset()
    IMPORT_C voidSetFlags(TUint)
    IMPORT_C voidSetFocusedContact(MVPbkContactLink *)
    IMPORT_C voidSetFocusedFieldIndex(TInt)
    IMPORT_C voidSetFocusedPropertiesIndex(TInt)
    IMPORT_C voidSetMarkedContacts(MVPbkContactLinkArray *)
    IMPORT_C voidSetParentContact(MVPbkContactLink *)
    IMPORT_C voidSetTopContact(MVPbkContactLink *)
    IMPORT_C voidSetTopFieldIndex(TInt)
    IMPORT_C voidSetTopPropertiesIndex(TInt)
    IMPORT_C MVPbkContactLink *TakeFocusedContact()
    IMPORT_C MVPbkContactLinkArray *TakeMarkedContacts()
    IMPORT_C MVPbkContactLink *TakeParentContact()
    IMPORT_C MVPbkContactLink *TakeTopContact()
    IMPORT_C const MVPbkContactLink *TopContact()
    IMPORT_C TIntTopFieldIndex()
    IMPORT_C TIntTopPropertiesIndex()
    IMPORT_C TUidUid()
    IMPORT_C voidUnpackL(const TDesC8 &)
    IMPORT_C TBooloperator==(const CPbk2ViewState &)
    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()

    Detailed Description

    Phonebook 2 view state.

    Responsible for storing the state of a Phonebook 2 view. The state includes, for example, focused contact, focused contact field and other information for restoring the state later. This state object can be externalized to a buffer and initialized from a buffer.

    Member Enumeration Documentation

    Enum TDataType

    View state data types.

    EnumeratorValueDescription
    EEnd0
    EFocusedContactFocused contact.
    ETopContact
    EMarkedContactsArray of marked contacts.
    EFocusedFieldIndexIndex of the focused field.
    ETopFieldIndexIndex of the topmost field of the view.
    EParentContactParent contact.
    EFlagsView state flags.
    EFocusedPropertiesIndexIndex of the focused properties item.
    ETopPropertiesIndexIndex of the topmost properties item of the view.

    Enum TFlags

    View state flags.

    EnumeratorValueDescription
    ENullFlags0Reset flags.
    EFocusFirst0x0001Focus the first item in list views.
    EFocusLast0x0002Focus the last item in list views.
    EInitialized0x0004Reset state to the view's initial state.
    ESendToBackground0x0008Send application to background.

    Constructor & Destructor Documentation

    ~CPbk2ViewState ( )

    ~CPbk2ViewState()

    Destructor.

    Member Function Documentation

    Flags ( )

    IMPORT_C TUintFlags()const

    Returns the view state flags.

    Returns: View state flags.

    FocusedContact ( )

    IMPORT_C const MVPbkContactLink *FocusedContact()const

    Returns a link to the focused contact. Null if not set.

    Returns: Link to the focused contact.

    FocusedFieldIndex ( )

    IMPORT_C TIntFocusedFieldIndex()const

    Returns the index of the focused field. KErrNotFound indicates there is no focused field information available.

    Returns: Field index.

    FocusedPropertiesIndex ( )

    IMPORT_C TIntFocusedPropertiesIndex()const

    Returns the index of the focused properties item. KErrNotFound indicates there is no focused properties item information available.

    Returns: Properties item index.

    MarkedContacts ( )

    IMPORT_C const MVPbkContactLinkArray *MarkedContacts()const

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

    Returns: Marked contacts in a link array.

    NewL ( )

    IMPORT_C CPbk2ViewState *NewL()[static]

    Creates a new instace of this class.

    Returns: A new instance of this class.

    NewL ( const TDesC8 & )

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

    Creates a new instace of this class initialized from a buffer.

    See also: CPbk2ViewState::PackL and CPbk2ViewState::PackLC for constructing the buffer.

    ParameterDescription
    aBufBuffer to initialize this instance from.

    Returns: A new instance of this class.

    NewLC ( )

    IMPORT_C CPbk2ViewState *NewLC()[static]

    Creates a new instace of this class.

    Returns: A new instance of this class.

    NewLC ( const TDesC8 & )

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

    Creates a new instace of this class initialized from a buffer.

    See also: CPbk2ViewState::PackL and CPbk2ViewState::PackLC for constructing the buffer.

    ParameterDescription
    aBufBuffer to initialize this instance from.

    Returns: A new instance of this class.

    PackL ( )

    IMPORT_C HBufC8 *PackL()const

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

    Returns: This view state instance packaged into a buffer.

    PackLC ( )

    IMPORT_C HBufC8 *PackLC()const

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

    Returns: This view state instance packaged into a buffer.

    ParentContact ( )

    IMPORT_C const MVPbkContactLink *ParentContact()const

    Returns a link to the parent contact.

    Returns: Link to the parent contact.

    Reset ( )

    IMPORT_C voidReset()

    Reset this view state to an empty state.

    SetFlags ( TUint )

    IMPORT_C voidSetFlags(TUintaFlags)

    Sets the view state flags.

    ParameterDescription
    aFlagsThe flags to set.

    SetFocusedContact ( MVPbkContactLink * )

    IMPORT_C voidSetFocusedContact(MVPbkContactLink *aContact)

    Sets focused contact to given contact.

    ParameterDescription
    aContactThe contact to set.

    SetFocusedFieldIndex ( TInt )

    IMPORT_C voidSetFocusedFieldIndex(TIntaIndex)

    Sets the index of the focused field to the given index. KErrNotFound indicates there is no focused field information available.

    ParameterDescription
    aIndexThe index to set.

    SetFocusedPropertiesIndex ( TInt )

    IMPORT_C voidSetFocusedPropertiesIndex(TIntaIndex)

    Sets the index of the focused properties item to the given index. KErrNotFound indicates there is no focused properties item information available.

    ParameterDescription
    aIndexThe index to set.

    SetMarkedContacts ( MVPbkContactLinkArray * )

    IMPORT_C voidSetMarkedContacts(MVPbkContactLinkArray *aArray)

    Sets marked contacts according to given array of contact links.

    ParameterDescription
    aArrayThe contacts to set marked.

    SetParentContact ( MVPbkContactLink * )

    IMPORT_C voidSetParentContact(MVPbkContactLink *aParentContact)

    Sets parent contact to given contact.

    ParameterDescription
    aParentContactThe contact to set.

    SetTopContact ( MVPbkContactLink * )

    IMPORT_C voidSetTopContact(MVPbkContactLink *aTopContact)

    Sets top contact to given contact.

    ParameterDescription
    aTopContactThe contact to set.

    SetTopFieldIndex ( TInt )

    IMPORT_C voidSetTopFieldIndex(TIntaIndex)

    Sets the index of the topmost field to the given index. KErrNotFound indicates there is no topmost field information available.

    ParameterDescription
    aIndexThe index to set.

    SetTopPropertiesIndex ( TInt )

    IMPORT_C voidSetTopPropertiesIndex(TIntaIndex)

    Sets the index of the topmost properties item to the given index. KErrNotFound indicates there is no topmost properties item information available.

    ParameterDescription
    aIndexThe index to set.

    TakeFocusedContact ( )

    IMPORT_C MVPbkContactLink *TakeFocusedContact()

    Returns a link to the focused contact. Null if not set. Ownership is transferred to the caller.

    Returns: Link to the focused contact.

    TakeMarkedContacts ( )

    IMPORT_C MVPbkContactLinkArray *TakeMarkedContacts()

    Returns const array of marked contacts. NULL if not set. Ownership is transferred to caller.

    Returns: Marked contacts in a link array.

    TakeParentContact ( )

    IMPORT_C MVPbkContactLink *TakeParentContact()

    Returns a link to the parent contact. Null if not set. Ownership is transferred to caller.

    Returns: Link to the parent contact.

    TakeTopContact ( )

    IMPORT_C MVPbkContactLink *TakeTopContact()

    Returns a link to the topmost contact. Null if not set. Ownership is transferred to caller.

    Returns: Link to the topmost contact.

    TopContact ( )

    IMPORT_C const MVPbkContactLink *TopContact()const

    Returns a link to the the topmost contact. Null if not set.

    Returns: Link to the topmost contact.

    TopFieldIndex ( )

    IMPORT_C TIntTopFieldIndex()const

    Returns the index of the top field. KErrNotFound indicates there is no focused field information available.

    Returns: Field index.

    TopPropertiesIndex ( )

    IMPORT_C TIntTopPropertiesIndex()const

    Returns the index of the top properties item. KErrNotFound indicates there is no focused properties item information available.

    Returns: Properties item index.

    Uid ( )

    IMPORT_C TUidUid()[static]

    Returns the message uid for use with view server messages.

    Returns: Message uid.

    UnpackL ( const TDesC8 & )

    IMPORT_C voidUnpackL(const TDesC8 &aPack)

    Sets this view state from given packaged buffer.

    ParameterDescription
    aPackPackaged view state buffer.

    operator== ( const CPbk2ViewState & )

    IMPORT_C TBooloperator==(const CPbk2ViewState &aRhs)const

    Comparison operator.

    ParameterDescription
    aRhsView state instance to compare to this instance.

    Returns: ETrue if view states are equal, EFalse otherwise.