convergedcallengine/csplugin/inc/cspvideocall.h
changeset 0 ff3b6d0fd310
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Implements CSPVideoCall for CS Call Plug-in
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSPVIDEOCALL_H
       
    21 #define CSPVIDEOCALL_H
       
    22 
       
    23 #include <mccpcscall.h>
       
    24 #include <mccpcallobserver.h>
       
    25 #include <etel.h>
       
    26 #include <etelmm.h>
       
    27 #include <cccecallparameters.h>
       
    28 
       
    29 #include "cspcall.h"
       
    30 #include "cspconsts.h"
       
    31 #include "mcspcallobserver.h"
       
    32 #include "mcspcallerrorobserver.h"
       
    33 #include "cspvideocallconnectionhandler.h"
       
    34 
       
    35 
       
    36 class MCCPObserver;
       
    37 class RMobileCall;
       
    38 class CSPEtelCallStatusMonitor;
       
    39 class CSPEtelCallEventMonitor;
       
    40 class CSPEtelVideoCallCapsMonitor;
       
    41 class CSPEtelCallWaitingRequester;
       
    42 
       
    43 /**
       
    44 * Call class for CS Call Plug-in. Implements the API defined by CCP in classes
       
    45 * MCCPCall and MCCPCSCall
       
    46 *
       
    47 *  @lib csplugin.dll
       
    48 *  @since S60 v3.2
       
    49 */
       
    50 class CSPVideoCall : public CSPCall
       
    51     {
       
    52     
       
    53     public:
       
    54         /*
       
    55         * Creates a new CSPVideoCall object.
       
    56         * @since S60 3.2
       
    57         * @param aName dialled number (MT) or call name (MO)
       
    58         * @param aLine line for opening the call
       
    59         * @param aMobileOriginated direction of call        
       
    60         * @param aParams call parameters 
       
    61         * @param aCommonInfo common information for call,
       
    62         * @return pointer to created call object
       
    63         */
       
    64         static CSPVideoCall* NewL( const TDesC& aName,
       
    65                               RMobileLine& aLine,
       
    66                               TBool aMobileOriginated,
       
    67                               const CCCECallParameters& aParams,
       
    68                               MCSPCommonInfo& aCommonInfo );       
       
    69         
       
    70         /**
       
    71         * C++ default destructor
       
    72         */
       
    73         virtual ~CSPVideoCall( );
       
    74 
       
    75         /**
       
    76         * Informs about ready data connection.
       
    77         * @aPortName name of data port
       
    78         */
       
    79         void ConnectionReady( TName aDataPortName );
       
    80         
       
    81         /**
       
    82         * Error occurred when establishing connection.
       
    83         * @param aErr error value
       
    84         */
       
    85         void ConnectionEstablishingFailed(TInt aErr);
       
    86         
       
    87         /**
       
    88         * Notification about data call caps change.
       
    89         * @param aCaps new caps
       
    90         */
       
    91         void DataCallCapsChanged( RMobileCall::TMobileCallDataCapsV1& aCaps );
       
    92         
       
    93         /**
       
    94         * Selects call type video or voice depending of available procotol 
       
    95         * capabilities
       
    96         * @return Call type video or voice  
       
    97         */
       
    98         CCPCall::TCallType SelectCallTypeFromProtocolCaps();          
       
    99         
       
   100 // from base class CSPCall
       
   101 
       
   102         /**
       
   103         * From CSPCall
       
   104         * Updates the state change and forwards the state for observer.
       
   105         * @param aState new state of the call
       
   106         */
       
   107         virtual void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState );
       
   108 
       
   109         /**
       
   110         * From CSPCall
       
   111         * Updates the state change and forwards the state for observer.
       
   112         * @param aState new state of the call
       
   113         */
       
   114         virtual void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState );
       
   115         
       
   116         /**
       
   117         * From MCCPCSCall
       
   118         * Starts dialing to recipient without FDN check.
       
   119         * @param aCallParams Call parameters used by the TSY (TCallParamsPckg)
       
   120         * @return system wide error code
       
   121         */
       
   122         TInt DialNoFdnCheck( const TDesC8& aCallParams );
       
   123 
       
   124         /**
       
   125         * From CSPCall
       
   126         * Switch in the alternating call mode of an alternating call
       
   127         * @since S60 3.2
       
   128         */
       
   129         TInt SwitchAlternatingCall();
       
   130         
       
   131         /**
       
   132         * From MCCPCSCall
       
   133         * Gets the calls data call capabilities
       
   134         * @since S60 3.2
       
   135         * @param aCaps TMobileCallDataCapsV1
       
   136         * @return KErrNone if the function member was successful, 
       
   137         *        KErrNotSupported if call doesn't support circuit switched data
       
   138         *        KErrNotFound if this call is not a data call
       
   139         */
       
   140         virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const;
       
   141 
       
   142         /**
       
   143         * From MCCPCall
       
   144         * Get call's secure status.
       
   145         * @since S60 3.2
       
   146         * @return TBool ETrue if security is enabled, else EFalse.
       
   147         */
       
   148         TBool IsSecured() const;
       
   149           
       
   150     protected: 
       
   151         
       
   152         /*
       
   153         * C++ default constructor
       
   154         * @param aLine open line ready for use
       
   155         * @param aMobileOriginated true if MO, false if MT
       
   156         * @param aName call name (MT) or recipient (MO)
       
   157         * @param aCommonInfo reference to common info interface
       
   158         */
       
   159         CSPVideoCall( RMobileLine& aLine,  
       
   160                  TBool aMobileOriginated,
       
   161                  const TDesC& aName,
       
   162                  MCSPCommonInfo& aCommonInfo );
       
   163 
       
   164         /*
       
   165         * Constructing 2nd phase.
       
   166         * @since S60 3.2
       
   167         */
       
   168         void ConstructL( const CCCECallParameters& aParams );
       
   169 
       
   170     private:    
       
   171 
       
   172         /** 
       
   173         * Sets default call params.
       
   174         */
       
   175         void SetDefaultCallParameters();
       
   176         
       
   177         /** 
       
   178         * Sets default video call params
       
   179         */
       
   180         void SetVideoCallParameters();
       
   181         
       
   182         /**
       
   183         * Branches dial requests according 
       
   184         * to FDN check flag.
       
   185         * @aFdnCheck ETrue if FDN is checked
       
   186         */
       
   187         TInt DialFdnCond( TBool aFdnCheck );
       
   188   
       
   189     private:
       
   190 
       
   191         /**
       
   192         * Data call caps monitor
       
   193         * Own.
       
   194         */
       
   195         CSPEtelVideoCallCapsMonitor* iVideoCallCapsMonitor;
       
   196 
       
   197         /**
       
   198         * Call parameters. 
       
   199         */
       
   200         RMobileCall::TMobileHscsdCallParamsV1 iDataCallParams;
       
   201 
       
   202         /**
       
   203         * Call parameters package.  
       
   204         */
       
   205         RMobileCall::TMobileHscsdCallParamsV1Pckg iDataCallParamsPckg;
       
   206       
       
   207         /**
       
   208         * Air Interface User Rate
       
   209         */
       
   210         RMobileCall::TMobileCallAiur iAirInterfaceUserRate;
       
   211         
       
   212         /**
       
   213         * Current received time slots
       
   214         */
       
   215         TInt iCurrentTimeSlots;
       
   216                 
       
   217         /**
       
   218         * Connection functionality
       
   219         * Own.
       
   220         */
       
   221         CSPVideoCallConnectionHandler* iConnectionHandler;
       
   222 
       
   223         /**
       
   224         * Next call state 
       
   225         */
       
   226         MCCPCallObserver::TCCPCallState iNextCallState;       
       
   227         
       
   228     };
       
   229 
       
   230 
       
   231 #endif // CSPVIDEOCALL_H