phone_plat/telephony_matching_extension_api/inc/telmatchingextension.h
changeset 0 5f000ab63145
child 69 8baf28733c3d
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Defines interface for manipulating telephony contact matching
       
    15 *                using ECOM plugin.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef TELMATCHINGEXTENSION_H
       
    21 #define TELMATCHINGEXTENSION_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <badesca.h>
       
    25 #include <data_caging_path_literals.hrh>
       
    26 
       
    27 // Constants used in ECOM implementation
       
    28 const TUid KTelMatchingExtensionUid    = { 0x2001E2A4 };
       
    29 
       
    30 
       
    31 /**
       
    32  * Plugin interface class for manipulating telephony
       
    33  * contact matching.
       
    34  *
       
    35  * @since S60 5.0
       
    36  */
       
    37 class CTelMatchingExtension : public CBase
       
    38     {
       
    39 public:
       
    40 
       
    41     /**
       
    42     * Creates new xSP plugin having the given UID.
       
    43     * @leave Uses Leave code KErrNotFound if implementation is not found.
       
    44     * @param aImplementationUid Implementation UID of the plugin to be
       
    45     *        created.
       
    46     */
       
    47     static CTelMatchingExtension* NewL(
       
    48         TUid aImplementationUid );
       
    49 
       
    50     /**
       
    51     * Destructor
       
    52     */
       
    53     virtual inline ~CTelMatchingExtension();
       
    54     
       
    55     /**
       
    56     * Initialize CTelMatchingExtension after it is created with NewL.
       
    57     * @param aServiceId - This id identify what service is currently used in call.
       
    58     * @param aOrigAddress - Original address.
       
    59     */
       
    60     virtual void InitializeL( TUint aServiceId, const TDesC& aOrigAddress ) = 0;
       
    61     
       
    62     /**
       
    63     * Returns parsed address to be used in contact matching.
       
    64     * Sets aParsedAddress parameter as empty (KNullDesC) if original number should be used
       
    65     * in contact matching. 
       
    66     * @param aParsedAddress - Address parsed by plugin. This address will be used for matching.
       
    67     * @param aMeaningfulDigits - How many digits (starting from the right) are meaningful for matching.
       
    68     *                            Value of the parameter have to be between 4-20 otherwise the whole
       
    69     *                            of address will be used for matching (e.g. by value 0).
       
    70     *                            If length of the address is less than value of the parameter the whole
       
    71     *                            of address will be used for matching.
       
    72     * @return - Return KErrNone if operation succeed.
       
    73     */
       
    74     virtual TInt GetAddressForMatching( RBuf& aParsedAddress, TInt& aMeaningfulDigits ) = 0;
       
    75 
       
    76     /**
       
    77     * Returns contact store uris which are opened and will be used for matching.
       
    78     * @param aStoreUris - Contact store uri array.
       
    79     * @return - Return KErrNone if operation succeed.
       
    80     */
       
    81     virtual TInt GetContactStoreUris( CDesCArray& aStoreUris ) = 0;
       
    82     
       
    83     /**
       
    84     * Returns remote party name (remote party name is shown in the call bubble).
       
    85     * Sets aRemotePartyName parameter as empty (KNullDesC) if remote party name is not available.
       
    86     * Remote party name (aRemotePartyName) will be shown in the call bubble when contact 
       
    87     * matching not succeed.
       
    88     * @param aRemotePartyName - Remote party name.
       
    89     * @return - Return KErrNone if operation succeed.
       
    90     */
       
    91     virtual TInt GetRemotePartyName( RBuf& aRemotePartyName ) = 0;
       
    92 
       
    93 
       
    94 private: // data
       
    95 
       
    96     /**
       
    97      * ECOM plugin instance UID.
       
    98      */
       
    99      TUid iDtor_ID_Key;
       
   100 
       
   101     };
       
   102 
       
   103 #include "telmatchingextension.inl"
       
   104 
       
   105 
       
   106 #endif // TELMATCHINGEXTENSION_H
       
   107 
       
   108 //End of file
       
   109