phoneengine/phonecntfinder2/inc/cphcntmatch2.h
changeset 21 92ab7f8d0eab
child 46 bc5a64e5bc3c
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPHCNTMATCH2_H
       
    19 #define CPHCNTMATCH2_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "mphcntmatch.h"
       
    23 #include <qmobilityglobal.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CPhCntContactIdImpl2;
       
    27 
       
    28 QTM_BEGIN_NAMESPACE
       
    29 class QContact;
       
    30 QTM_END_NAMESPACE
       
    31 QTM_USE_NAMESPACE
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Implementation for single match result.
       
    37 *  Passes all function calls to CPhCntMacthItem object.
       
    38 *
       
    39 *  @lib PhoneCntFinder
       
    40 *  @since 1.0
       
    41 */
       
    42 NONSHARABLE_CLASS( CPhCntMatch2 ) : public CBase, public MPhCntMatch
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aContact associated contact
       
    49         * @return New instance
       
    50         */
       
    51         static CPhCntMatch2* NewL(const QContact aContact);
       
    52         
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         ~CPhCntMatch2();
       
    57         
       
    58         /**
       
    59         * overrides the number returned from the contact
       
    60         */
       
    61         void SetNumberL(const TDesC& aNumber);
       
    62 
       
    63     protected: // Functions from base classes
       
    64 
       
    65         /**
       
    66         * From MPhCntMatch
       
    67         */ 
       
    68         void Release();
       
    69 
       
    70         /**
       
    71         * From MPhCntMatch
       
    72         */ 
       
    73         CPhCntContactId* ContactId() const;
       
    74 
       
    75         /**
       
    76         * From MPhCntMatch
       
    77         */ 
       
    78         TNumberType NumberType() const;
       
    79 
       
    80         /**
       
    81         * From MPhCntMatch
       
    82         */ 
       
    83         TCliType Cli( HBufC*& aCliText ) const;
       
    84 
       
    85         /**
       
    86         * From MPhCntMatch
       
    87         */ 
       
    88         TPtrC FirstName() const;
       
    89 
       
    90         /**
       
    91         * From MPhCntMatch
       
    92         */ 
       
    93         TPtrC LastName() const;
       
    94 
       
    95         /**
       
    96         * From MPhCntMatch
       
    97         */ 
       
    98         TPtrC CompanyName() const;
       
    99 
       
   100         /**
       
   101         * From MPhCntMatch
       
   102         */ 
       
   103         TPtrC Number() const;
       
   104 
       
   105         /**
       
   106         * From MPhCntMatch
       
   107         */ 
       
   108         TPtrC PersonalRingingTone() const;
       
   109 
       
   110         /**
       
   111         * From MPhCntMatch
       
   112         */ 
       
   113         TBool BelongsToGroups( 
       
   114             const CArrayFix<TContactItemId>& aGroupArray ) const;
       
   115 
       
   116         /**
       
   117         * @see MPhCntMatch::TextToSpeechTextL.
       
   118         * @since Series 60 3.0
       
   119         */
       
   120         virtual HBufC* TextToSpeechTextL() const;
       
   121         
       
   122         /**
       
   123         * From MPhCntMatch
       
   124         * @since Series 60 3.1
       
   125         */ 
       
   126         TPtrC CallText() const;
       
   127         
       
   128         /**
       
   129         * From MPhCntMatch
       
   130         * @since Series 60 3.1
       
   131         */ 
       
   132         TPtrC CallImage() const;
       
   133         
       
   134         /**
       
   135         * From MPhCntMatch
       
   136         * @since Series 60 3.1
       
   137         */ 
       
   138         TBool HasThumbnailImage() const;
       
   139         
       
   140         /**
       
   141         * From MPhCntMatch
       
   142         */
       
   143         CDesCArray& AllDtmfNumbers() const;
       
   144 
       
   145 
       
   146  
       
   147     private:
       
   148 
       
   149         /**
       
   150         * C++ constructor.
       
   151         */
       
   152         CPhCntMatch2(const QContact aContact);
       
   153     private:
       
   154         void ConstructL();
       
   155         /*
       
   156          * checks for exactly 1 item in the list
       
   157          */
       
   158          TPtrC FieldValue(const QString& name, const QString& key) const;
       
   159 
       
   160     private:    // Data
       
   161         const QContact iContact;
       
   162         HBufC* iNumber;
       
   163         CPhCntContactIdImpl2* iContactId;
       
   164         CDesCArrayFlat* iDummyArray;
       
   165 
       
   166     };
       
   167 
       
   168 #endif      // CPHCNTMATCH2_H   
       
   169             
       
   170 // End of File