class CContactViewFindConfigInterface : public CBase |
An interface class that enables implementers to configure the way in which words are matched in CContactViewBase::ContactsMatchingCriteriaL() and CContactViewBase::ContactsMatchingPrefixL().
By default these two functions use TDesC16::MatchC() to do the matching, but where this is not appropriate, for instance in Chinese locales, a plug-in that implements this interface should be supplied. The plug-in's UID should be passed to CContactViewBase::SetViewFindConfigPlugin(), then the plug-in will be loaded when ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() is called. Note that the plug-in is only loaded once per view, not each time a find is requested. Note also that the plug-in is optional. If no plug-in is supplied, TDesC16::MatchC() is used instead.
Public Member Functions | |
---|---|
~CContactViewFindConfigInterface() | |
void | Close() |
TBool | IsWordValidForMatching(const TDesC &) |
TBool | Match(const TDesC &, const TDesC &) |
TBool | MatchRefineL(const TDesC &, const TDesC &) |
CContactViewFindConfigInterface * | NewL(TUid) |
void | OpenL() |
Private Attributes | |
---|---|
TUid | iDtor_ID_Key |
~CContactViewFindConfigInterface | ( | ) | [inline, virtual] |
Virtual destructor.
void | Close | ( | ) | [pure virtual] |
May be used by the implementor of the interface to provide destruction-like behaviour.
For example, it might be used to close a connection to a predictive text input database, or might be used for reference counting of shared objects (using TLS to store the data).
TBool | IsWordValidForMatching | ( | const TDesC & | aWord | ) | [pure virtual] |
Tests whether a specified word is valid to be matched by the plug-in's implementation of Match().
For instance, in an implementation for a Chinese locale, this function would return EFalse for non-Chinese words.
Any words that are not valid to be matched by the plug-in will be matched using TDesC16::MatchC() instead.
const TDesC & aWord | The word to be checked. Note that it contains a '*' wildcard character at the end and optionally one at the beginning, depending on whether ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() was called. |
TBool | Match | ( | const TDesC & | aContactsField, |
const TDesC & | aWord | |||
) | [pure virtual] |
Searches for a string with wildcards in a single field in a contact item.
const TDesC & aContactsField | The contents of the contact item field to search. |
const TDesC & aWord | The string to search for in aContactsField. Note that it contains a '*' wildcard character at the end and optionally one at the beginning, depending on whether ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() was called. |
TBool | MatchRefineL | ( | const TDesC & | aItemString, |
const TDesC & | aSearchText | |||
) | [pure virtual] |
An optimisation function that may be used to implement incremental find, i.e. involving only the results of a previous search, rather than the entire view.
This function is not called in v7.0s, but is provided for possible future use.
CContactViewFindConfigInterface * | NewL | ( | TUid | aImplementationUid | ) | [static, inline] |
Allocates and constructs an instance of the plug-in interface.
TUid aImplementationUid | The UID of the find configuration implementation to instantiate. |
void | OpenL | ( | ) | [pure virtual] |
May be used by the implementor of the interface to provide construction-like behaviour.
For example, it might be used to open a connection to a predictive text input database, or might be used for reference counting of shared objects (using TLS to store the data).
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.