CContactFindView Class Reference
class CContactFindView : public CContactViewBase
|
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.
Public Member Functions
|
|
~CContactFindView
()
|
HBufC
*
|
AllFieldsLC
(
TInt
, const
TDesC
&)
|
TContactItemId
|
AtL
(
TInt
)
|
TAny
*
|
CContactViewBase_Reserved_1
(
TFunction
,
TAny
*)
|
const
CViewContact
&
|
ContactAtL
(
TInt
)
|
TContactViewPreferences
|
ContactViewPreferences
()
|
TInt
|
CountL
()
|
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 *)
|
const
RContactViewSortOrder
&
|
SortOrderL
()
|
Inherited Functions
|
|
CBase::CBase()
|
|
CBase::Delete(CBase *)
|
|
CBase::Extension_(TUint,TAny *&,TAny *)
|
|
CBase::operator new(TUint)
|
|
CBase::operator new(TUint,TAny *)
|
|
CBase::operator new(TUint,TLeave)
|
|
CBase::operator new(TUint,TLeave,TUint)
|
|
CBase::operator new(TUint,TUint)
|
|
CBase::~CBase()
|
|
CContactViewBase::CContactViewBase(const CContactDatabase &)
|
|
CContactViewBase::Close(const MContactViewObserver &)
|
|
CContactViewBase::CompareContactIds(const CViewContact &,const CViewContact &)
|
|
CContactViewBase::CompareContactsAndIdsL(const CViewContact &,const CViewContact &)const
|
|
CContactViewBase::CompareFieldsL(const CViewContact &,const CViewContact &)
|
|
CContactViewBase::ConstructL()
|
|
CContactViewBase::ContactIsSortable(const CViewContact &)
|
|
CContactViewBase::ContactsMatchingCriteriaL(const MDesCArray &,RPointerArray< CViewContact > &)
|
|
CContactViewBase::ContactsMatchingPrefixL(const MDesCArray &,RPointerArray< CViewContact > &)
|
|
CContactViewBase::Error()const
|
|
CContactViewBase::FieldsWithSeparatorLC(const RPointerArray< CViewContact > &,TInt,const TDesC &)const
|
|
CContactViewBase::FindDefaultViewSortPluginImplL()const
|
|
CContactViewBase::FindSortPluginImplL(const TDesC8 &,TBool)const
|
|
CContactViewBase::GetContactIdsL(const CArrayFix< TInt > &,CContactIdArray &)
|
|
CContactViewBase::GetViewFindConfigPlugin()
|
|
CContactViewBase::GetViewSortPluginImplUid()const
|
|
CContactViewBase::IdsEqual(const TContactIdWithMapping &,const TContactIdWithMapping &)
|
|
CContactViewBase::IdsMatch(const CViewContact &,const CViewContact &)
|
|
CContactViewBase::IndexesEqual(const TContactIdWithMapping &,const TContactIdWithMapping &)
|
|
CContactViewBase::InsertContactInView(RPointerArray< CViewContact > &,const CViewContact *,TBool,TInt *)const
|
|
CContactViewBase::IsContactSortable(const CViewContact &,TContactViewPreferences &)const
|
|
CContactViewBase::LoadViewSortPluginL(TUid,TContactViewPreferences &)
|
|
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &)
|
|
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &,TSearchType)
|
|
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &,TSearchType,CContactViewBase::CContactViewBaseExtension *)
|
|
CContactViewBase::NotifyObserverAsync(MContactViewObserver &,const TContactViewEvent &)
|
|
CContactViewBase::NotifyObservers(const TContactViewEvent &)
|
|
CContactViewBase::Open(MContactViewObserver &)
|
|
CContactViewBase::OpenL(MContactViewObserver &)
|
|
CContactViewBase::SetViewFindConfigPlugin(TUid)
|
|
CContactViewBase::SortPluginImpl()const
|
|
CContactViewBase::~CContactViewBase()
|
Constructor & Destructor Documentation
CContactFindView(const CContactDatabase &, CContactViewBase &, TSearchType)
Member Functions Documentation
AllFieldsLC(TInt, const TDesC &)
HBufC
*
|
AllFieldsLC
|
(
|
TInt
|
aIndex,
|
|
const
TDesC
&
|
aSeparator
|
|
)
|
const [virtual]
|
Returns a descriptor containing the contents of all fields in an item in the view.
The fields are separated by aSeparator.
Parameters
TInt
aIndex
|
The index into the view of the contact item.
|
const
TDesC
& aSeparator
|
The string to use to separate the fields.
|
AtL(TInt)
Gets the contact item ID at the specified index into the find view.
-
leave
-
KErrNotFound aIndex is outside the bounds of the array.
Parameters
TInt
aIndex
|
Index of the contact item ID into the find view.
|
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.
ConstructL(MContactViewObserver &, MDesCArray *)
ContactAtL(TInt)
Gets the contact item at the specified index into the view.
-
leave
-
KErrNotFound aIndex is outside the bounds of the array.
Parameters
TInt
aIndex
|
Index into the view of the required item.
|
ContactViewPreferences()
TContactViewPreferences
|
ContactViewPreferences
|
(
|
)
|
[virtual]
|
Gets the underlying view's view preferences.
CopyNewFindWordsL(MDesCArray *)
void
|
CopyNewFindWordsL
|
(
|
MDesCArray *
|
aFindWords
|
)
|
[private]
|
CountL()
TInt
|
CountL
|
(
|
)
|
const [virtual]
|
Gets the number of contact item IDs in the find view.
DeleteFindContacts()
void
|
DeleteFindContacts
|
(
|
)
|
[private]
|
DestroyFindWordsArray()
void
|
DestroyFindWordsArray
|
(
|
)
|
[private]
|
FindL(TContactItemId)
Finds the index into the array of the specified contact item.
-
leave
-
KErrNotReady The view is not ready for use.
HandleAddEventL(TContactViewEvent &)
HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)
HandleRemoveEventL(TContactViewEvent &)
InsertContact(const CViewContact *)
Do binary search of Contacts Array, and insert new contact. Uses current Sort Plugin, if any.
NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *)
Parameters
const
CContactDatabase
& aDb
|
The database containing the contact items.
|
CContactViewBase
& aView
|
The underlying contact view.
|
MContactViewObserver
& 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.
|
MDesCArray * 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.
|
NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *, TSearchType)
Parameters
const
CContactDatabase
& aDb
|
The database containing the contact items.
|
CContactViewBase
& aView
|
The underlying contact view.
|
MContactViewObserver
& 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.
|
MDesCArray * 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.
|
TSearchType
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.
|
NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *)
Parameters
CContactViewBase
& aView
|
The underlying contact view.
|
const
CContactDatabase
& aDb
|
The database containing the contact items.
|
MContactViewObserver
& 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.
|
MDesCArray * 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.
|
NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *, TSearchType)
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
CContactViewBase
& aView
|
The underlying contact view.
|
const
CContactDatabase
& aDb
|
The database containing the contact items.
|
MContactViewObserver
& 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.
|
MDesCArray * 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.
|
TSearchType
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.
|
RefineFindViewL(MDesCArray *)
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
MDesCArray * 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.
|
SortOrderL()
Gets the underlying view's sort order.
TightenFindViewCriteriaL()
void
|
TightenFindViewCriteriaL
|
(
|
)
|
[private]
|
UpdateFindViewL()
IMPORT_C void
|
UpdateFindViewL
|
(
|
)
|
[protected, virtual]
|
Populates the view.
This deletes any existing matching contacts list and searches the underlying view for items matching the search criteria.
Member Data Documentation
TUint
iClassVersion
TUint
|
iClassVersion
|
[private]
|
RPointerArray< CViewContact > iFindContacts
const TSearchType iSearchType
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.