#include <app/CPbk2ViewState.h>
class CPbk2ViewState : public CBase |
Public Member Enumerations | |
---|---|
enum | TDataType { EEnd, EFocusedContact, ETopContact, EMarkedContacts, ..., ETopPropertiesIndex } |
enum | TFlags { ENullFlags, EFocusFirst, EFocusLast, EInitialized, ESendToBackground } |
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.
View state data types.
IMPORT_C const MVPbkContactLink * | FocusedContact | ( | ) | const |
Returns a link to the focused contact. Null if not set.
Returns: Link to the focused contact.
IMPORT_C TInt | FocusedFieldIndex | ( | ) | const |
Returns the index of the focused field. KErrNotFound indicates there is no focused field information available.
Returns: Field index.
IMPORT_C TInt | FocusedPropertiesIndex | ( | ) | const |
Returns the index of the focused properties item. KErrNotFound indicates there is no focused properties item information available.
Returns: Properties item index.
IMPORT_C const MVPbkContactLinkArray * | MarkedContacts | ( | ) | const |
Returns const array of marked contacts. NULL if not set.
Returns: Marked contacts in a link array.
IMPORT_C CPbk2ViewState * | NewL | ( | ) | [static] |
Creates a new instace of this class.
Returns: A new instance of this class.
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.
Parameter | Description |
---|---|
aBuf | Buffer to initialize this instance from. |
Returns: A new instance of this class.
IMPORT_C CPbk2ViewState * | NewLC | ( | ) | [static] |
Creates a new instace of this class.
Returns: A new instance of this class.
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.
Parameter | Description |
---|---|
aBuf | Buffer to initialize this instance from. |
Returns: A new instance of this class.
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.
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.
IMPORT_C const MVPbkContactLink * | ParentContact | ( | ) | const |
Returns a link to the parent contact.
Returns: Link to the parent contact.
IMPORT_C void | SetFlags | ( | TUint | aFlags | ) |
Sets the view state flags.
Parameter | Description |
---|---|
aFlags | The flags to set. |
IMPORT_C void | SetFocusedContact | ( | MVPbkContactLink * | aContact | ) |
Sets focused contact to given contact.
Parameter | Description |
---|---|
aContact | The contact to set. |
IMPORT_C void | SetFocusedFieldIndex | ( | TInt | aIndex | ) |
Sets the index of the focused field to the given index. KErrNotFound indicates there is no focused field information available.
Parameter | Description |
---|---|
aIndex | The index to set. |
IMPORT_C void | SetFocusedPropertiesIndex | ( | TInt | aIndex | ) |
Sets the index of the focused properties item to the given index. KErrNotFound indicates there is no focused properties item information available.
Parameter | Description |
---|---|
aIndex | The index to set. |
IMPORT_C void | SetMarkedContacts | ( | MVPbkContactLinkArray * | aArray | ) |
Sets marked contacts according to given array of contact links.
Parameter | Description |
---|---|
aArray | The contacts to set marked. |
IMPORT_C void | SetParentContact | ( | MVPbkContactLink * | aParentContact | ) |
Sets parent contact to given contact.
Parameter | Description |
---|---|
aParentContact | The contact to set. |
IMPORT_C void | SetTopContact | ( | MVPbkContactLink * | aTopContact | ) |
Sets top contact to given contact.
Parameter | Description |
---|---|
aTopContact | The contact to set. |
IMPORT_C void | SetTopFieldIndex | ( | TInt | aIndex | ) |
Sets the index of the topmost field to the given index. KErrNotFound indicates there is no topmost field information available.
Parameter | Description |
---|---|
aIndex | The index to set. |
IMPORT_C void | SetTopPropertiesIndex | ( | TInt | aIndex | ) |
Sets the index of the topmost properties item to the given index. KErrNotFound indicates there is no topmost properties item information available.
Parameter | Description |
---|---|
aIndex | The index to set. |
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.
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.
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.
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.
IMPORT_C const MVPbkContactLink * | TopContact | ( | ) | const |
Returns a link to the the topmost contact. Null if not set.
Returns: Link to the topmost contact.
IMPORT_C TInt | TopFieldIndex | ( | ) | const |
Returns the index of the top field. KErrNotFound indicates there is no focused field information available.
Returns: Field index.
IMPORT_C TInt | TopPropertiesIndex | ( | ) | const |
Returns the index of the top properties item. KErrNotFound indicates there is no focused properties item information available.
Returns: Properties item index.
IMPORT_C TUid | Uid | ( | ) | [static] |
Returns the message uid for use with view server messages.
Returns: Message uid.
IMPORT_C void | UnpackL | ( | const TDesC8 & | aPack | ) |
Sets this view state from given packaged buffer.
Parameter | Description |
---|---|
aPack | Packaged view state buffer. |
IMPORT_C TBool | operator== | ( | const CPbk2ViewState & | aRhs | ) | const |
Comparison operator.
Parameter | Description |
---|---|
aRhs | View state instance to compare to this instance. |
Returns: ETrue if view states are equal, EFalse otherwise.