convergedcallengine/cce/inc/cccecallobserverasynchroniser.h
changeset 0 ff3b6d0fd310
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  Asynchronises cce call observer calls 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCCECALLOBSERVERASYNCHRONISER_H
       
    20 #define CCCECALLOBSERVERASYNCHRONISER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "mccecallobserver.h"
       
    25 
       
    26 
       
    27 NONSHARABLE_CLASS(CCCECallObserverAsynchroniser)  : 
       
    28     public CActive,  
       
    29     public MCCECallObserver
       
    30     {
       
    31     
       
    32 public:
       
    33     
       
    34     /**
       
    35     * Two-phased constructor
       
    36     * 
       
    37     */
       
    38     static CCCECallObserverAsynchroniser* NewL();
       
    39    
       
    40     /**
       
    41     * Two-phased constructor
       
    42     * Leaves pointer in cleanup stack
       
    43     */
       
    44     static CCCECallObserverAsynchroniser* NewLC();
       
    45 
       
    46     /**
       
    47      * Destructor
       
    48      * 
       
    49      */
       
    50     ~CCCECallObserverAsynchroniser();
       
    51     
       
    52 
       
    53     void SetMCCECallObserver(MCCECallObserver* aObserver); 
       
    54     
       
    55     MCCECallObserver* GetMCCECallObserver();
       
    56   
       
    57    
       
    58    
       
    59     /**
       
    60     * From CActive
       
    61     */
       
    62     void RunL();
       
    63    
       
    64     /**
       
    65     * From CActive
       
    66     */
       
    67     TInt RunError(TInt aError);
       
    68    
       
    69     /**
       
    70     * From CActive
       
    71     */
       
    72     void DoCancel();      
       
    73     
       
    74     
       
    75     void ErrorOccurred( const TCCPError aError );
       
    76     
       
    77     /**
       
    78     * From MCCECallObserver
       
    79     */
       
    80     void CallStateChanged( const CCPCall::TCallState aState );
       
    81 
       
    82     /**
       
    83     * From MCCECallObserver
       
    84     */
       
    85     void CallStateChangedWithInband( const CCPCall::TCallState aState );
       
    86 
       
    87     /**
       
    88     * From MCCECallObserver
       
    89     */
       
    90     void CallEventOccurred( const MCCECallObserver::TCCECallEvent aEvent );
       
    91 
       
    92     /**
       
    93     * From MCCECallObserver
       
    94     */
       
    95     void CallDurationChanged( const TTimeIntervalSeconds aDuration );
       
    96     
       
    97     /**
       
    98     * From MCCECallObserver
       
    99     */
       
   100     void CallCapsChanged( const MCCECallObserver::TCCECallControlCaps aCaps );
       
   101     
       
   102     /**
       
   103     * From MCCECallObserver
       
   104     */
       
   105     void HandleTransfer( const TBool aAttended, 
       
   106                                  const TDesC& aDestination );
       
   107                                  
       
   108 private:
       
   109   
       
   110    enum TEventType
       
   111         {
       
   112         EErrorOccurred = 0,
       
   113         ECallStateChanged,
       
   114         ECallStateChangedWithInband,
       
   115         ECallEventOccurred,
       
   116         ECallDurationChanged,
       
   117         ECallCapsChanged,
       
   118         EHandleTransfer         
       
   119         };
       
   120         
       
   121     class TEventStorage
       
   122     {
       
   123     public:
       
   124         TEventType iEventType;
       
   125         const TDesC* iDescriptor;
       
   126         TInt iInt1;
       
   127         TBool iBoolean;
       
   128         TTimeIntervalSeconds iDuration;
       
   129     };
       
   130     
       
   131     /**
       
   132     * Constructor
       
   133     */
       
   134     CCCECallObserverAsynchroniser();
       
   135  
       
   136     /** 
       
   137     * Leaving stuff in constructor 
       
   138     */
       
   139     void ConstructL();
       
   140     
       
   141     void AddEvent(TEventStorage aEvent);
       
   142     
       
   143     RArray<TEventStorage> iEvents;
       
   144    
       
   145     TBool iIsRuning;
       
   146     
       
   147     MCCECallObserver* iCCECallObserver;
       
   148     };
       
   149     
       
   150     
       
   151 #endif //CCCECALLOBSERVERASYNCHRONISER_H