phoneengine/PhoneCntFinder/inc/MPhCntMatch.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Abstact match result. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPHCNTMATCH_H
       
    20 #define MPHCNTMATCH_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <cntdef.h>     // TContactItemId
       
    24 #include <badesca.h>
       
    25 
       
    26 class MVPbkContactLink;
       
    27 class CPhCntContactId;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Abstact match result. 
       
    33 *
       
    34 *  @lib PhoneCntFinder
       
    35 *  @since 1.0
       
    36 */
       
    37 class MPhCntMatch
       
    38     {
       
    39     public:
       
    40         
       
    41         /**
       
    42         * Enumerates CLI types.
       
    43         *
       
    44         * ECliEmpty - not set/found.
       
    45         * ECliNumber - phone number from contact.
       
    46         * ECliName - name from contact.
       
    47         * ECliCompany - company name from contact.
       
    48         */
       
    49         enum TCliType
       
    50             {
       
    51             ECliEmpty,  
       
    52             ECliNumber,
       
    53             ECliName,
       
    54             ECliCompany
       
    55             };
       
    56             
       
    57         enum TNumberType
       
    58             {
       
    59             ENone = 0,
       
    60             EMobileNumber,
       
    61             EStandardNumber,
       
    62             EFaxNumber,
       
    63             EPagerNumber,
       
    64             EVoipNumber,
       
    65             EVideoNumber,
       
    66             EAssistantNumber,
       
    67             ECarNumber,
       
    68             EHomeNumber,
       
    69             EWorkNumber            
       
    70             }; 
       
    71 
       
    72         /**
       
    73         * To destroy the item. Must be called when item is not needed
       
    74         * any more.
       
    75         */
       
    76         virtual void Release() = 0;
       
    77 
       
    78         /**
       
    79          * Contact id.
       
    80          * @return Contact finder contact id.
       
    81          */
       
    82         virtual CPhCntContactId* ContactId() const = 0;
       
    83         
       
    84         /**
       
    85         * Get the number type.
       
    86         * @return Phonebook number type.
       
    87         */
       
    88         virtual TNumberType NumberType() const = 0;
       
    89 
       
    90         /**
       
    91         * Get CLI value.
       
    92         * @param aCliText CLI is copied here. User must delete after usage.
       
    93         * @return CLI type.
       
    94         */
       
    95         virtual TCliType Cli( HBufC*& aCliText ) const = 0;
       
    96 
       
    97         /**
       
    98         * First name field from contact.
       
    99         * @return Field text. Empty if there isn't one specified.
       
   100         */
       
   101         virtual TPtrC FirstName() const = 0;
       
   102 
       
   103         /**
       
   104         * Last name field from contact.
       
   105         * @return Field text. Empty if there isn't one specified.
       
   106         */
       
   107         virtual TPtrC LastName() const = 0;
       
   108 
       
   109         /**
       
   110         * Company name field from contact.
       
   111         * @return Field text. Empty if there isn't one specified.
       
   112         */
       
   113         virtual TPtrC CompanyName() const = 0;
       
   114 
       
   115         /**
       
   116         * Number field from contact (from matched field).
       
   117         * @return Field text. Empty if there isn't one specified.
       
   118         */
       
   119         virtual TPtrC Number() const = 0;
       
   120 
       
   121         /**
       
   122         * Ringing tone field from contact.
       
   123         * @return Field text. Empty if there isn't one specified.
       
   124         */
       
   125         virtual TPtrC PersonalRingingTone() const = 0;
       
   126 
       
   127         /**
       
   128         * Find if contact belong to any contact groups given.
       
   129         * @param aGroupArray Compared contact groups.
       
   130         * @return ETrue is belogns at least one group from parameter.
       
   131         */
       
   132         virtual TBool BelongsToGroups( 
       
   133             const CArrayFix<TContactItemId>& aGroupArray ) const = 0;
       
   134 
       
   135         /**
       
   136         * Returns text to speech text for this contact. Used in
       
   137         * text to speech ringing tone.
       
   138         * @since Series 60 3.0
       
   139         * @return descriptor, ownership passed.
       
   140         */
       
   141         virtual HBufC* TextToSpeechTextL() const = 0;
       
   142         
       
   143         /**
       
   144         * Call text field from contact.
       
   145         * @since Series 60 3.1
       
   146         * @return Field text. Empty if there isn't one specified.
       
   147         */
       
   148         virtual TPtrC CallText() const = 0;
       
   149 
       
   150         /**
       
   151         * Call image field from contact.
       
   152         * @since Series 60 3.1
       
   153         * @return Field text. Empty if there isn't one specified.
       
   154         */
       
   155         virtual TPtrC CallImage() const = 0;
       
   156         
       
   157         /**
       
   158         * Can used to check if contact has a thumbnail image.
       
   159         * @since Series 60 3.1
       
   160         * @return ETrue if has thumbnail, otherwise EFalse.
       
   161         */
       
   162         virtual TBool HasThumbnailImage() const = 0;      
       
   163         
       
   164         /**
       
   165         * Returns all dtmf numbers which are found from
       
   166         * a single contact
       
   167         * @Since Series S60 3.2
       
   168         * @return array of DTMF numbers.
       
   169         */
       
   170         virtual CDesCArray& AllDtmfNumbers() const = 0;    
       
   171 
       
   172     };
       
   173 
       
   174 #endif      // MPHCNTMATCH_H   
       
   175             
       
   176 // End of File