#include <app/CVPbkPhoneNumberMatchStrategy.h>
class CVPbkPhoneNumberMatchStrategy : public CBase |
Public Member Enumerations | |
---|---|
enum | TVPbkPhoneNumberMatchFlags { EVPbkMatchFlagsNone, EVPbkExactMatchFlag, EVPbkStopOnFirstMatchFlag, EVPbkDuplicatedContactsMatchFlag, EVPbkBestMatchingFlag } |
enum | TVPbkPhoneNumberMatchMode { EVPbkSequentialMatch, EVPbkParallelMatch } |
Public Member Functions | |
---|---|
~CVPbkPhoneNumberMatchStrategy() | |
IMPORT_C void | MatchL(const TDesC &) |
IMPORT_C CVPbkPhoneNumberMatchStrategy * | NewL(const TConfig &, CVPbkContactManager &, MVPbkContactFindObserver &) |
Protected Member Functions | |
---|---|
CVPbkPhoneNumberMatchStrategy() | |
void | BaseConstructL(const TConfig &, CVPbkContactManager &, MVPbkContactFindObserver &) |
MVPbkContactFindObserver & | FindObserver() |
TBool | IsSimStore(const MVPbkContactStore &) |
TInt | MaxMatchDigits() |
TArray< MVPbkContactStore * > | StoresToMatch() |
Phone number matching strategy. This is the base class of actual implementations, but instances of the strategies are created using this classes NewL function. Actual implementation selection is done based on the given configuration data. In case of multiple matches from different stores, results from store configured in Phonebook 2 settings are returned. Only if no match is found from configured store(s), then return matches from other stores.
Phone number matching flags. The flags can be used to configure the phone number matching strategy.
Enumerator | Value | Description |
---|---|---|
EVPbkMatchFlagsNone | 0x00000000 |
No additional matching flags. |
EVPbkExactMatchFlag | 0x00000001 |
Quarantees that only contacts with an exact match are included in the result set. The resulted contact links are also field links in this case. The link points to the first field in the contact with exact match. See RetrieveField in MVPbkStoreContactFieldCollection. |
EVPbkStopOnFirstMatchFlag | 0x00000002 |
Stops the search once at least one contact is found. |
EVPbkDuplicatedContactsMatchFlag | 0x00000004 |
If all matched contacts have the same first name and last name field values only first one is returned. |
EVPbkBestMatchingFlag | 0x00000008 |
Enables additional set of rules to compare numbers |
void | BaseConstructL | ( | const TConfig & | aConfig, |
CVPbkContactManager & | aContactManager, | |||
MVPbkContactFindObserver & | aObserver | |||
) | [protected] |
Initializes the base class. Derived classes must call this in their ConstructL.
Parameter | Description |
---|---|
aConfig | Configuration data for phone number matching. |
aContactManager | Contact manager reference, |
aObserver | Contact find observer reference. |
MVPbkContactFindObserver & | FindObserver | ( | ) | const [protected] |
Returns the find observer to be used for find operations created in CreateFindOperationLC.
Returns: Contact find observer
TBool | IsSimStore | ( | const MVPbkContactStore & | aStore | ) | [protected] |
Checks if contact store is SIM store.
Parameter | Description |
---|---|
aStore | Store to be checked. |
Returns: ETrue if aStore is SIM store, otherwise EFalse.
IMPORT_C void | MatchL | ( | const TDesC & | aPhoneNumber | ) |
Tries to find matches for given phone number from the stores that were specified in the configuration data. This is asynchronous operation and the observer will be called back when this operation completes.
Parameter | Description |
---|---|
aPhoneNumber | Phone number to match. |
TInt | MaxMatchDigits | ( | ) | const [protected] |
Returns maximum number of digits used in matching.
Returns: Maximum number of digits used in matching.
IMPORT_C CVPbkPhoneNumberMatchStrategy * | NewL | ( | const TConfig & | aConfig, |
CVPbkContactManager & | aContactManager, | |||
MVPbkContactFindObserver & | aObserver | |||
) | [static] |
Acts as a factory function for strategy implementation classes derived from this class. The actual implementation class is determined from the parameters of this function.
Parameter | Description |
---|---|
aConfig | Configuration data for phone number matching. |
aContactManager | Contact manager to be used in matching. |
aObserver | Observer for the matching operation. |
Returns: Newly created instance of a class derived from this class.
TArray< MVPbkContactStore * > | StoresToMatch | ( | ) | const [protected] |
Returns array of stores that are used in matching.
Returns: Array of stores that are used in matching.