#include <app/MVPbkContactViewFiltering.h>
class MVPbkContactViewFiltering |
Public Member Functions | |
---|---|
virtual TAny * | ContactViewFilteringExtension(TUid) |
pure virtual MVPbkContactViewBase * | CreateFilteredViewLC(MVPbkContactViewObserver &, const MDesCArray &, const MVPbkContactBookmarkCollection *) |
pure virtual void | UpdateFilterL(const MDesCArray &, const MVPbkContactBookmarkCollection *) |
Protected Member Functions | |
---|---|
~MVPbkContactViewFiltering() |
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.
~MVPbkContactViewFiltering | ( | ) | [protected, inline] |
Virtual Phonebook client doesn't own this instance.
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.
Parameter | Description |
---|---|
aObserver | The observer that will be notified when the view is ready. Client shouldn't use the view before it has been notified. |
aFindWords | An array of words that must match to the contact. |
aAlwaysIncluded | Contacts 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.
void | UpdateFilterL | ( | 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.
KErrNotSupported |
if the view itself is not a filtered view. |
Parameter | Description |
---|---|
aFindWords | an array of words that must match to the contact. |
aAlwaysIncluded | Contacts 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. |