#include <app/cntview.h>
Link against: cntview.lib
class CContactFindView : public CContactViewBase, public MContactViewObserver, public CContactViewBase, public MContactViewObserver |
Public Member Functions | |
---|---|
~CContactFindView() | |
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 TInt | CountL() |
virtual TInt | FindL(TContactItemId) |
IMPORT_C CContactFindView * | NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *) |
IMPORT_C CContactFindView * | NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *, TSearchType) |
IMPORT_C CContactFindView * | NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *) |
IMPORT_C CContactFindView * | NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *, TSearchType) |
IMPORT_C void | RefineFindViewL(MDesCArray *) |
virtual const RContactViewSortOrder & | SortOrderL() |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | UpdateFindViewL() |
Inherited Attributes | |
---|---|
CContactViewBase::iDb | |
CContactViewBase::iExtension | |
CContactViewBase::iState |
Inherited Enumerations | |
---|---|
CContactViewBase:TFunction | |
CContactViewBase:TSearchType | |
CContactViewBase:TState |
Provides a view of an existing CContactViewBase-derived object, populated using search criteria.
The find view only contains contact items from the underlying view that match the search criteria.
The find view observes its underlying view so that it is kept up to date if the contents of the underlying view change.
The search criteria (one or more words) are held in an MDesCArray object. The fields involved in the search are those that have been used to sort the underlying view.
Reimplemented from CContactViewBase::AllFieldsLC(TInt,const TDesC &)const
Returns a descriptor containing the contents of all fields in an item in the view.
The fields are separated by aSeparator.
Parameters | |
---|---|
aIndex | The index into the 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 find view.
Parameters | |
---|---|
aIndex | Index of the contact item ID into the find view. |
Leave Codes | |
---|---|
KErrNotFound | aIndex is outside the bounds of the array. |
Reimplemented from CContactViewBase::CContactViewBase_Reserved_1(TFunction,TAny *)
This is a reserved virtual exported function that is used for BC proofing against present and future additions of new exported virtual functions.
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 | |
---|---|
KErrNotFound | aIndex is outside the bounds of the array. |
TContactViewPreferences | ContactViewPreferences | ( | ) | [virtual] |
Reimplemented from CContactViewBase::ContactViewPreferences()
Gets the underlying view's view preferences.
TInt | CountL | ( | ) | const [virtual] |
Reimplemented from CContactViewBase::CountL()const
Gets the number of contact item IDs in the find view.
TInt | FindL | ( | TContactItemId | aId | ) | const [virtual] |
Reimplemented from CContactViewBase::FindL(TContactItemId)const
Finds the index into the array 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 CContactFindView * | NewL | ( | const CContactDatabase & | aDb, |
CContactViewBase & | aView, | |||
MContactViewObserver & | aObserver, | |||
MDesCArray * | aFindWords | |||
) | [static] |
Allocates and constructs a new CContactFindView version 1 object, using a default search type of CContactViewBase::EFullSearch.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone.
Parameters | |
---|---|
aDb | The database containing the contact items. |
aView | The underlying contact view. |
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. |
aFindWords | The array of search terms. The view does not take ownership of this - it makes its own copy of it to prevent it from going out of scope. |
IMPORT_C CContactFindView * | NewL | ( | const CContactDatabase & | aDb, |
CContactViewBase & | aView, | |||
MContactViewObserver & | aObserver, | |||
MDesCArray * | aFindWords, | |||
TSearchType | aSearchType | |||
) | [static] |
Allocates and constructs a new CContactFindView version 1 object, specifying a search type.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone.
Parameters | |
---|---|
aDb | The database containing the contact items. |
aView | The underlying contact view. |
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. |
aFindWords | The array of search terms. The view does not take ownership of this - it makes its own copy of it to prevent it from going out of scope. |
aSearchType | The search type. This controls whether a search term can occur anywhere in a contact item field, or just at the beginning of the field. |
IMPORT_C CContactFindView * | NewL | ( | CContactViewBase & | aView, |
const CContactDatabase & | aDb, | |||
MContactViewObserver & | aObserver, | |||
MDesCArray * | aFindWords | |||
) | [static] |
Allocates and constructs a new CContactFindView version 2 object, using a default search type of CContactViewBase::EFullSearch.
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. |
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. |
aFindWords | The array of search terms. The view does not take ownership of this - it makes its own copy of it to prevent it from going out of scope. |
IMPORT_C CContactFindView * | NewL | ( | CContactViewBase & | aView, |
const CContactDatabase & | aDb, | |||
MContactViewObserver & | aObserver, | |||
MDesCArray * | aFindWords, | |||
TSearchType | aSearchType | |||
) | [static] |
Allocates and constructs a new CContactFindView version 2 object, specifying a search type.
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. |
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. |
aFindWords | The array of search terms. The view does not take ownership of this - it makes its own copy of it to prevent it from going out of scope. |
aSearchType | The search type. This controls whether a search term can occur anywhere in a contact item field, or just at the beginning of the field. |
IMPORT_C void | RefineFindViewL | ( | MDesCArray * | aFindWords | ) |
Refines the search criteria and updates the find view.
This may involve either narrowing or replacing the search criteria.
This function can be used to narrow the existing search criteria, by specifying an array of search terms that consists of the existing search terms (as passed to the NewL()) with additional terms appended to it. In this case, the function searches the existing list of matching contact items only. This assumes that UpdateFindViewL() has previously been called.
It can alternatively be used to replace entirely the existing search criteria. In this case, the whole underlying view is searched again.
Parameters | |
---|---|
aFindWords | The new search criteria. This can be a superset of the existing search criteria, i.e. the existing criteria with additional terms appended to it; otherwise it replaces the existing search criteria entirely. |
const RContactViewSortOrder & | SortOrderL | ( | ) | const [virtual] |
Reimplemented from CContactViewBase::SortOrderL()const
Gets the underlying view's sort order.