phoneengine/engineinfo/inc/cperemoteinfo.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  This file contains the header file of the CPERemoteInfo object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPEREMOTEINFO_H
       
    20 #define CPEREMOTEINFO_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "pevirtualengine.h"
       
    24 
       
    25 class CPhCntContactId;
       
    26 
       
    27 /**
       
    28  *  Remote info definition
       
    29  *
       
    30  *  This class defines the call remote end information
       
    31  *  used for contact matching and logging
       
    32  *
       
    33  *  @lib PhoneEngine.lib
       
    34  *  @since S60 v4.0
       
    35  */
       
    36 NONSHARABLE_CLASS( CPERemoteInfo ) : public CBase
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      */
       
    43     static CPERemoteInfo* NewL();
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      */
       
    48     virtual ~CPERemoteInfo();
       
    49 
       
    50     /**
       
    51      * Get call id associated with this information
       
    52      * @return call identification number
       
    53      */
       
    54     TInt CallId() const;
       
    55 
       
    56     /**
       
    57      * Get contact link or id
       
    58      * @return contact link or id
       
    59      */
       
    60     const CPhCntContactId& ContactId() const;
       
    61 
       
    62     /**
       
    63      * Get contact link.
       
    64      * @return Virtual phonebook contact link
       
    65      */
       
    66     const TDesC8& ContactLink() const;
       
    67     
       
    68     /**
       
    69      * Get remote end phone number
       
    70      * @return phone number
       
    71      */
       
    72     const TPEPhoneNumber& PhoneNumber() const;
       
    73 
       
    74     /**
       
    75      * Get remote end connected phone number
       
    76      * @return phone number
       
    77      */
       
    78     const TPEPhoneNumber& ColpNumber() const;
       
    79 
       
    80     /**
       
    81      * Get contact name
       
    82      * Depending on user selected language may be in order:
       
    83      * first + last name OR last + first name
       
    84      * @return contact name
       
    85      */
       
    86     const TPEContactName& Name() const;
       
    87 
       
    88     /**
       
    89      * Get contact company name
       
    90      * @return company name
       
    91      */
       
    92     const TPEContactCompany& CompanyName() const;
       
    93 
       
    94     /**
       
    95      * Get ringing tone
       
    96      * Returns a ringing tone defined for one of the user groups
       
    97      * if personal tone is not found
       
    98      * @return ringing tone file path
       
    99      */
       
   100     const TPEContactFileName& PersonalRingingTone() const;
       
   101 
       
   102     /**
       
   103      * Get remote end phone number type
       
   104      * @return phone number type
       
   105      */
       
   106     const TPEPhoneNumberIdType& PhoneNumberType() const;
       
   107 
       
   108     /**
       
   109     * Get text to speech text for this contact. Used in
       
   110     * text to speech ringing tone.
       
   111     * @return descriptor, ownership passed.
       
   112     */
       
   113     const TPtrC TextToSpeechText() const;
       
   114 
       
   115     /**
       
   116      * Get user group ids this contact is assigned to
       
   117      * @return array for group ids
       
   118      */
       
   119     const TArray< TContactItemId > ContactGroups() const;
       
   120 
       
   121     /**
       
   122      * Get caller text
       
   123      * @return caller text
       
   124      */
       
   125     const TPtrC CallerText() const;
       
   126 
       
   127     /**
       
   128      * Get caller image
       
   129      * @return caller image
       
   130      */
       
   131     const TPtrC CallerImage() const;
       
   132 
       
   133     /**
       
   134      * Get caller thumbnail
       
   135      * @return pointer to thumbnail data
       
   136      */
       
   137     CFbsBitmap* CallerThumbnail() const;
       
   138 
       
   139     /**
       
   140      * Get caller thumbnail status
       
   141      * @return status of caller thumbnail
       
   142      */
       
   143     TBool HasCallerThumbnail() const;
       
   144 
       
   145     /**
       
   146      * Get predefined dtmf strings
       
   147      * @return reference to string array
       
   148      */
       
   149     CDesCArray& PredefinedDtmfStrings();
       
   150      
       
   151     /**
       
   152      * Set call association for this information
       
   153      * @param aContactId pointer to contact id
       
   154      */
       
   155     void SetCallId( const TInt aCallId );
       
   156 
       
   157     /**
       
   158      * Set contact link or id
       
   159      * @param aContactId pointer to contact id
       
   160      */
       
   161     void SetContactId( CPhCntContactId* aContactId );
       
   162 
       
   163     /**
       
   164      * Set remote end phone number
       
   165      * @param aPhoneNumber phone number
       
   166      */
       
   167     void SetPhoneNumber( const TPEPhoneNumber& aPhoneNumber );
       
   168 
       
   169     /**
       
   170      * Set remote end connected phone number
       
   171      * @param aColpNumber phone number
       
   172      */
       
   173     void SetColpNumber( const TPEPhoneNumber& aColpNumber );
       
   174 
       
   175     /**
       
   176      * Set contact name
       
   177      * Depending on user selected language may be in order:
       
   178      * first + last name OR last + first name
       
   179      * @param aContactName contact name
       
   180      */
       
   181     void SetName( const TPEContactName& aContactName );
       
   182 
       
   183     /**
       
   184      * Set contact company name
       
   185      * @param aCompanyName company name
       
   186      */
       
   187     void SetCompanyName( const TPEContactName& aCompanyName );
       
   188 
       
   189     /**
       
   190      * Set ringing tone
       
   191      * @param aPersonalRingingTone ringing tone file path
       
   192      */
       
   193     void SetPersonalRingingTone(
       
   194         const TPEContactFileName& aPersonalRingingTone );
       
   195 
       
   196     /**
       
   197      * Set remote end phone number type
       
   198      * @param aPhoneNumberType phone number id
       
   199      */
       
   200     void SetPhoneNumberType( const TPEPhoneNumberIdType aPhoneNumberType );
       
   201 
       
   202     /**
       
   203      * Set remote end Text To Speech Text
       
   204      * @param aText Text To Speech Text
       
   205      */
       
   206     void SetTextToSpeechText( HBufC* aText );
       
   207 
       
   208     /**
       
   209      * Set user group ids this contact is assigned to
       
   210      * Array is reset if the operation fails.
       
   211      * @param aGroupIdArray array of group ids
       
   212      */
       
   213     void SetContactGroups( const TArray< TContactItemId >& aGroupIdArray );
       
   214 
       
   215     /**
       
   216      * Set caller text
       
   217      * @param aCallerText caller text
       
   218      */
       
   219     void SetCallerText( const TPtrC aCallerText );
       
   220 
       
   221     /**
       
   222      * Set caller image
       
   223      * @param aCallerImage caller image
       
   224      */
       
   225     void SetCallerImage( const TPtrC aCallerImage );
       
   226 
       
   227     /**
       
   228      * Set caller thumbnail
       
   229      * @param aCallerThumbnail  caller thumbnail
       
   230      */
       
   231     void SetCallerThumbnail( CFbsBitmap* aCallerThumbnail );
       
   232 
       
   233     /**
       
   234      * Set caller thumbnail status
       
   235      * @param aStatus  caller thumbnail status
       
   236      */
       
   237     void SetHasCallerThumbnail( TBool aStatus );
       
   238 
       
   239     /**
       
   240      * Set predefined dtmf strings
       
   241      * @param aArray, is reference to sring array 
       
   242      */
       
   243     void SetPredefinedDtmfStrings( 
       
   244             const CDesCArray& aArray );           
       
   245     /**
       
   246      * Reset remote information
       
   247      * Resets all member data
       
   248      */
       
   249     void ResetRemoteInfo();
       
   250 
       
   251 private:
       
   252 
       
   253     /**
       
   254      * Constructor
       
   255      */
       
   256     CPERemoteInfo();
       
   257 
       
   258 private: // data
       
   259 
       
   260     /**
       
   261      * Call id association
       
   262      */
       
   263     TInt iCallId;
       
   264 
       
   265     /**
       
   266      * Contact link or id
       
   267      * Own.
       
   268      */
       
   269     CPhCntContactId* iContactId;
       
   270 
       
   271     /**
       
   272      * Contact link
       
   273      * Own.
       
   274      */
       
   275     HBufC8* iContactLink;
       
   276     
       
   277     /**
       
   278      * Remote end phone number
       
   279      */
       
   280     TPEPhoneNumber iPhoneNumber;
       
   281 
       
   282     /**
       
   283      * Remote end phone number if the mobile originated call was forwarded
       
   284      */
       
   285     TPEPhoneNumber iColpNumber;
       
   286 
       
   287     /**
       
   288      * First name + Last name
       
   289      */
       
   290     TPEContactName iName;
       
   291 
       
   292     /**
       
   293      * Remote end company name
       
   294      */
       
   295     TPEContactCompany iCompanyName;
       
   296 
       
   297     /**
       
   298      * Remote end personal or group ringing tone
       
   299      */
       
   300     TPEContactFileName iPersonalRingingTone;
       
   301 
       
   302     /**
       
   303      * Remote end phone number type
       
   304      */
       
   305     TPEPhoneNumberIdType iPhoneNumberType;
       
   306 
       
   307     /**
       
   308      * Remote end Text To Speech text
       
   309      */
       
   310     HBufC* iTextToSpeechText;
       
   311 
       
   312     /**
       
   313      * Array for caller group ids
       
   314      * Own.
       
   315      */
       
   316     RArray< TContactItemId > iGroupId;
       
   317 
       
   318     /**
       
   319      * Caller text
       
   320      */
       
   321     HBufC* iCallerText;
       
   322 
       
   323     /**
       
   324      * Caller image
       
   325      */
       
   326     HBufC* iCallerImage;
       
   327 
       
   328     /**
       
   329      * Caller thumbnail image
       
   330      * Own.
       
   331      */
       
   332     CFbsBitmap* iCallerThumbnail;
       
   333     
       
   334     /**
       
   335      * Caller thumbnail image status
       
   336      * Own.
       
   337      */
       
   338     TBool iHasCallerThumbnail;    
       
   339     
       
   340     /**
       
   341      * Dtmf array
       
   342      *  
       
   343      */
       
   344     CDesCArray* iPredefinedDtmfStrings;
       
   345     
       
   346     
       
   347     };
       
   348 
       
   349 #endif // CPEREMOTEINFO_H