phoneengine/PhoneCntFinder/ContactService/inc/mphcntcontactfields.h
changeset 0 5f000ab63145
child 19 544e34b3255a
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 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:  Interface for contact fields.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPHCNTCONTACTFIELDS_H
       
    19 #define MPHCNTCONTACTFIELDS_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include "MPhCntMatch.h"
       
    23 #include "tphcntnumber.h"
       
    24 
       
    25 class MVPbkContactLinkArray;
       
    26 class MVPbkStoreContact;
       
    27 class MVPbkFieldType;
       
    28 
       
    29 /**
       
    30  *  Interface for contact fields
       
    31  *
       
    32  *  @lib PhoneCntFinder.lib
       
    33  *  @since S60 v3.1
       
    34  */
       
    35 NONSHARABLE_CLASS( MPhCntContactFields )
       
    36     {
       
    37 public:
       
    38     
       
    39     /**
       
    40      * Destructor.
       
    41      *
       
    42      * @since S60 v3.1
       
    43      */
       
    44     virtual ~MPhCntContactFields() {};
       
    45 
       
    46     /**
       
    47      * Gives the matched numbers number type. Note that
       
    48      * this can be ENone when the contact fields were
       
    49      * fetched from contact stores without matching.
       
    50      *
       
    51      * @since S60 v3.1
       
    52      * @return Type of matched number.
       
    53      */
       
    54     virtual MPhCntMatch::TNumberType NumberType() const = 0;
       
    55         
       
    56     /**
       
    57      * Gives the contact's link where these contact fields
       
    58      * are from.
       
    59      *
       
    60      * @since S60 v3.1
       
    61      * @return Contact link, ownership not given.
       
    62      */
       
    63     virtual MVPbkContactLink* ContactLink() const = 0;
       
    64     
       
    65     /**
       
    66      * First name field from contact.
       
    67      *
       
    68      * @since S60 v3.1
       
    69      * @return Field text. Empty if there isn't one specified.
       
    70      */
       
    71     virtual TPtrC FirstName() const = 0;
       
    72 
       
    73     /**
       
    74      * Last name field from contact.
       
    75      *
       
    76      * @since S60 v3.1
       
    77      * @return Field text. Empty if there isn't one specified.
       
    78      */
       
    79     virtual TPtrC LastName() const = 0;
       
    80 
       
    81     /**
       
    82      * Company name field from contact.
       
    83      *
       
    84      * @since S60 v3.1
       
    85      * @return Field text. Empty if there isn't one specified.
       
    86      */
       
    87     virtual TPtrC CompanyName() const = 0;
       
    88 
       
    89     /**
       
    90      * Number that matched. Note that this may be 
       
    91      * zero length, if contactfields were fetched without 
       
    92      * matching.
       
    93      *
       
    94      * @since S60 v3.1
       
    95      * @return Field text. Empty if there isn't one specified.
       
    96      */
       
    97     virtual TPtrC Number() const = 0;
       
    98     
       
    99     /**
       
   100      * Dtmf number, which was pointed by contact link.
       
   101      *
       
   102      * @since S60 v3.2
       
   103      * @return Field text. Empty if there isn't one specified.
       
   104      */
       
   105     virtual TPtrC Dtmf() const = 0;
       
   106 
       
   107     /**
       
   108      * Ringing tone field from contact.
       
   109      *
       
   110      * @since S60 v3.1
       
   111      * @return Field text. Empty if there isn't one specified.
       
   112      */
       
   113     virtual TPtrC PersonalRingingTone() const = 0;
       
   114     
       
   115     /**
       
   116      * Second name from contact.
       
   117      *
       
   118      * @since S60 v3.1
       
   119      * @return Field text. Empty if there isn't one specified.
       
   120      */
       
   121     virtual TPtrC SecondName() const = 0;
       
   122     
       
   123     /**
       
   124      * First name pronunciation.
       
   125      * 
       
   126      * @since S60 v3.1
       
   127      * @return First name's pronunction. May be zero length.
       
   128      */
       
   129     virtual TPtrC FirstNamePronunciation() const = 0;
       
   130      
       
   131     /**
       
   132      * Last name pronunciation.
       
   133      * 
       
   134      * @since S60 v3.1
       
   135      * @return Last name's pronunction. May be zero length.
       
   136      */
       
   137     virtual TPtrC LastNamePronunciation() const = 0;
       
   138     
       
   139     /**
       
   140      * Company name pronunciation.
       
   141      * 
       
   142      * @since S60 v3.1
       
   143      * @return Company name's pronunction. May be zero length.
       
   144      */
       
   145     virtual TPtrC CompanyNamePronunciation() const = 0;
       
   146     
       
   147     /**
       
   148      * Creates contacts title. 
       
   149      *
       
   150      * @since S60 v3.1
       
   151      * @return Title of the contact, ownership is given.
       
   152      */
       
   153     virtual HBufC* GetContactTitleL() = 0;
       
   154     
       
   155     /**
       
   156      * Links to a contact groups that this contact information belongs to.
       
   157      * Ownership of links is given. May be NULL.
       
   158      *
       
   159      * @since S60 v3.1
       
   160      * @return Links to contact groups.
       
   161      */
       
   162     virtual MVPbkContactLinkArray* ContactGroupsLC() const = 0;
       
   163     
       
   164     /**
       
   165      * Contact information in the store.
       
   166      * 
       
   167      * @since S60 v3.1
       
   168      * @return Contact information
       
   169      */     
       
   170     virtual MVPbkStoreContact& StoreContact() const = 0;
       
   171     
       
   172     /**
       
   173      * Pointer to thumbnails field.
       
   174      * 
       
   175      * @since S60 v3.1
       
   176      * @return thumbnails field or null.
       
   177      */
       
   178     virtual const MVPbkFieldType* ThumbnailField() const = 0;
       
   179     
       
   180     /**
       
   181      * Call image field from contact.
       
   182      * 
       
   183      * @since S60 v3.1
       
   184      * @return Field text. Empty if there isn't one specified.
       
   185      */
       
   186     virtual TPtrC CallImage() const = 0;
       
   187     
       
   188     /**
       
   189      * Call text field from contact.
       
   190      * 
       
   191      * @since S60 v3.1
       
   192      * @return Field text. Empty if there isn't one specified.
       
   193      */
       
   194     virtual TPtrC CallText() const = 0;
       
   195     
       
   196     /**
       
   197      * Call text field from contact.
       
   198      * 
       
   199      * @since S60 v3.1
       
   200      * @return ETrue if contact has thumbnail field, otherwise EFalse.
       
   201      */
       
   202     virtual TBool HasThumbnail() const = 0;
       
   203     
       
   204     /**
       
   205      * Gives all phone numbers that contact has.
       
   206      *
       
   207      * @since S60 v3.2.
       
   208      * @return Array of phone numbers.
       
   209      */     
       
   210     virtual const RArray<TPhCntNumber>& AllNumbers() const = 0;
       
   211 
       
   212     /**
       
   213      * Gives all DTMF numbers that contact has.
       
   214      *
       
   215      * @since S60 v3.2.
       
   216      * @return Array of DTMF numbers.
       
   217      */     
       
   218     
       
   219     virtual CDesCArray* AllDtmfNumbers() const = 0; 
       
   220     };
       
   221 
       
   222 
       
   223 #endif // MPHCNTCONTACTFIELDS_H