vtengines/videoteleng/CallCtrl/Inc/CVtCtlVideoCall.h
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
equal deleted inserted replaced
4:6dc066157ed4 18:d9b6a8729acd
     1 /*
       
     2 * Copyright (c) 2004 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:  Video call abstraction
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVTCTLVIDEOCALL_H
       
    21 #define CVTCTLVIDEOCALL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <etelmm.h>
       
    25 #include "MVtCtlCallControl.h"
       
    26 #include "MVtCtlCallStatusObserver.h"
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CVtCtlCallStatusMonitor;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Video call abstraction
       
    36 *
       
    37 *  @lib CSCallCtrl
       
    38 *  @since 2.6
       
    39 */
       
    40 NONSHARABLE_CLASS( CVtCtlVideoCall ) : 
       
    41     public CBase,
       
    42     public MVtCtlCallStatusObserver
       
    43     {
       
    44     public:
       
    45         
       
    46         /**
       
    47         * Call information
       
    48         */
       
    49         struct TVtCtlCallInfo
       
    50             {
       
    51             // Session state
       
    52             MVtCtlCallControl::TVtCtlState     iStatus;
       
    53             // Previous session state
       
    54             MVtCtlCallControl::TVtCtlState     iPreviousStatus;
       
    55             // Session id
       
    56             TVtCtlSessionId                    iId;
       
    57             // Session direction
       
    58             MVtCtlCallControl::TVtCtlDirection iDirection;
       
    59             };
       
    60 
       
    61     public:  // Constructors and destructor
       
    62         
       
    63         /**
       
    64         * Two-phased constructor.
       
    65         * @param aDataLine line subsession
       
    66         * @param aId session id
       
    67         * @param aObserver call status observer
       
    68         */
       
    69         /*****************************************************
       
    70         *   Series 60 Customer / ETel
       
    71         *   Series 60  ETel API
       
    72         *****************************************************/
       
    73         static CVtCtlVideoCall* NewL( 
       
    74             RMobileLine& aDataLine,
       
    75             TVtCtlSessionId aId,
       
    76             MVtCtlCallStatusObserver& aObserver
       
    77             );
       
    78 
       
    79         /**
       
    80         * Destructor.
       
    81         */
       
    82         virtual ~CVtCtlVideoCall();
       
    83 
       
    84     public: // New functions
       
    85         
       
    86         /**
       
    87         * Returns call info
       
    88         * @return reference to call info
       
    89         */
       
    90         const CVtCtlVideoCall::TVtCtlCallInfo& CallInfo() const;
       
    91 
       
    92         /**
       
    93         * Returns Etel call info
       
    94         * @return call info
       
    95         */
       
    96         /*****************************************************
       
    97         *   Series 60 Customer / ETel
       
    98         *   Series 60  ETel API
       
    99         *****************************************************/
       
   100         const RMobileCall::TMobileCallInfoV1& MobileInfo() const;
       
   101 
       
   102         /**
       
   103         * Opens call subsession and starts monitoring call status.
       
   104         * @param aCallName call name
       
   105         */
       
   106         /*****************************************************
       
   107         *   Series 60 Customer / ETel
       
   108         *   Series 60  ETel API
       
   109         *****************************************************/
       
   110         void InitializeCallL( RMobileCall& aCall );
       
   111 
       
   112         /**
       
   113         * Updates call information from ETel
       
   114         * @return Symbian OS error code
       
   115         */
       
   116         TInt UpdateCallInfo();
       
   117 
       
   118         /**
       
   119         * Returns call duration from Etel
       
   120         * @param aDuration duration
       
   121         * @return Symbian OS error code
       
   122         */
       
   123         TInt GetDuration( TVtCtlDuration& aDuration );
       
   124         
       
   125         /**
       
   126         * Obtains video call state from the server and returns it.
       
   127         * @param aState updated call state
       
   128         * @return Symbian OS error code
       
   129         * @since S60 3.1
       
   130         */
       
   131         TInt GetCallState( MVtCtlCallControl::TVtCtlState& aState );
       
   132 
       
   133     protected:  // From MVtCtlCallStatusObserver
       
   134         
       
   135         /**
       
   136         * @see MVtCtlCallStatusObserver::HandleCallStatusChangeL
       
   137         */
       
   138         virtual void HandleCallStatusChangeL( 
       
   139             TVtCtlSessionId aId,
       
   140             MVtCtlCallControl::TVtCtlState aStatus,
       
   141             MVtCtlCallControl::TVtCtlState aPreviousStatus );
       
   142 
       
   143     private:
       
   144 
       
   145         /**
       
   146         * C++ constructor.
       
   147         * @param aDataLine data line
       
   148         * @param aId session id
       
   149         * @param aObserver observer
       
   150         */
       
   151         /*****************************************************
       
   152         *   Series 60 Customer / ETel
       
   153         *   Series 60  ETel API
       
   154         *****************************************************/
       
   155         CVtCtlVideoCall( 
       
   156             RMobileLine& aDataLine, 
       
   157             TVtCtlSessionId aId,
       
   158             MVtCtlCallStatusObserver& aObserver );
       
   159 
       
   160     private:    // Data
       
   161 
       
   162         // Call information
       
   163         TVtCtlCallInfo iCallInfo;
       
   164 
       
   165         // Etel call
       
   166         /*****************************************************
       
   167         *   Series 60 Customer / ETel
       
   168         *   Series 60  ETel API
       
   169         *****************************************************/
       
   170         RMobileCall* iCall;
       
   171 
       
   172         // Data line
       
   173         /*****************************************************
       
   174         *   Series 60 Customer / ETel
       
   175         *   Series 60  ETel API
       
   176         *****************************************************/
       
   177         RMobileLine& iLine;
       
   178 
       
   179         // Etel call information
       
   180         /*****************************************************
       
   181         *   Series 60 Customer / ETel
       
   182         *   Series 60  ETel API
       
   183         *****************************************************/
       
   184         RMobileCall::TMobileCallInfoV1 iMobileCallInfo;
       
   185         
       
   186         // Call status monitor
       
   187         CVtCtlCallStatusMonitor* iStatusMonitor;
       
   188 
       
   189         // Call status observer
       
   190         MVtCtlCallStatusObserver& iObserver;
       
   191     };
       
   192 
       
   193 #endif      // CVTCTLVIDEOCALL_H   
       
   194             
       
   195 // End of File