phoneengine/engineinfo/inc/cpecallinfo.h
changeset 0 5f000ab63145
child 19 544e34b3255a
child 46 bc5a64e5bc3c
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008-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:  Information container for a single call
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPECALLINFO_H
       
    20 #define C_CPECALLINFO_H
       
    21 
       
    22 #include <pevirtualengine.h>
       
    23 
       
    24 class CPEClientInformation;
       
    25 
       
    26 /**
       
    27  * Information container for a single call.
       
    28  */
       
    29 NONSHARABLE_CLASS( CPECallInfo ) : public CBase
       
    30     {
       
    31 
       
    32 public:
       
    33     
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      * 
       
    37      * @return      The newly created object. Ownership is transferred to the caller.
       
    38      */
       
    39     static CPECallInfo* NewL();
       
    40 
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     ~CPECallInfo();
       
    45 
       
    46     /**
       
    47      * Resets all call information to their initial values.
       
    48      * 
       
    49      * @param   aIsConference   Flag indicating if the call is a conference call.
       
    50      */
       
    51     void Reset( TBool aIsConference );
       
    52     
       
    53     /**
       
    54      * Returns the client information of the call.
       
    55      * 
       
    56      * @return  Client information of the call.
       
    57      */ 
       
    58     CPEClientInformation& ClientInformation();
       
    59     
       
    60     /**
       
    61      * Sets the state of the call.
       
    62      * 
       
    63      * @param   aState          New state of the call.
       
    64      */
       
    65     void SetCallState( TPEState aState );
       
    66     
       
    67     /**
       
    68      * Returns the state of the call.
       
    69      * 
       
    70      * @return  State of the call.
       
    71      */
       
    72     TPEState CallState() const;
       
    73     
       
    74     /**
       
    75      * Sets the type of the call.
       
    76      * 
       
    77      * @param   aType           New type of the call.
       
    78      */
       
    79     void SetCallType( TPECallType aType );
       
    80     
       
    81     /**
       
    82      * Returns the type of the call.
       
    83      * 
       
    84      * @return  Type of the call.
       
    85      */
       
    86     TPECallType CallType() const;
       
    87     
       
    88     /**
       
    89      * Sets the call control capabilites.
       
    90      * 
       
    91      * @param   aCaps           Call control capabilites to set.
       
    92      */
       
    93     void SetCallControlCaps( TPECallControlCaps aCaps );
       
    94     
       
    95     /**
       
    96      * Returns the call control capabilities.
       
    97      * 
       
    98      * @return  Call control capabilities.
       
    99      */
       
   100     TPECallControlCaps CallControlCaps() const;
       
   101 
       
   102     /**
       
   103      * Sets the remote party name of the call as given by the network.
       
   104      * 
       
   105      * @param   aName           Remote party name of the call.
       
   106      */
       
   107     void SetRemotePartyName( const TPEContactName& aName );
       
   108     
       
   109     /**
       
   110      * Returns the remote party name of the call as given by the network.
       
   111      * 
       
   112      * @return  Remote party name of the call.
       
   113      */
       
   114     const TPEContactName& RemotePartyName() const;
       
   115     
       
   116     /**
       
   117      * Sets the whole outgoing phone number (invalid characters removed).
       
   118      * 
       
   119      * @param   aNumber         Phone number to set.
       
   120      */
       
   121     void SetWholeOutgoingPhoneNumber( const TPEPhoneNumber& aNumber );
       
   122     
       
   123     /**
       
   124      * Returns the whole outgoing phone number (invalid characters removed).
       
   125      * 
       
   126      * @return  Whole outgoing phone number.
       
   127      */
       
   128     const TPEPhoneNumber& WholeOutgoingPhoneNumber() const;
       
   129 
       
   130     /**
       
   131      * Sets the ALS line type of the call.
       
   132      * 
       
   133      * @param   aAlsLine        ALS line type to set.
       
   134      */
       
   135     void SetAlsLine( CCCECallParameters::TCCELineType aAlsLine );
       
   136     
       
   137     /**
       
   138      * Returns the ALS line type of the call.
       
   139      * 
       
   140      * @return  ALS line type of the call.
       
   141      */
       
   142     CCCECallParameters::TCCELineType AlsLine() const;
       
   143     
       
   144     /**
       
   145      * Sets the remote identity status of the call.
       
   146      * 
       
   147      * @param   aIdentity       Remote identity status to set.
       
   148      */
       
   149     void SetRemoteIdentity( RMobileCall::TMobileCallRemoteIdentityStatus aIdentity );
       
   150     
       
   151     /**
       
   152      * Returns the remote identity status of the call.
       
   153      * 
       
   154      * @return  Remote identity status of the call.
       
   155      */
       
   156     RMobileCall::TMobileCallRemoteIdentityStatus RemoteIdentity() const;
       
   157     
       
   158     /**
       
   159      * Sets the direction of the call.
       
   160      * 
       
   161      * @param   aDirection      Direction to set.
       
   162      */
       
   163     void SetCallDirection( RMobileCall::TMobileCallDirection aDirection );
       
   164     
       
   165     /**
       
   166      * Returns the direction of the call.
       
   167      * 
       
   168      * @return  Direction of the call.
       
   169      */
       
   170     RMobileCall::TMobileCallDirection CallDirection() const;
       
   171 
       
   172     /**
       
   173      * Sets the mobile call service type of the call.
       
   174      *  
       
   175      * @param   aService        Mobile call service type to set.
       
   176      */
       
   177     void SetService( RMobilePhone::TMobileService aService );
       
   178     
       
   179     /**
       
   180      * Returns the mobile call service type of the call.
       
   181      * 
       
   182      * @return  Mobile call service type of the call.
       
   183      */
       
   184     RMobilePhone::TMobileService Service() const;
       
   185     
       
   186     /**
       
   187      * Sets the conference member name of the call.
       
   188      * 
       
   189      * @param   aName           Conference member name of the call.
       
   190      */
       
   191     void SetConferenceMemberName( const TName& aName );
       
   192     
       
   193     /**
       
   194      * Returns the conference member name of the call.
       
   195      * 
       
   196      * @return  Conference member name of the call.
       
   197      */
       
   198     const TName& ConferenceMemberName() const;
       
   199     
       
   200     /**
       
   201      * Sets the call start time.
       
   202      * 
       
   203      * @param   aTime           Start time of the call.
       
   204      */
       
   205     void SetStartTime( const TTime& aTime );
       
   206     
       
   207     /**
       
   208      * Returns the start time of the call.
       
   209      * 
       
   210      * @return  Start time of the call.
       
   211      */
       
   212     const TTime& StartTime() const;
       
   213     
       
   214     /**
       
   215      * Sets the duration of the call.
       
   216      * 
       
   217      * @param   aDuration       Duration of the call in seconds.
       
   218      */
       
   219     void SetDuration( TTimeIntervalSeconds aDuration );
       
   220     
       
   221     /**
       
   222      * Returns the duration of the call.
       
   223      * 
       
   224      * @return  Duration of the call in seconds.
       
   225      */
       
   226     TTimeIntervalSeconds Duration() const;
       
   227     
       
   228     /**
       
   229      * Sets the service identifier of the call.
       
   230      * 
       
   231      * @param   aId             Service identifier to set.
       
   232      */
       
   233     void SetCallServiceId( TUint32 aId );
       
   234     
       
   235     /**
       
   236      * Returns the service identifier of the call.
       
   237      * 
       
   238      * @return  Service identifier of the call.
       
   239      */
       
   240     TUint32 CallServiceId() const;
       
   241     
       
   242     /**
       
   243      * Sets conference capabilities of the call.
       
   244      * 
       
   245      * @param   aCaps           Conference capabilities to set.
       
   246      */
       
   247     void SetConferenceCaps( TUint32 aCaps );
       
   248     
       
   249     /**
       
   250      * Returns the conference capabilities of the call.
       
   251      * 
       
   252      * @return  Conference capabilities of the call.
       
   253      */
       
   254     TUint32 ConferenceCaps() const;
       
   255     
       
   256     /**
       
   257      * Sets the identification number of the conference master.
       
   258      * 
       
   259      * @param   aConference     Identification number of the conference master to set.
       
   260      */
       
   261     void SetConference( TInt aConference );
       
   262     
       
   263     /**
       
   264      * Returns the identification number of the conference master.
       
   265      * 
       
   266      * @return  Identification number of the conference master.
       
   267      */
       
   268     TInt Conference() const;
       
   269     
       
   270     /**
       
   271      * Sets the identifier of the conference member call.
       
   272      * 
       
   273      * @param   aId             Identifier of the conference member call to set.
       
   274      */
       
   275     void SetConferenceMemberId( TInt aId );
       
   276     
       
   277     /**
       
   278      * Returns the identifier of the conference member call.
       
   279      * 
       
   280      * @return  Identifier of the conference member call.
       
   281      */
       
   282     TInt ConferenceMemberId();
       
   283     
       
   284     /**
       
   285      * Sets the number of conference members.
       
   286      * 
       
   287      * @param   aNumberOfConferenceMembers      Number of conference members.
       
   288      */
       
   289     void SetNumberOfConferenceMembers( TInt aNumberOfConferenceMembers );
       
   290     
       
   291     /**
       
   292      * Returns the number of conference members.
       
   293      * 
       
   294      * @return  Number of conference members.
       
   295      */
       
   296     TInt NumberOfConferenceMembers() const;
       
   297     
       
   298     /**
       
   299      * Sets the forced completion indicator for logging.
       
   300      * 
       
   301      * @param   aLog            Flag indicating if forced completion should be set.
       
   302      */
       
   303     void SetLogForcedCompletion( TBool aLog );
       
   304     
       
   305     /**
       
   306      * Returns the flag indicating if forced completion indicator for logging is used.
       
   307      * 
       
   308      * @return  Flag indicating if forced completion indicator for logging is used.
       
   309      */
       
   310     TBool LogForcedCompletion();
       
   311     
       
   312     /**
       
   313      * Enables or disables logging for the call.
       
   314      * 
       
   315      * @param   aEnabled        Flag enabling or disabling logging for the call.
       
   316      */
       
   317     void SetLoggingEnabled( TBool aEnabled );
       
   318     
       
   319     /**
       
   320      * Returns if logging is enabled for the call.
       
   321      * 
       
   322      * @return  Flag indicating if logging is enabled for the call.
       
   323      */
       
   324     TBool LoggingEnabled() const;
       
   325     
       
   326     /**
       
   327      * Sets the missed call status for the call.
       
   328      * 
       
   329      * @param   aMissedCall     Missed call status to set.
       
   330      */
       
   331     void SetMissedCall( TBool aMissedCall );
       
   332     
       
   333     /**
       
   334      * Returns the missed call status for the call.
       
   335      * 
       
   336      * @return  Missed call status for the call.
       
   337      */
       
   338     TBool MissedCall() const;
       
   339     
       
   340     /**
       
   341      * Sets the secure status for the call.
       
   342      * 
       
   343      * @param   aSecureStatus   Secure status to set.
       
   344      */
       
   345     void SetSecureStatus( TBool aSecureStatus );
       
   346     
       
   347     /**
       
   348      * Returns the secure status of the call.
       
   349      * 
       
   350      * @return  Secure status of the call.
       
   351      */
       
   352     TBool SecureStatus() const;
       
   353     
       
   354     /**
       
   355      * Sets the forwarded status for the call.
       
   356      * 
       
   357      * @param   aForwarded      Forwarded status to set.
       
   358      */
       
   359     void SetForwarded( TBool aForwarded );
       
   360     
       
   361     /**
       
   362      * Returns the forwarded status of the call.
       
   363      * 
       
   364      * @return  Forwarded status of the call.
       
   365      */
       
   366     TBool Forwarded() const;
       
   367     
       
   368     /**
       
   369      * Sets the resume held call status for the call.
       
   370      * 
       
   371      * @param   aResume         Resume held call status to set.
       
   372      */
       
   373     void SetResumeHeldCall( TBool aResume );
       
   374     
       
   375     /**
       
   376      * Returns the resume held call status of the call.
       
   377      * 
       
   378      * @return  Resume held call status of the call.
       
   379      */
       
   380     TBool ResumeHeldCall() const;
       
   381 
       
   382     /**
       
   383      * Returns the dtmf postfix of the call.
       
   384      * 
       
   385      * @return  dtmf postfix of the call.
       
   386      */
       
   387     const TPEDtmfString& DtmfPostFix() const;
       
   388     
       
   389     /**
       
   390      * Sets the dtmf postfix of the call.
       
   391      * 
       
   392      * @param aDtmfPostFix dtmf postfix to set.
       
   393      */
       
   394     void SetDtmfPostFix( const TPEDtmfString& aDtmfPostFix );
       
   395 
       
   396     /**
       
   397      * Sets the secure specified status for the call.
       
   398      * 
       
   399      * @param aSecureSpecified Secure specified status to set.
       
   400      */
       
   401     void SetSecureSpecified( TBool aSecureSpecified );
       
   402 
       
   403     /**
       
   404      * Returns the secure specified status of the call.
       
   405      * 
       
   406      * @return Secure specified status of the call.
       
   407      */
       
   408     TBool SecureSpecified() const;
       
   409     
       
   410     /**
       
   411      * Returns transfer target from the received unattended transfer 
       
   412      * request or KNullDesC if transfer target is not available.
       
   413      * 
       
   414      * @return  Transfer target.
       
   415      */
       
   416     const TPEPhoneNumber& UnattendedTransferTarget() const;
       
   417     
       
   418     /**
       
   419      * Sets transfer target from received unattended transfer request.
       
   420      *
       
   421      * @param   aTarget     Transfer target to set.
       
   422      */
       
   423     void SetUnattendedTransferTarget( const TPEPhoneNumber& aTarget );
       
   424 
       
   425     /**
       
   426      * Returns address choices from received call forward request 
       
   427      * or NULL if addresses are not available.
       
   428      * 
       
   429      * @return  New address.
       
   430      */
       
   431     const CDesC8Array* ForwardAddressChoices() const;
       
   432     
       
   433     /**
       
   434      * Sets address choices from received call forward request.
       
   435      *
       
   436      * @param   aArray     Address array.
       
   437      */
       
   438     void SetForwardAddressChoices( const CDesC8Array* aArray );
       
   439     
       
   440     /**
       
   441      * Sets array index for user selected address.
       
   442      *
       
   443      * @param   aIndex     Array index for selected address.
       
   444      */
       
   445     void SetForwardAddressIndex( TInt aIndex );
       
   446     
       
   447     /**
       
   448      * Sets the call index of a call. Note this is not a call id.
       
   449      */
       
   450     void SetCallIndex( TInt aCallIndex );
       
   451     
       
   452     /**
       
   453      * Gets the call index of a call. Note this is not the same as
       
   454      * call id.
       
   455      */
       
   456     TInt CallIndex() const;
       
   457     
       
   458     /**
       
   459      * Sets the origin of a call.
       
   460      */
       
   461     void SetCallOrigin( TPECallOrigin aOrigin );
       
   462     
       
   463     /**
       
   464      * Gets the origin of a call.
       
   465      */
       
   466     TPECallOrigin CallOrigin() const;
       
   467     
       
   468 private:
       
   469     
       
   470     /**
       
   471      * Constructor.
       
   472      */
       
   473     CPECallInfo();
       
   474     
       
   475     /**
       
   476      * Second-phase constructor.
       
   477      */
       
   478     void ConstructL();
       
   479 
       
   480 private:
       
   481     
       
   482     /**
       
   483      * Client information of the call.
       
   484      * Owned.
       
   485      */
       
   486     CPEClientInformation* iClientInformation;
       
   487     
       
   488     /**
       
   489      * State of the call.
       
   490      */
       
   491     TPEState iCallState;
       
   492     
       
   493     /**
       
   494      * Type of the call.
       
   495      */
       
   496     TPECallType iCallType;
       
   497     
       
   498     /**
       
   499      * Call control capabilities.
       
   500      */
       
   501     TPECallControlCaps iCallControlCaps;
       
   502 
       
   503     /**
       
   504      * Name of the remote party as given by the network (SkypeID).
       
   505      */
       
   506     TPEContactName iRemotePartyName;
       
   507     
       
   508     /**
       
   509      * Whole outgoing phone number (invalid characters removed).
       
   510      */
       
   511     TPEPhoneNumber iWholeOutgoingPhoneNumber;
       
   512 
       
   513     /**
       
   514      * ALS line of the call.
       
   515      */
       
   516     CCCECallParameters::TCCELineType iALSLine;
       
   517     
       
   518     /**
       
   519      * Remote identity status.
       
   520      */
       
   521     RMobileCall::TMobileCallRemoteIdentityStatus iRemoteIdentity;
       
   522     
       
   523     /**
       
   524      * Direction of the call.
       
   525      */
       
   526     RMobileCall::TMobileCallDirection iCallDirection;
       
   527 
       
   528     /**
       
   529      * Mobile call service type.
       
   530      */
       
   531     RMobilePhone::TMobileService iService;
       
   532 
       
   533     /**
       
   534      * Conference member name.
       
   535      */
       
   536     TName iConferenceMemberName; 
       
   537     
       
   538     /**
       
   539      * Start time of the call.
       
   540      */
       
   541     TTime iStartTime;
       
   542     
       
   543     /**
       
   544      * Duration of the call in seconds.
       
   545      */
       
   546     TTimeIntervalSeconds iDuration;
       
   547 
       
   548     /**
       
   549      * Service identifier.
       
   550      */
       
   551     TUint32 iCallServiceId;
       
   552     
       
   553     /**
       
   554      * Conference capabilities.
       
   555      */
       
   556     TUint32 iConferenceCaps;
       
   557     
       
   558     /**
       
   559      * Identification number of the conference master.
       
   560      */
       
   561     TInt iConference;
       
   562     
       
   563     /**
       
   564      * Conference member call identifier.
       
   565      */
       
   566     TInt iConferenceMemberId;
       
   567     
       
   568     /**
       
   569      * Number of conference members.
       
   570      */
       
   571     TInt iNumberOfConferenceMembers;
       
   572 
       
   573     /**
       
   574      * Flag to indicate forced completion indicator for log handling.
       
   575      */
       
   576     TBool iLogForcedCompletion;
       
   577     
       
   578     /**
       
   579      * Flag to indicate logging enabled status.
       
   580      */
       
   581     TBool iLoggingEnabled;
       
   582     
       
   583     /**
       
   584      * Flag to indicate missed call status.
       
   585      */
       
   586     TBool iMissedCall;
       
   587     
       
   588     /**
       
   589      * Flag to indicate secure status.
       
   590      */
       
   591     TBool iSecureStatus;
       
   592     
       
   593     /**
       
   594      * Flag to indicate forwarded status of the incoming call.
       
   595      */
       
   596     TBool iForwarded;
       
   597     
       
   598     /**
       
   599      * Flag to indicate resume held call status.
       
   600      */
       
   601     TBool iResumeHeldCall;
       
   602 
       
   603     /**
       
   604      * Flag to indicate secure specified status.
       
   605      */    
       
   606     TBool iSecureSpecified;
       
   607     
       
   608     /**
       
   609      * Unattended transfer target.
       
   610      */
       
   611     TPEPhoneNumber iTransferTarget;
       
   612     
       
   613     /**
       
   614      * Dtmf postfix.
       
   615      */
       
   616     TPEDtmfString iDtmfPostFix;
       
   617 
       
   618     /**
       
   619      * Call forward address choices.
       
   620      */
       
   621     const CDesC8Array* iForwardAddressChoices;
       
   622     
       
   623     /**
       
   624      * User selected array index for call forward.
       
   625      */
       
   626     TInt iForwardAddressArrayIndex;
       
   627     
       
   628     /**
       
   629      * Call index of a call. Note this is not call id. 
       
   630      */
       
   631     TInt iCallIndex;
       
   632     
       
   633     /**
       
   634      * Origin of the call. 
       
   635      */
       
   636     TPECallOrigin iCallOrigin;
       
   637     };
       
   638 
       
   639 #endif // C_CPECALLINFO_H