CVPbkPhoneNumberMatchStrategy Class Reference

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.

Inherits from

  • CVPbkPhoneNumberMatchStrategy

Nested Classes and Structures

Constructor & Destructor Documentation

CVPbkPhoneNumberMatchStrategy()

CVPbkPhoneNumberMatchStrategy()[protected]

Constructor.

~CVPbkPhoneNumberMatchStrategy()

~CVPbkPhoneNumberMatchStrategy()

Destructor.

Member Functions Documentation

BaseConstructL(const TConfig &, CVPbkContactManager &, MVPbkContactFindObserver &)

voidBaseConstructL(const TConfig &aConfig,
CVPbkContactManager &aContactManager,
MVPbkContactFindObserver &aObserver
)[protected]

Initializes the base class. Derived classes must call this in their ConstructL.

Parameters

const TConfig & aConfigConfiguration data for phone number matching.
CVPbkContactManager & aContactManagerContact manager reference,
MVPbkContactFindObserver & aObserverContact find observer reference.

CreateFindOperationLC(const TDesC &)

MVPbkContactOperation *CreateFindOperationLC(const TDesC &aPhoneNumber)[private, pure virtual]

Creates a new find operation for the next finding step.

Parameters

const TDesC & aPhoneNumberPhone number to match.

FindObserver()

MVPbkContactFindObserver &FindObserver()const [protected]

Returns the find observer to be used for find operations created in CreateFindOperationLC.

InitMatchingL()

voidInitMatchingL()[private, pure virtual]

Called from MatchL to indicate derived classes that matching is about to start.

IsSimStore(const MVPbkContactStore &)

TBool IsSimStore(const MVPbkContactStore &aStore)[protected]

Checks if contact store is SIM store.

Parameters

const MVPbkContactStore & aStoreStore to be checked.

MatchL(const TDesC &)

IMPORT_C voidMatchL(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.

Parameters

const TDesC & aPhoneNumberPhone number to match.

MaxMatchDigits()

TInt MaxMatchDigits()const [protected]

Returns maximum number of digits used in matching.

NewL(const TConfig &, CVPbkContactManager &, MVPbkContactFindObserver &)

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.

Parameters

const TConfig & aConfigConfiguration data for phone number matching.
CVPbkContactManager & aContactManagerContact manager to be used in matching.
MVPbkContactFindObserver & aObserverObserver for the matching operation.

StoresToMatch()

TArray< MVPbkContactStore * >StoresToMatch()const [protected]

Returns array of stores that are used in matching.

Member Enumerations Documentation

Enum TVPbkPhoneNumberMatchFlags

Phone number matching flags. The flags can be used to configure the phone number matching strategy.

Enumerators

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

Enum TVPbkPhoneNumberMatchMode

Phone number matching mode. The mode can be used to configure the match algorithms operation mode.

Enumerators

EVPbkSequentialMatch

Performs the search sequentially for each store.

EVPbkParallelMatch

Performs the search concurrently for each store.

Member Data Documentation

CVPbkPhoneNumberMatchStrategyImpl * iImpl

CVPbkPhoneNumberMatchStrategyImpl *iImpl[private]