MVPbkContactViewFiltering Class Reference

#include <app/MVPbkContactViewFiltering.h>

Link against: VPbkEng.lib

class MVPbkContactViewFiltering
Public Member Functions
virtual TAny *ContactViewFilteringExtension(TUid)
pure virtual MVPbkContactViewBase *CreateFilteredViewLC(MVPbkContactViewObserver &, const MDesCArray &, const MVPbkContactBookmarkCollection *)
pure virtual voidUpdateFilterL(const MDesCArray &, const MVPbkContactBookmarkCollection *)
Protected Member Functions
~MVPbkContactViewFiltering()

Detailed Description

An interface for text based contact view filtering.

Contact views can support filtering based on search string and always included contacts by implementing this interface.

A view stack usage:

The client can create a stack structure of filtered views. E.g

1) Client creates a filtered view using find text "J" 2) It then waits that the new view becomes ready. 3) Then it uses the new view to create next level view for "Jo". 4) The client waits that the new view becomes ready. 5) The client again uses the new view for creating third level view "Joe" 6) After the third filtered view becomes ready the client has 4 views: The base view that includes all the contacts and 3 filtered views for texts "J", "Jo" and "Joe". It's up to store implementation to optimize the used resources in case the store supports thousands of contacts.

If client uses always included contacts then they must be same for all views in a stack.

View events must come in order: bottom view first.

Constructor & Destructor Documentation

~MVPbkContactViewFiltering ( )

~MVPbkContactViewFiltering()[protected, inline]

Virtual Phonebook client doesn't own this instance.

Member Function Documentation

ContactViewFilteringExtension ( TUid )

TAny *ContactViewFilteringExtension(TUid)[inline, virtual]

Returns an extension point for this interface or NULL.

Returns: an extension point for this interface or NULL.

CreateFilteredViewLC ( MVPbkContactViewObserver &, const MDesCArray &, const MVPbkContactBookmarkCollection * )

MVPbkContactViewBase *CreateFilteredViewLC(MVPbkContactViewObserver &aObserver,
const MDesCArray &aFindWords,
const MVPbkContactBookmarkCollection *aAlwaysIncluded
)[pure virtual]

Creates a new filtered view asynchronously.

The parent view will be filtered according to given criteria and then the client will be notified via MVPbkContactViewObserver. The parent view must be ready before creating a new filtered view, The created view must be destroyed before the parent view and not vice versa.

ParameterDescription
aObserverThe observer that will be notified when the view is ready. Client shouldn't use the view before it has been notified.
aFindWordsAn array of words that must match to the contact.
aAlwaysIncludedContacts that must be in the view even they don't match to aFindWords. This an optional parameter. Give NULL if not needed. Client must keep the instance alive while the view exists.

Returns: a filtered view that must also support view filtering.

UpdateFilterL ( const MDesCArray &, const MVPbkContactBookmarkCollection * )

voidUpdateFilterL(const MDesCArray &aFindWords,
const MVPbkContactBookmarkCollection *aAlwaysIncluded
)[pure virtual]

Updates an existing filtered view asynchronously.

This must be implemented by the views that were previously created by CreateFilteredViewLC. Otherwise leaves with KErrNotSupported.

Exceptions
KErrNotSupported

if the view itself is not a filtered view.

ParameterDescription
aFindWordsan array of words that must match to the contact.
aAlwaysIncludedContacts that must be in the view even they don't match to aFindWords. This an optional parameter. Give NULL if not needed. Client must keep the instance alive while the view exists.