wlanutilities/wlansniffer/model/src/wsfactivewaiter.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 0 56b72877c1cb
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Implementation of CWsfActiveWaiter.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "wsfactivewaiter.h"
       
    21 #include "wsflogger.h"
       
    22 
       
    23 
       
    24 
       
    25 // ================= MEMBER FUNCTIONS =======================
       
    26 
       
    27 // ---------------------------------------------------------
       
    28 // CWsfActiveWaiter* CWsfActiveWaiter::NewL()
       
    29 // ---------------------------------------------------------
       
    30 //
       
    31 CWsfActiveWaiter* CWsfActiveWaiter::NewL( )
       
    32     {
       
    33     CWsfActiveWaiter* self = 
       
    34                          new ( ELeave ) CWsfActiveWaiter( );
       
    35     CleanupStack::PushL( self );
       
    36     self->ConstructL();
       
    37     CleanupStack::Pop( self );
       
    38     
       
    39     return self;        
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------
       
    43 // CWsfActiveWaiter::ConstructL()
       
    44 // ---------------------------------------------------------
       
    45 //
       
    46 void CWsfActiveWaiter::ConstructL()
       
    47     {     
       
    48     CActiveScheduler::Add( this );            
       
    49     }
       
    50 
       
    51 
       
    52 // ---------------------------------------------------------
       
    53 // CWsfActiveWaiter::CWsfActiveWaiter()
       
    54 // ---------------------------------------------------------
       
    55 //
       
    56 CWsfActiveWaiter::CWsfActiveWaiter()
       
    57 : CActive( EPriorityNormal )
       
    58     {
       
    59     }
       
    60     
       
    61 
       
    62 // ---------------------------------------------------------
       
    63 // CWsfActiveWaiter::~CWsfActiveWaiter()
       
    64 // ---------------------------------------------------------
       
    65 //    
       
    66 CWsfActiveWaiter::~CWsfActiveWaiter()
       
    67     {
       
    68     Cancel();
       
    69     }
       
    70 
       
    71 
       
    72 // ---------------------------------------------------------
       
    73 // CWsfActiveWaiter::DoCancel()
       
    74 // ---------------------------------------------------------
       
    75 // 
       
    76 void CWsfActiveWaiter::DoCancel()
       
    77     {
       
    78     }
       
    79      
       
    80  
       
    81 // ---------------------------------------------------------
       
    82 // CWsfActiveWaiter::RunL()
       
    83 // ---------------------------------------------------------
       
    84 //     
       
    85 void CWsfActiveWaiter::RunL()
       
    86     {
       
    87     LOG_ENTERFN( "CWsfActiveWaiter::RunL" );
       
    88     if ( iWait.IsStarted() )
       
    89         {
       
    90         LOG_WRITE("async call completed, resuming.");
       
    91         iWait.AsyncStop();
       
    92         }
       
    93     }
       
    94 
       
    95 // ---------------------------------------------------------
       
    96 // CWsfActiveWaiter::WaitForRequest()
       
    97 // ---------------------------------------------------------
       
    98 // 
       
    99 TInt CWsfActiveWaiter::WaitForRequest()
       
   100     {
       
   101     LOG_ENTERFN("CWsfActiveWaiter::WaitForRequest");
       
   102     SetActive(); 
       
   103     iWait.Start();
       
   104 
       
   105     return iStatus.Int();
       
   106     }    
       
   107 // End of File
       
   108