voipplugins/svtmatching/inc/svtmatching.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
child 23 755430a7d64b
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     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:  Main class for svtmatching.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SCMTELMATCHING_H
       
    20 #define C_SCMTELMATCHING_H
       
    21 
       
    22 #include <telmatchingextension.h>
       
    23 
       
    24 class CSvtUriParser;
       
    25 class CSvtSettingsHandler;
       
    26 
       
    27 /**
       
    28  *  Main class for svtmatching.
       
    29  *
       
    30  *  @lib svtmatching
       
    31  *  @since S60 v5.0
       
    32  */
       
    33 NONSHARABLE_CLASS(CSvtMatching) :
       
    34     public CTelMatchingExtension
       
    35   {
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      */
       
    41     static CSvtMatching* NewL();
       
    42   
       
    43   
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     ~CSvtMatching();
       
    48 
       
    49     
       
    50 // from base class CTelMatchingExtension
       
    51     
       
    52     /**
       
    53      * Initialize class after it is created with NewL.
       
    54      * @param aServiceId - This id identify what service is currently used in call.
       
    55      * @param aOrigAddress - Original address.
       
    56      */
       
    57     void InitializeL( TUint aServiceId, const TDesC& aOrigAddress );
       
    58 
       
    59     /**
       
    60      * Returns parsed address to be used in contact matching.
       
    61      * Sets aParsedAddress parameter as empty (KNullDesC) if original number should be used
       
    62      * in contact matching. 
       
    63      * @param aParsedAddress - Address parsed by plugin. This address will be used for matching.
       
    64      * @param aMeaningfulDigits - How many digits (starting from the right) are meaningful for matching.
       
    65      *                            Value of the parameter have to be between 4-20 otherwise the whole
       
    66      *                            of address will be used for matching (e.g. by value 0).
       
    67      *                            If length of the address is less than value of the parameter the whole
       
    68      *                            of address will be used for matching.
       
    69      * @return - Return KErrNone if operation succeed.
       
    70      */
       
    71     TInt GetAddressForMatching( RBuf& aParsedAddress, TInt& aMeaningfulDigits );
       
    72 
       
    73     /**
       
    74      * Returns contact store uris which are opened and will be used for matching.
       
    75      * @param aStoreUris - Contact store uri array.
       
    76      * @return - Return KErrNone if operation succeed.
       
    77      */
       
    78     TInt GetContactStoreUris( CDesCArray& aStoreUris );
       
    79 
       
    80     /**
       
    81      * Returns remote party name (remote party name is shown in the call bubble).
       
    82      * Sets aRemotePartyName parameter as empty (KNullDesC) if remote party name is not available.
       
    83      * Remote party name (aRemotePartyName) will be shown in the call bubble when contact 
       
    84      * matching not succeed.
       
    85      * @param aRemotePartyName - Remote party name.
       
    86      * @return - Return KErrNone if operation succeed.
       
    87      */
       
    88     TInt GetRemotePartyName( RBuf& aRemotePartyName );
       
    89 
       
    90 private:
       
    91     
       
    92     CSvtMatching();
       
    93 
       
    94     void ConstructL();
       
    95       
       
    96 private:    // data
       
    97 
       
    98     /**
       
    99      * Service id
       
   100      */
       
   101     TUint iServiceId;
       
   102  
       
   103     /**
       
   104      * Pointer to settings handler.
       
   105      * Own.
       
   106      */
       
   107     CSvtSettingsHandler* iSettingsHandler; 
       
   108     
       
   109     /**
       
   110      * Pointer to Uri parser.
       
   111      * Own.
       
   112      */
       
   113     CSvtUriParser* iUriParser;
       
   114     
       
   115     /**
       
   116      * Pointer for original address.
       
   117      * Own.
       
   118      */
       
   119     HBufC*  iOriginalAddress;
       
   120  
       
   121 #ifdef _DEBUG   
       
   122     friend class T_CSvtMatchingPlugin;
       
   123 #endif
       
   124     
       
   125   };  
       
   126 
       
   127 #endif  // C_SCMTELMATCHING_H
       
   128 
       
   129