convergedcallengine/cce/src/ccceobserverasynchroniser.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
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 observer calls 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "ccceobserverasynchroniser.h"
       
    21 #include "cccelogger.h"
       
    22  
       
    23 // -----------------------------------------------------------------------------
       
    24 // NewL()
       
    25 // Two-phased constructor
       
    26 // 
       
    27 CCCEObserverAsynchroniser* CCCEObserverAsynchroniser::NewL()
       
    28     {
       
    29     CCCEObserverAsynchroniser* self = CCCEObserverAsynchroniser::NewLC();
       
    30     CleanupStack::Pop( self );
       
    31     return self;    
       
    32     }
       
    33    
       
    34 // -----------------------------------------------------------------------------
       
    35 // NewLC()
       
    36 // Two-phased constructor
       
    37 // Leaves pointer in cleanup stack
       
    38 // -----------------------------------------------------------------------------
       
    39 CCCEObserverAsynchroniser* CCCEObserverAsynchroniser::NewLC()
       
    40     {
       
    41     CCCEObserverAsynchroniser* self = new( ELeave ) CCCEObserverAsynchroniser();
       
    42     CleanupStack::PushL( self );
       
    43     self->ConstructL();
       
    44     return self;    
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // Destructor
       
    49 // -----------------------------------------------------------------------------
       
    50 CCCEObserverAsynchroniser::~CCCEObserverAsynchroniser()
       
    51     {
       
    52     Cancel();
       
    53     iEvents.Close();    
       
    54     }
       
    55     
       
    56 // -----------------------------------------------------------------------------
       
    57 // Set provider observer
       
    58 // -----------------------------------------------------------------------------
       
    59 void CCCEObserverAsynchroniser::SetMCCEObserver( MCCEObserver* aObserver )
       
    60     {
       
    61     iCCEObserver = aObserver;
       
    62     }
       
    63     
       
    64 // -----------------------------------------------------------------------------
       
    65 // Set SS observer
       
    66 // -----------------------------------------------------------------------------
       
    67 void CCCEObserverAsynchroniser::SetMCCESsObserver(MCCESsObserver* aObserver)
       
    68     {
       
    69     iCCESsObserver = aObserver;
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // Set Conference call observer
       
    74 // -----------------------------------------------------------------------------
       
    75 void CCCEObserverAsynchroniser::SetMCCEConferenceCallObserver(
       
    76     const MCCEConferenceCallObserver* aObserver)
       
    77     {
       
    78     iCCEConferenceCallObserver = const_cast<MCCEConferenceCallObserver*>( aObserver );  
       
    79     }
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // Set DTMF observer
       
    83 // -----------------------------------------------------------------------------
       
    84 void CCCEObserverAsynchroniser::SetMCCEDtmfObserver( const MCCEDtmfObserver* aObserver )
       
    85     {
       
    86     iCCEDtmfObserver = const_cast<MCCEDtmfObserver*>( aObserver );   
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // Set Extension observer
       
    91 // -----------------------------------------------------------------------------
       
    92 void CCCEObserverAsynchroniser::SetMCCEExtensionObserver(
       
    93     const MCCEExtensionObserver* aObserver)
       
    94     {
       
    95     iCCEExtensionObserver = const_cast<MCCEExtensionObserver*>( aObserver );   
       
    96     }
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // Get provider observer
       
   100 // -----------------------------------------------------------------------------    
       
   101 MCCEObserver& CCCEObserverAsynchroniser::GetMCCEObserver()
       
   102     {
       
   103     return *this;    
       
   104     }
       
   105 
       
   106 // -----------------------------------------------------------------------------
       
   107 // Get SS observer
       
   108 // -----------------------------------------------------------------------------
       
   109 MCCESsObserver& CCCEObserverAsynchroniser::GetMCCESsObserver()
       
   110     {
       
   111     return *this;   
       
   112     }
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // Get Conference call observer
       
   116 // -----------------------------------------------------------------------------
       
   117 MCCEConferenceCallObserver& CCCEObserverAsynchroniser::GetMCCEConferenceCallObserver()
       
   118     {
       
   119     return *this;   
       
   120     }
       
   121 
       
   122 // -----------------------------------------------------------------------------
       
   123 // Get DTMF observer
       
   124 // -----------------------------------------------------------------------------
       
   125 MCCEDtmfObserver& CCCEObserverAsynchroniser::GetMCCEDtmfObserver()
       
   126     {
       
   127     return *this;  
       
   128     }
       
   129     
       
   130 // -----------------------------------------------------------------------------
       
   131 // Get Extension observer
       
   132 // -----------------------------------------------------------------------------
       
   133 MCCEExtensionObserver& CCCEObserverAsynchroniser::GetMCCEExtensionObserver()
       
   134     {
       
   135     return *this;   
       
   136     }
       
   137     
       
   138 // -----------------------------------------------------------------------------
       
   139 // CActive RunL
       
   140 // -----------------------------------------------------------------------------
       
   141 void CCCEObserverAsynchroniser::RunL()
       
   142     {
       
   143     CCELOGSTRING2( "CCCEObserverAsynchroniser::RunL() events: %d", iEvents.Count() );
       
   144     while (iEvents.Count() > 0)
       
   145         {
       
   146         switch (iEvents[0].iEventType)
       
   147             {
       
   148             
       
   149             case EIncomingCall:
       
   150                 {
       
   151                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EIncomingCall");
       
   152                 if (iCCEObserver)
       
   153                     {
       
   154                     iCCEObserver->IncomingCall(*iEvents[0].iCall);
       
   155                     }
       
   156                 break;    
       
   157                 }           
       
   158             
       
   159             case EMOCallCreated:
       
   160                 {
       
   161                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EPluginMOCallCreated");
       
   162                 if (iCCEObserver)
       
   163                     {
       
   164                     iCCEObserver->MOCallCreated(*iEvents[0].iCall);
       
   165                     }
       
   166                 break;    
       
   167                 }
       
   168                 
       
   169             case EDataPortName:
       
   170                 {
       
   171                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EDataPortName");
       
   172                 if (iCCEObserver)
       
   173                     {
       
   174                   	iCCEObserver->DataPortName( iEvents[0].iTName );
       
   175                     }
       
   176                 break;    
       
   177                 }
       
   178 
       
   179             case EConferenceCallCreated:
       
   180                 {
       
   181                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EConferenceCallCreated");
       
   182                 if( iCCEObserver )
       
   183                     {
       
   184                     iCCEObserver->ConferenceCallCreated( *iEvents[0].iConferenceCall );
       
   185                     }
       
   186                 break;    
       
   187                 }                
       
   188             case EBarringEventOccurred:
       
   189                 {
       
   190                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EBarringEventOccurred");
       
   191                 if (iCCESsObserver)
       
   192                     {
       
   193                     iCCESsObserver->BarringEventOccurred(
       
   194                         (MCCESsObserver::TCCESsBarringEvent)iEvents[0].iInt1);
       
   195                     }
       
   196                 break;    
       
   197                 }
       
   198                 
       
   199             case ECLIEventOccurred:
       
   200                 {
       
   201                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECLIEventOccurred");
       
   202                 if (iCCESsObserver)
       
   203                     {
       
   204                     iCCESsObserver->CLIEventOccurred(
       
   205                         (MCCESsObserver::TCCESsCLIEvent)iEvents[0].iInt1);
       
   206                     }
       
   207                 break;    
       
   208                 }
       
   209                 
       
   210             case ECallForwardEventOccurred:
       
   211                 {
       
   212                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred");
       
   213                 if (iCCESsObserver)
       
   214                     {
       
   215                     if( iEvents[0].iDescriptor )
       
   216                     	{
       
   217                     	iCCESsObserver->CallForwardEventOccurred(
       
   218                         	(MCCESsObserver::TCCESsCallForwardEvent)iEvents[0].iInt1, *iEvents[0].iDescriptor );
       
   219                         }
       
   220                     else
       
   221                     	{
       
   222                 		CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred, descr is NULL!");
       
   223                     	}
       
   224                     }
       
   225                 break;    
       
   226                 }
       
   227                 
       
   228             case ECallCugEventOccurred:
       
   229                 {
       
   230                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallCugEventOccurred");
       
   231                 if (iCCESsObserver)
       
   232                     {
       
   233                     iCCESsObserver->CallCugEventOccurred(
       
   234                         (MCCESsObserver::TCCESsCugEvent)iEvents[0].iInt1);
       
   235                     }
       
   236                 break;    
       
   237                 }
       
   238                 
       
   239             case ENotifyCurrentActiveALSLine:
       
   240                 {
       
   241                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ENotifyCurrentActiveALSLine");
       
   242                 if (iCCESsObserver)
       
   243                     {
       
   244                     iCCESsObserver->NotifyCurrentActiveALSLine(iEvents[0].iInt1);
       
   245                     }
       
   246                 break;    
       
   247                 }
       
   248                 
       
   249             case ECallEventOccurred:
       
   250                 {
       
   251                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallEventOccurred");        
       
   252                 if (iCCEConferenceCallObserver)
       
   253                     {
       
   254                     iCCEConferenceCallObserver->CallEventOccurred(
       
   255                         (MCCEConferenceCallObserver::TCCEConferenceCallEvent)iEvents[0].iInt1, iEvents[0].iCall);
       
   256                     }
       
   257                 break;    
       
   258                 }
       
   259                 
       
   260             case ECallStateChanged:
       
   261                 {
       
   262                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallStateChanged");    
       
   263                 if (iCCEConferenceCallObserver)
       
   264                     {
       
   265                     iCCEConferenceCallObserver->CallStateChanged(
       
   266                         (MCCEConferenceCallObserver::TCCEConferenceCallState)iEvents[0].iInt1);
       
   267                     }
       
   268                 break;    
       
   269                 }
       
   270                 
       
   271             case ECallCapsChanged:
       
   272                 {
       
   273                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallCapsChanged");    
       
   274                 if (iCCEConferenceCallObserver)
       
   275                     {
       
   276                     iCCEConferenceCallObserver->CallCapsChanged(
       
   277                         (MCCEConferenceCallObserver::TCCEConferenceCallCaps)iEvents[0].iInt1);
       
   278                     }
       
   279                 break;    
       
   280                 }
       
   281                 
       
   282             case EErrorOccurred:
       
   283                 {
       
   284                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EErrorOccurred");    
       
   285                 if (iCCEConferenceCallObserver)
       
   286                     {
       
   287                     iCCEConferenceCallObserver->ErrorOccurred(
       
   288                         (TCCPConferenceCallError)iEvents[0].iInt1);
       
   289                     }
       
   290                 break;    
       
   291                 }
       
   292                 
       
   293             case ECallDurationChanged:
       
   294                 {
       
   295                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallDurationChanged");    
       
   296                 if (iCCEConferenceCallObserver)
       
   297                     {
       
   298                     iCCEConferenceCallObserver->CallDurationChanged(iEvents[0].iDuration);
       
   299                     }
       
   300                 break;    
       
   301                 }
       
   302                 
       
   303             case EHandleDTMFEvent:
       
   304                 {
       
   305                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EHandleDTMFEvent");    
       
   306                 if (iCCEDtmfObserver)
       
   307                     {
       
   308                     iCCEDtmfObserver->HandleDTMFEvent((MCCEDtmfObserver::TCCEDtmfEvent)iEvents[0].iInt1,
       
   309                         iEvents[0].iInt2, iEvents[0].iChar);
       
   310                     }
       
   311                 break;    
       
   312                 }
       
   313                 
       
   314             case EHandleExtensionEvents:
       
   315                 {
       
   316                 CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EHandleExtensionEvents");    
       
   317                 if (iCCEExtensionObserver)
       
   318                     {
       
   319                     iCCEExtensionObserver->HandleExtensionEvents(iEvents[0].iServiceId,
       
   320                         iEvents[0].iInt1, iEvents[0].iInt2);
       
   321                     }
       
   322                 break;    
       
   323                 }
       
   324             }
       
   325             
       
   326             iEvents.Remove(0);
       
   327             iEvents.Compress();
       
   328         }
       
   329        iIsRuning = EFalse;   
       
   330     }
       
   331 
       
   332 // -----------------------------------------------------------------------------
       
   333 // CActive RunError
       
   334 // -----------------------------------------------------------------------------
       
   335 TInt CCCEObserverAsynchroniser::RunError( TInt aError )
       
   336     {
       
   337     return aError;
       
   338     }
       
   339 
       
   340 // -----------------------------------------------------------------------------
       
   341 // CActive DoCancel
       
   342 // -----------------------------------------------------------------------------
       
   343 void CCCEObserverAsynchroniser::DoCancel()   
       
   344     {
       
   345     iIsRuning = EFalse;   
       
   346     iEvents.Reset();
       
   347     }
       
   348 // -----------------------------------------------------------------------------
       
   349 // MCCEObserver IncomingCall
       
   350 // -----------------------------------------------------------------------------
       
   351 void CCCEObserverAsynchroniser::IncomingCall( MCCECall& aCall )
       
   352     {
       
   353     CCELOGSTRING( "CCCEObserverAsynchroniser::IncomingCall");
       
   354     TEventStorage event;
       
   355     event.iEventType = EIncomingCall;
       
   356     event.iCall = &aCall;
       
   357     AddEvent(event);
       
   358     }
       
   359 
       
   360 // -----------------------------------------------------------------------------
       
   361 // MCCEObserver MOCallCreated
       
   362 // -----------------------------------------------------------------------------
       
   363 void CCCEObserverAsynchroniser::MOCallCreated( MCCECall& aCall )
       
   364     {
       
   365     CCELOGSTRING( "CCCEObserverAsynchroniser::MOCallCreated");
       
   366     TEventStorage event;
       
   367     event.iEventType = EMOCallCreated;
       
   368     event.iCall = &aCall;
       
   369     AddEvent(event);   
       
   370     }
       
   371 
       
   372 // -----------------------------------------------------------------------------
       
   373 // MCCEObserver DataPortName
       
   374 // -----------------------------------------------------------------------------
       
   375 void CCCEObserverAsynchroniser::DataPortName( TName& aPortName )
       
   376 	{
       
   377     CCELOGSTRING( "CCCEObserverAsynchroniser::DataPortName");
       
   378     TEventStorage event;
       
   379     event.iEventType = EDataPortName;
       
   380     event.iTName = aPortName;
       
   381     AddEvent(event);   
       
   382 	}
       
   383 
       
   384 // -----------------------------------------------------------------------------
       
   385 // MCCEObserver ConferenceCallCreated
       
   386 // -----------------------------------------------------------------------------
       
   387 void CCCEObserverAsynchroniser::ConferenceCallCreated( MCCEConferenceCall& aConferenceCall )
       
   388     {
       
   389     CCELOGSTRING( "CCCEObserverAsynchroniser::ConferenceCallCreated");
       
   390     TEventStorage event;
       
   391     event.iEventType = EConferenceCallCreated;    
       
   392     event.iConferenceCall = &aConferenceCall;
       
   393     AddEvent(event);   
       
   394     }
       
   395 
       
   396 // -----------------------------------------------------------------------------
       
   397 // MCCESsObserver BarringEventOccurred
       
   398 // -----------------------------------------------------------------------------
       
   399 void CCCEObserverAsynchroniser::BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent )
       
   400     {
       
   401     CCELOGSTRING( "CCCEObserverAsynchroniser::BarringEventOccurred");
       
   402     TEventStorage event;
       
   403     event.iEventType = EBarringEventOccurred;
       
   404     event.iInt1 = aBarringEvent;
       
   405     AddEvent(event);   
       
   406     }
       
   407 							  
       
   408 // -----------------------------------------------------------------------------
       
   409 // MCCESsObserver CLIEventOccurred
       
   410 // -----------------------------------------------------------------------------
       
   411 void CCCEObserverAsynchroniser::CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent )
       
   412     {
       
   413     CCELOGSTRING( "CCCEObserverAsynchroniser::CLIEventOccurred");
       
   414     TEventStorage event;
       
   415     event.iEventType = ECLIEventOccurred;
       
   416     event.iInt1 = aCallLineEvent;
       
   417     AddEvent(event); 
       
   418         
       
   419     }
       
   420 							  
       
   421 // -----------------------------------------------------------------------------
       
   422 // MCCESsObserver CallForwardEventOccurred
       
   423 // -----------------------------------------------------------------------------
       
   424 void CCCEObserverAsynchroniser::CallForwardEventOccurred( 
       
   425 					const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
       
   426 					const TDesC& aRemoteAddress )
       
   427     {
       
   428     CCELOGSTRING( "CCCEObserverAsynchroniser::CallForwardEventOccurred");
       
   429     TEventStorage event;
       
   430     event.iEventType = ECallForwardEventOccurred;
       
   431     event.iInt1 = aCallForwardEvent;
       
   432     // In theory this could be invalidated before async forward
       
   433     // also in more remote theoretical case overwritten by plugin with new value.
       
   434     event.iDescriptor = &aRemoteAddress;
       
   435     AddEvent(event);
       
   436         
       
   437     }
       
   438 
       
   439 // -----------------------------------------------------------------------------
       
   440 // MCCESsObserver CallCugEventOccurred
       
   441 // -----------------------------------------------------------------------------
       
   442 void CCCEObserverAsynchroniser::CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent )
       
   443     {
       
   444     CCELOGSTRING( "CCCEObserverAsynchroniser::CallCugEventOccurred");
       
   445     TEventStorage event;
       
   446     event.iEventType = ECallCugEventOccurred;
       
   447     event.iInt1 = aCugEvent;
       
   448     AddEvent(event);
       
   449         
       
   450     }
       
   451 
       
   452 // -----------------------------------------------------------------------------
       
   453 // MCCESsObserver NotifyCurrentActiveALSLine
       
   454 // -----------------------------------------------------------------------------
       
   455 void CCCEObserverAsynchroniser::NotifyCurrentActiveALSLine( TInt aLine )
       
   456     {
       
   457     CCELOGSTRING( "CCCEObserverAsynchroniser::NotifyCurrentActiveALSLine");
       
   458     TEventStorage event;
       
   459     event.iEventType = ENotifyCurrentActiveALSLine;
       
   460     event.iInt1 = aLine;
       
   461     AddEvent(event);
       
   462     }
       
   463 
       
   464 // -----------------------------------------------------------------------------
       
   465 // MCCESsObserver NotifyCurrentActiveALSLine
       
   466 // -----------------------------------------------------------------------------
       
   467 void CCCEObserverAsynchroniser::CallEventOccurred( 
       
   468              const MCCEConferenceCallObserver::TCCEConferenceCallEvent aEvent,
       
   469              MCCECall* aReferredCall )
       
   470     {
       
   471     CCELOGSTRING( "CCCEObserverAsynchroniser::CallEventOccurred");
       
   472     TEventStorage event;
       
   473     event.iEventType = ECallEventOccurred;
       
   474     event.iInt1 = aEvent;
       
   475     event.iCall = aReferredCall;
       
   476     AddEvent(event);       
       
   477     }
       
   478     
       
   479 // -----------------------------------------------------------------------------
       
   480 // MCCEConferenceCallObserver CallStateChanged
       
   481 // -----------------------------------------------------------------------------
       
   482 void CCCEObserverAsynchroniser::CallStateChanged( 
       
   483              const MCCEConferenceCallObserver::TCCEConferenceCallState aState )
       
   484     {
       
   485     CCELOGSTRING( "CCCEObserverAsynchroniser::CallStateChanged");
       
   486     TEventStorage event;
       
   487     event.iEventType = ECallStateChanged;
       
   488     event.iInt1 = aState;
       
   489     AddEvent(event);
       
   490     }
       
   491 
       
   492 // -----------------------------------------------------------------------------
       
   493 // MCCEConferenceCallObserver CallCapsChanged
       
   494 // -----------------------------------------------------------------------------
       
   495 void CCCEObserverAsynchroniser::CallCapsChanged( 
       
   496              const MCCEConferenceCallObserver::TCCEConferenceCallCaps aCaps )
       
   497     {
       
   498     CCELOGSTRING( "CCCEObserverAsynchroniser::CallCapsChanged");
       
   499     TEventStorage event;
       
   500     event.iEventType = ECallCapsChanged;
       
   501     event.iInt1 = aCaps;
       
   502     AddEvent(event);
       
   503     }
       
   504  
       
   505 // -----------------------------------------------------------------------------
       
   506 // MCCEConferenceCallObserver ErrorOccurred
       
   507 // -----------------------------------------------------------------------------
       
   508 void CCCEObserverAsynchroniser::ErrorOccurred( TCCPConferenceCallError aError  )
       
   509     {
       
   510     CCELOGSTRING( "CCCEObserverAsynchroniser::ErrorOccurred");
       
   511     TEventStorage event;
       
   512     event.iEventType = EErrorOccurred;
       
   513     event.iInt1 = aError;
       
   514     AddEvent(event);
       
   515     }
       
   516 
       
   517 // -----------------------------------------------------------------------------
       
   518 // MCCEConferenceCallObserver CallDurationChanged
       
   519 // -----------------------------------------------------------------------------
       
   520 void CCCEObserverAsynchroniser::CallDurationChanged( const TTimeIntervalSeconds aDuration )
       
   521     {
       
   522     CCELOGSTRING( "CCCEObserverAsynchroniser::CallDurationChanged");
       
   523     TEventStorage event;
       
   524     event.iEventType = ECallDurationChanged;
       
   525     event.iDuration = aDuration;
       
   526     AddEvent(event);
       
   527     }
       
   528 
       
   529 // -----------------------------------------------------------------------------
       
   530 // MCCEDtmfObserver HandleDTMFEvent
       
   531 // -----------------------------------------------------------------------------	
       
   532 void CCCEObserverAsynchroniser::HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent, 
       
   533                               const TInt aError, 
       
   534                               const TChar aTone )
       
   535     {
       
   536     CCELOGSTRING( "CCCEObserverAsynchroniser::HandleDTMFEvent");
       
   537     TEventStorage event;
       
   538     event.iEventType = EHandleDTMFEvent;
       
   539     event.iInt1 = aEvent;
       
   540     event.iInt2 = aError;
       
   541     event.iChar = aTone;
       
   542     AddEvent(event);
       
   543     }
       
   544     
       
   545 // -----------------------------------------------------------------------------
       
   546 // MCCEExtensionObserver HandleExtensionEvents
       
   547 // -----------------------------------------------------------------------------                                
       
   548 void CCCEObserverAsynchroniser::HandleExtensionEvents( TUint32 aServiceId,
       
   549 	TInt aEvent,
       
   550     TInt aStatus )
       
   551     {
       
   552     CCELOGSTRING( "CCCEObserverAsynchroniser::HandleExtensionEvents");
       
   553     TEventStorage event;
       
   554     event.iEventType = EHandleExtensionEvents;
       
   555     event.iServiceId = aServiceId;
       
   556     event.iInt1 = aEvent;
       
   557     event.iInt2 = aStatus;
       
   558     AddEvent(event);        
       
   559     }
       
   560     
       
   561 // -----------------------------------------------------------------------------
       
   562 // Constructor
       
   563 // -----------------------------------------------------------------------------     
       
   564 CCCEObserverAsynchroniser::CCCEObserverAsynchroniser():CActive(EPriorityStandard)
       
   565     {      
       
   566     }
       
   567 
       
   568 // -----------------------------------------------------------------------------
       
   569 // Leaving stuff in constructor
       
   570 // -----------------------------------------------------------------------------
       
   571 void CCCEObserverAsynchroniser::ConstructL()
       
   572     {
       
   573     CActiveScheduler::Add(this);   
       
   574     }
       
   575 
       
   576 // -----------------------------------------------------------------------------
       
   577 // Adding event to queue
       
   578 // -----------------------------------------------------------------------------  
       
   579 void CCCEObserverAsynchroniser::AddEvent(TEventStorage aEvent)
       
   580     {
       
   581     iEvents.Append(aEvent);
       
   582     CCELOGSTRING( "CCCEObserverAsynchroniser::AddEvent");
       
   583     if (!iIsRuning)
       
   584         {
       
   585         CCELOGSTRING( "CCCEObserverAsynchroniser::AddEvent Activating...");
       
   586         iIsRuning = ETrue;
       
   587         SetActive();
       
   588         TRequestStatus* status = &iStatus;
       
   589         User::RequestComplete(status, KErrNone);
       
   590         }
       
   591     }
       
   592     
       
   593 // end of file