#include <app/cntview.h>
Link against: cntview.lib
class CContactFilteredView : public CContactViewBase, public MContactViewObserver, public CContactViewBase, public MContactViewObserver |
Public Member Functions | |
---|---|
~CContactFilteredView() | |
virtual HBufC * | AllFieldsLC(TInt, const TDesC &) |
virtual TContactItemId | AtL(TInt) |
virtual TAny * | CContactViewBase_Reserved_1(TFunction, TAny *) |
virtual const CViewContact & | ContactAtL(TInt) |
virtual TContactViewPreferences | ContactViewPreferences() |
virtual void | ContactsMatchingCriteriaL(const MDesCArray &, RPointerArray< CViewContact > &) |
virtual void | ContactsMatchingPrefixL(const MDesCArray &, RPointerArray< CViewContact > &) |
virtual TInt | CountL() |
virtual TInt | FindL(TContactItemId) |
IMPORT_C CContactFilteredView * | NewL(MContactViewObserver &, const CContactDatabase &, CContactViewBase &, TInt) |
IMPORT_C CContactFilteredView * | NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, TInt) |
virtual const RContactViewSortOrder & | SortOrderL() |
Inherited Attributes | |
---|---|
CContactViewBase::iDb | |
CContactViewBase::iExtension | |
CContactViewBase::iState |
Inherited Enumerations | |
---|---|
CContactViewBase:TFunction | |
CContactViewBase:TSearchType | |
CContactViewBase:TState |
Provides a filtered view over an existing CContactViewBase derived object.
For example, it might provide a view containing only contacts that have an email address. For efficiency reasons there are a limited set of filters available (defined in CContactDatabase::TContactViewFilter).
The filtered view observes its underlying view so that it is kept up to date if the contents of the underlying view change. It will, in turn, notify its observers.
Filters only apply to non-hidden contact fields with content.
~CContactFilteredView | ( | ) |
Reimplemented from CContactViewBase::AllFieldsLC(TInt,const TDesC &)const
Returns a descriptor containing the contents of all fields for an item in the view.
The fields are separated by aSeparator.
Parameters | |
---|---|
aIndex | The index into the filtered view of the contact item. |
aSeparator | The string to use to separate the fields. |
TContactItemId | AtL | ( | TInt | aIndex | ) | const [virtual] |
Reimplemented from CContactViewBase::AtL(TInt)const
Gets the contact item ID at the specified index into the filtered view.
Parameters | |
---|---|
aIndex | Index of the contact item ID into the filtered view. |
Leave Codes | |
---|---|
KErrNotReady | The view is not ready for use. |
KErrNotFound | aIndex is outside the bounds of the filtered view. |
Reimplemented from CContactViewBase::CContactViewBase_Reserved_1(TFunction,TAny *)
This is a reserved virtual exported function that is used for BC proofing against addition of new exported virtual functions. This function now aids addition of new exported virtual methods without having to break BC,by simply having those virtual methods as non-virtual and helper methods, called from this one and only reserved virtual exported method.A public enumeration type that is defined in the base class CContactViewBase identifies which of the helper 'virtual' methods are being called. All derived classes of CContactViewBase that are public should mandatorily implement this method.
Returns any return values of the helper methods called from this function.
Parameters | |
---|---|
aFunction | an enum value that identifies which helper method is called. |
aParams | parameters to the helper method being called. |
Capability | |
---|---|
ReadUserData |
const CViewContact & | ContactAtL | ( | TInt | aIndex | ) | const [virtual] |
Reimplemented from CContactViewBase::ContactAtL(TInt)const
Gets the contact item at the specified index into the view.
Parameters | |
---|---|
aIndex | Index into the view of the required item. |
Leave Codes | |
---|---|
KErrNotReady | The view is not ready for use. |
KErrNotFound | aIndex is outside the bounds of the filtered ID array. |
TContactViewPreferences | ContactViewPreferences | ( | ) | [virtual] |
Reimplemented from CContactViewBase::ContactViewPreferences()
Gets the underlying view's view preferences.
void | ContactsMatchingCriteriaL | ( | const MDesCArray & | aFindWords, |
RPointerArray< CViewContact > & | aMatchedContacts | |||
) | [virtual] |
Reimplemented from CContactViewBase::ContactsMatchingCriteriaL(const MDesCArray &,RPointerArray< CViewContact > &)
Searches all contact items in the filtered view for fields that contain all of the search strings specified.
The search uses wildcard matching so that the search strings can occur anywhere in an item's fields. For a match to occur, all of the search strings must be found in the contact item.
Parameters | |
---|---|
aFindWords | A descriptor array containing one or more search strings. |
aMatchedContacts | On return, an array of matching contact items. |
void | ContactsMatchingPrefixL | ( | const MDesCArray & | aFindWords, |
RPointerArray< CViewContact > & | aMatchedContacts | |||
) | [virtual] |
Reimplemented from CContactViewBase::ContactsMatchingPrefixL(const MDesCArray &,RPointerArray< CViewContact > &)
Searches all contact items in the filtered view for fields that contain all of the search strings specified.
Unlike ContactsMatchingCriteriaL(), the search term can only occur at the beginning of a field.
Parameters | |
---|---|
aFindWords | A descriptor array containing one or more search strings. |
aMatchedContacts | On return, an array of matching contact items. |
TInt | CountL | ( | ) | const [virtual] |
Reimplemented from CContactViewBase::CountL()const
Leave Codes | |
---|---|
KErrNotReady | The view is not ready for use. |
TInt | FindL | ( | TContactItemId | aId | ) | const [virtual] |
Reimplemented from CContactViewBase::FindL(TContactItemId)const
Finds the index into the filtered view of the specified contact item.
Parameters | |
---|---|
aId | The contact item ID to search for. |
Leave Codes | |
---|---|
KErrNotReady | The view is not ready for use. |
IMPORT_C CContactFilteredView * | NewL | ( | MContactViewObserver & | aObserver, |
const CContactDatabase & | aDb, | |||
CContactViewBase & | aView, | |||
TInt | aFilter | |||
) | [static] |
Allocates and constructs a CContactFilteredView version 1 object.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item
Parameters | |
---|---|
aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
aDb | The database containing the contact items. |
aView | The underlying contact view over which this view provides a filter. |
aFilter | The filter to use. For possible values, see CContactDatabase::TContactViewFilter. |
IMPORT_C CContactFilteredView * | NewL | ( | CContactViewBase & | aView, |
const CContactDatabase & | aDb, | |||
MContactViewObserver & | aObserver, | |||
TInt | aFilter | |||
) | [static] |
Allocates and constructs a CContactFilteredView version 2 object.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item
Parameters | |
---|---|
aView | The underlying contact view over which this view provides a filter. |
aDb | The database containing the contact items. |
aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
aFilter | The filter to use. For possible values, see CContactDatabase::TContactViewFilter. |
const RContactViewSortOrder & | SortOrderL | ( | ) | const [virtual] |
Reimplemented from CContactViewBase::SortOrderL()const
Gets the underlying view's sort order.