class CVPbkPhoneNumberMatchStrategy : public CBase |
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.
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 () |
Private Member Functions | |
---|---|
MVPbkContactOperation * | CreateFindOperationLC (const TDesC &) |
void | InitMatchingL () |
Public Member Enumerations | |
---|---|
enum | TVPbkPhoneNumberMatchFlags { EVPbkMatchFlagsNone = 0x00000000, EVPbkExactMatchFlag = 0x00000001, EVPbkStopOnFirstMatchFlag = 0x00000002, EVPbkDuplicatedContactsMatchFlag = 0x00000004, EVPbkBestMatchingFlag = 0x00000008 } |
enum | TVPbkPhoneNumberMatchMode { EVPbkSequentialMatch , EVPbkParallelMatch } |
Private Attributes | |
---|---|
CVPbkPhoneNumberMatchStrategyImpl * | iImpl |
void | BaseConstructL | ( | const TConfig & | aConfig, |
CVPbkContactManager & | aContactManager, | |||
MVPbkContactFindObserver & | aObserver | |||
) | [protected] |
Initializes the base class. Derived classes must call this in their ConstructL.
const TConfig & aConfig | Configuration data for phone number matching. |
CVPbkContactManager & aContactManager | Contact manager reference, |
MVPbkContactFindObserver & aObserver | Contact find observer reference. |
MVPbkContactOperation * | CreateFindOperationLC | ( | const TDesC & | aPhoneNumber | ) | [private, pure virtual] |
Creates a new find operation for the next finding step.
const TDesC & aPhoneNumber | Phone number to match. |
MVPbkContactFindObserver & | FindObserver | ( | ) | const [protected] |
Returns the find observer to be used for find operations created in CreateFindOperationLC.
void | InitMatchingL | ( | ) | [private, pure virtual] |
Called from MatchL to indicate derived classes that matching is about to start.
TBool | IsSimStore | ( | const MVPbkContactStore & | aStore | ) | [protected] |
Checks if contact store is SIM store.
const MVPbkContactStore & aStore | Store to be checked. |
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.
const TDesC & aPhoneNumber | Phone number to match. |
TInt | MaxMatchDigits | ( | ) | const [protected] |
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.
const TConfig & aConfig | Configuration data for phone number matching. |
CVPbkContactManager & aContactManager | Contact manager to be used in matching. |
MVPbkContactFindObserver & aObserver | Observer for the matching operation. |
TArray < MVPbkContactStore * > | StoresToMatch | ( | ) | const [protected] |
Returns array of stores that are used in matching.
Phone number matching flags. The flags can be used to configure the phone number matching strategy.
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 |
Phone number matching mode. The mode can be used to configure the match algorithms operation mode.
EVPbkSequentialMatch |
Performs the search sequentially for each store. |
EVPbkParallelMatch |
Performs the search concurrently for each store. |
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.