CVPbkPhoneNumberMatchStrategy Class Reference

#include <app/CVPbkPhoneNumberMatchStrategy.h>

class CVPbkPhoneNumberMatchStrategy : public CBase

Inherits from

  • CVPbkPhoneNumberMatchStrategy

    Nested Classes and Structures

    Detailed Description

    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.

    Member Enumeration Documentation

    Enum TVPbkPhoneNumberMatchFlags

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

    EnumeratorValueDescription
    EVPbkMatchFlagsNone0x00000000

    No additional matching flags.

    EVPbkExactMatchFlag0x00000001

    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.

    EVPbkStopOnFirstMatchFlag0x00000002

    Stops the search once at least one contact is found.

    EVPbkDuplicatedContactsMatchFlag0x00000004

    If all matched contacts have the same first name and last name field values only first one is returned.

    EVPbkBestMatchingFlag0x00000008

    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.

    EnumeratorValueDescription
    EVPbkSequentialMatch

    Performs the search sequentially for each store.

    EVPbkParallelMatch

    Performs the search concurrently for each store.

    Constructor & Destructor Documentation

    CVPbkPhoneNumberMatchStrategy ( )

    CVPbkPhoneNumberMatchStrategy()[protected]

    Constructor.

    ~CVPbkPhoneNumberMatchStrategy ( )

    ~CVPbkPhoneNumberMatchStrategy()

    Destructor.

    Member Function 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.

    ParameterDescription
    aConfigConfiguration data for phone number matching.
    aContactManagerContact manager reference,
    aObserverContact find observer reference.

    FindObserver ( )

    MVPbkContactFindObserver &FindObserver()const [protected]

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

    Returns: Contact find observer

    IsSimStore ( const MVPbkContactStore & )

    TBool IsSimStore(const MVPbkContactStore &aStore)[protected]

    Checks if contact store is SIM store.

    ParameterDescription
    aStoreStore to be checked.

    Returns: ETrue if aStore is SIM store, otherwise EFalse.

    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.

    ParameterDescription
    aPhoneNumberPhone number to match.

    MaxMatchDigits ( )

    TInt MaxMatchDigits()const [protected]

    Returns maximum number of digits used in matching.

    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.

    ParameterDescription
    aConfigConfiguration data for phone number matching.
    aContactManagerContact manager to be used in matching.
    aObserverObserver for the matching operation.

    Returns: Newly created instance of a class derived from this class.

    StoresToMatch ( )

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

    Returns array of stores that are used in matching.

    Returns: Array of stores that are used in matching.