MPbk2ContactUiControl Class Reference

class MPbk2ContactUiControl

Phonebook 2 contact UI control interface. The contact UI control can display three types of items: A. Contacts B. Contact fields C. Command placeholders (the user can launch the command by clicking or opening the command list item. The command placeholders always appear at the top of the list. At a certain moment the UI control can show both A and C in the list.

Constructor & Destructor Documentation

~MPbk2ContactUiControl()

~MPbk2ContactUiControl()[inline, virtual]

Destructor.

Member Functions Documentation

ClearMarks()

voidClearMarks()[pure virtual]

Clears all marked contacts.

ContactUiControlExtension(TUid)

TAny *ContactUiControlExtension(TUid)[inline, virtual]

Returns an extension point for this interface or NULL.

Parameters

TUid

ContactsMarked()

TBool ContactsMarked()const [pure virtual]

Returns ETrue if there are marked contacts.

ControlStateL()

CPbk2ViewState *ControlStateL()const [pure virtual]

Gets the control state.

DynInitMenuPaneL(TInt, CEikMenuPane *)

voidDynInitMenuPaneL(TIntaResourceId,
CEikMenuPane *aMenuPane
)const [pure virtual]

Updates the control specific menu items. Call from control owner's DynInitMenuPaneL.

AknSelectionService::HandleMarkableListDynInitMenuPane

Parameters

TInt aResourceIdThe resource id of the menu pane.
CEikMenuPane * aMenuPaneThe menu pane.

FindTextL()

const TDesC &FindTextL()[pure virtual]

Gets the text in the find box. Returns KNullDesC if not applicable or there is no text in the box.

FocusedContactIndex()

TInt FocusedContactIndex()const [pure virtual]

Returns the currently focused contact index or KErrNotFound if this control does not support contact level focus.

FocusedContactL()

const MVPbkBaseContact *FocusedContactL()const [pure virtual]

Returns the currently focused contact.

FocusedField()

const MVPbkBaseContactField *FocusedField()const [pure virtual]

Returns the currently focused contact field or NULL if this control does not support field level focus.

FocusedFieldIndex()

TInt FocusedFieldIndex()const [pure virtual]

Returns the currently focused contact field index or KErrNotFound if this control does not support field level focus.

FocusedStoreContact()

const MVPbkStoreContact *FocusedStoreContact()const [pure virtual]

Returns the currently focused contact as a store contact. If the UI control does not have an access to store contacts returns NULL.

FocusedViewContactL()

const MVPbkViewContact *FocusedViewContactL()const [pure virtual]

Returns the currently focused contact as a view contact. If the UI control does not have an access to view contacts returns NULL.

GetMenuFilteringFlagsL()

TInt GetMenuFilteringFlagsL()const [pure virtual]

Gets control's menu filtering flags.

HideThumbnail()

voidHideThumbnail()[pure virtual]

Hides the thumbnail image.

NumberOfContactFields()

TInt NumberOfContactFields()const [pure virtual]

Returns the number of contact fields in the UI control.

NumberOfContacts()

TInt NumberOfContacts()const [pure virtual]

Returns the number of contacts in the UI control.

ParentControl()

MPbk2ContactUiControl *ParentControl()const [pure virtual]

Returns the parent control of this control or NULL if this is the control at the bottom. Ownership is not given.

ProcessCommandL(TInt)

voidProcessCommandL(TIntaCommandId)const [pure virtual]

Offers the command to the control.

AknSelectionService::HandleMarkableListProcessCommandL

Parameters

TInt aCommandIdThe id of the selected command.

RegisterCommand(MPbk2Command *)

voidRegisterCommand(MPbk2Command *aCommand)[pure virtual]

Registers a command to the UI control. Does not pass ownership.

Parameters

MPbk2Command * aCommandCommand that is registered to the UI control.

ResetFindL()

voidResetFindL()[pure virtual]

Resets any strings in the find box.

RestoreControlStateL(CPbk2ViewState *)

voidRestoreControlStateL(CPbk2ViewState *aState)[pure virtual]

Restores the control state to given state, except the focused contact.

Parameters

CPbk2ViewState * aStateThe state to restore.

SelectedContactStoresL()

CArrayPtr< MVPbkContactStore > *SelectedContactStoresL()const [pure virtual]

Returns an array of selected contact stores if the control is a store list control. Other controls return NULL.

SelectedContactsIteratorL()

MPbk2ContactLinkIterator *SelectedContactsIteratorL()const [pure virtual]

Returns an iterator for currently selected contacts. Client gets the ownership of the iterator. If there are no selected contacts, returns NULL.

SelectedContactsL()

MVPbkContactLinkArray *SelectedContactsL()const [pure virtual]

Returns an array of currently selected contacts. If there are no selected contacts, returns NULL. NOTE! When having lots of contacts marked, this function might cause OOM situation. Use SelectedContactsIteratorL() instead.

SelectedContactsOrFocusedContactL()

MVPbkContactLinkArray *SelectedContactsOrFocusedContactL()const [pure virtual]

Returns an array of currently selected contacts. If there are no selected contacts, returns the focused contact. If there are no contacts, returns NULL. NOTE! When having lots of contacts marked, this function might cause OOM situation. Use SelectedContactsIteratorL() instead.

SetBlank(TBool)

voidSetBlank(TBoolaBlank)[pure virtual]

Blanks/unblanks the control. Use when there are massive updates to the databases to avoid flickering.

Parameters

TBool aBlankETrue blanks the control, EFalse unblanks it.

SetFocusedContactIndexL(TInt)

voidSetFocusedContactIndexL(TIntaIndex)[pure virtual]

Sets focused contact index, if negative the top contact is focused.

Parameters

TInt aIndexThe index of the contact to focus.

SetFocusedContactL(const MVPbkBaseContact &)

voidSetFocusedContactL(const MVPbkBaseContact &aContact)[pure virtual]

Sets the focused contact. Doesn't do anything if the contact does not exist in the control.

Parameters

const MVPbkBaseContact & aContactContact to focus.

SetFocusedContactL(const MVPbkContactBookmark &)

voidSetFocusedContactL(const MVPbkContactBookmark &aContactBookmark)[pure virtual]

Sets the focused contact. Doesn't do anything if the contact does not exist in the control.

Parameters

const MVPbkContactBookmark & aContactBookmarkContact to focus.

SetFocusedContactL(const MVPbkContactLink &)

voidSetFocusedContactL(const MVPbkContactLink &aContactLink)[pure virtual]

Sets the focused contact. Doesn't do anything if the contact does not exist in the control.

Parameters

const MVPbkContactLink & aContactLinkContact to focus.

SetFocusedFieldIndex(TInt)

voidSetFocusedFieldIndex(TIntaIndex)[pure virtual]

Sets focused field index, if negative the top field is focused.

Parameters

TInt aIndexThe index of the field to focus.

SetSelectedContactL(TInt, TBool)

voidSetSelectedContactL(TIntaIndex,
TBoolaSelected
)[pure virtual]

Selects or deselects a contact in the control. If the control doesn't support this functionality then it doesn't do anything.

Parameters

TInt aIndexIndex of the contact to set the selection status.
TBool aSelectedIf ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetSelectedContactL(const MVPbkContactBookmark &, TBool)

voidSetSelectedContactL(const MVPbkContactBookmark &aContactBookmark,
TBoolaSelected
)[pure virtual]

Selects or deselects a contact in the control. If the control doesn't support this functionality then it doesn't do anything.

Parameters

const MVPbkContactBookmark & aContactBookmarkIdentifies the selected contact. If contact is not found from the control then nothing is done.
TBool aSelectedIf ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetSelectedContactL(const MVPbkContactLink &, TBool)

voidSetSelectedContactL(const MVPbkContactLink &aContactLink,
TBoolaSelected
)[pure virtual]

Selects or deselects a contact in the control. If the control doesn't support this functionality then it doesn't do anything.

Parameters

const MVPbkContactLink & aContactLinkIdentifies the selected contact. If contact is not found from the control then nothing is done.
TBool aSelectedIf ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetTextL(const TDesC &)

voidSetTextL(const TDesC &aText)[pure virtual]

Sets a text for a control.

Parameters

const TDesC & aTextNew text for the control

ShowThumbnail()

voidShowThumbnail()[pure virtual]

Shows the thumbnail image.

UpdateAfterCommandExecution()

voidUpdateAfterCommandExecution()[pure virtual]

Updates control to the state it should be in after a command execution.

AknSelectionService::HandleMarkableListUpdateAfterCommandExecution