vpnengine/ikesocket/src/connobserver.cpp
branchRCL_3
changeset 12 a15e6baef510
parent 0 33413c0669b9
equal deleted inserted replaced
11:e4ed1060deb1 12:a15e6baef510
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    81 // ---------------------------------------------------------------------------
    81 // ---------------------------------------------------------------------------
    82 //
    82 //
    83 CConnObserver::CConnObserver( RConnection& aConnection,
    83 CConnObserver::CConnObserver( RConnection& aConnection,
    84                               MConnObserverCallback& aCallback,
    84                               MConnObserverCallback& aCallback,
    85                               MIkeDebug& aDebug ) 
    85                               MIkeDebug& aDebug ) 
    86  :CActive(EPriorityStandard),
    86  :CActive( EPriorityStandard ),
    87  iConnection( aConnection ),
    87  iConnection( aConnection ),
    88  iCallback( aCallback ),
    88  iCallback( aCallback ),
    89  iDebug( aDebug )
    89  iDebug( aDebug )
    90     {
    90     {
    91     CActiveScheduler::Add(this);    //Added to the Active Scheduler
    91     CActiveScheduler::Add(this);    //Added to the Active Scheduler
   105 // Handles completion of progress notification.
   105 // Handles completion of progress notification.
   106 // ---------------------------------------------------------------------------
   106 // ---------------------------------------------------------------------------
   107 //
   107 //
   108 void CConnObserver::RunL()
   108 void CConnObserver::RunL()
   109     {
   109     {
   110     DEBUG_LOG1( _L("CConnObserver::RunL(), iStatus=%d"), iStatus.Int() );    
   110     DEBUG_LOG2( _L("CConnObserver::RunL(), iStatus=%d, error=%d"),
   111     iCallback.LinkDisconnected( iStatus.Int() );
   111             iStatus.Int(), iProgressBuf().iError );
       
   112     TInt status = iStatus.Int();
       
   113     if ( status == KErrNone )
       
   114         {
       
   115         status = iProgressBuf().iError;
       
   116         }
       
   117     
       
   118     iCallback.LinkDisconnected( status );
   112     }
   119     }
   113 
   120 
   114 // ---------------------------------------------------------------------------
   121 // ---------------------------------------------------------------------------
   115 // From class CActive
   122 // From class CActive
   116 // Cancels progress notification.
   123 // Cancels progress notification.