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()

void ClearMarks ( ) [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 *)

void DynInitMenuPaneL ( TInt aResourceId,
CEikMenuPane * aMenuPane
) const [pure virtual]

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

AknSelectionService::HandleMarkableListDynInitMenuPane

Parameters

TInt aResourceId The resource id of the menu pane.
CEikMenuPane * aMenuPane The 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()

void HideThumbnail ( ) [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)

void ProcessCommandL ( TInt aCommandId ) const [pure virtual]

Parameters

TInt aCommandId The id of the selected command.

RegisterCommand(MPbk2Command *)

void RegisterCommand ( MPbk2Command * aCommand ) [pure virtual]

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

Parameters

MPbk2Command * aCommand Command that is registered to the UI control.

ResetFindL()

void ResetFindL ( ) [pure virtual]

Resets any strings in the find box.

RestoreControlStateL(CPbk2ViewState *)

void RestoreControlStateL ( CPbk2ViewState * aState ) [pure virtual]

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

Parameters

CPbk2ViewState * aState The 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)

void SetBlank ( TBool aBlank ) [pure virtual]

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

Parameters

TBool aBlank ETrue blanks the control, EFalse unblanks it.

SetFocusedContactIndexL(TInt)

void SetFocusedContactIndexL ( TInt aIndex ) [pure virtual]

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

Parameters

TInt aIndex The index of the contact to focus.

SetFocusedContactL(const MVPbkBaseContact &)

void SetFocusedContactL ( 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 & aContact Contact to focus.

SetFocusedContactL(const MVPbkContactBookmark &)

void SetFocusedContactL ( 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 & aContactBookmark Contact to focus.

SetFocusedContactL(const MVPbkContactLink &)

void SetFocusedContactL ( 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 & aContactLink Contact to focus.

SetFocusedFieldIndex(TInt)

void SetFocusedFieldIndex ( TInt aIndex ) [pure virtual]

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

Parameters

TInt aIndex The index of the field to focus.

SetSelectedContactL(TInt, TBool)

void SetSelectedContactL ( TInt aIndex,
TBool aSelected
) [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 aIndex Index of the contact to set the selection status.
TBool aSelected If ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetSelectedContactL(const MVPbkContactBookmark &, TBool)

void SetSelectedContactL ( const MVPbkContactBookmark & aContactBookmark,
TBool aSelected
) [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 & aContactBookmark Identifies the selected contact. If contact is not found from the control then nothing is done.
TBool aSelected If ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetSelectedContactL(const MVPbkContactLink &, TBool)

void SetSelectedContactL ( const MVPbkContactLink & aContactLink,
TBool aSelected
) [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 & aContactLink Identifies the selected contact. If contact is not found from the control then nothing is done.
TBool aSelected If ETrue the contact at the given index is set to selected, otherwise the contact will be deselected.

SetTextL(const TDesC &)

void SetTextL ( const TDesC & aText ) [pure virtual]

Sets a text for a control.

Parameters

const TDesC & aText New text for the control

ShowThumbnail()

void ShowThumbnail ( ) [pure virtual]

Shows the thumbnail image.

UpdateAfterCommandExecution()

void UpdateAfterCommandExecution ( ) [pure virtual]

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

AknSelectionService::HandleMarkableListUpdateAfterCommandExecution