wlanutilities/wlansniffer/mainapplication/src/wsfactivewaiter.cpp
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     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     LOG_ENTERFN("CWsfActiveWaiter::NewL");
       
    34     CWsfActiveWaiter* self = 
       
    35                          new ( ELeave ) CWsfActiveWaiter( );
       
    36     CleanupStack::PushL( self );
       
    37     self->ConstructL();
       
    38     CleanupStack::Pop( self );
       
    39     
       
    40     return self;        
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------
       
    44 // CWsfActiveWaiter::ConstructL()
       
    45 // ---------------------------------------------------------
       
    46 //
       
    47 void CWsfActiveWaiter::ConstructL()
       
    48     {
       
    49     LOG_ENTERFN("CWsfActiveWaiter::ConstructL");     
       
    50     CActiveScheduler::Add( this );            
       
    51     }
       
    52 
       
    53 
       
    54 // ---------------------------------------------------------
       
    55 // CWsfActiveWaiter::CWsfActiveWaiter()
       
    56 // ---------------------------------------------------------
       
    57 //
       
    58 CWsfActiveWaiter::CWsfActiveWaiter()
       
    59 : CActive( EPriorityNormal )
       
    60     {
       
    61     }
       
    62     
       
    63 
       
    64 // ---------------------------------------------------------
       
    65 // CWsfActiveWaiter::~CWsfActiveWaiter()
       
    66 // ---------------------------------------------------------
       
    67 //    
       
    68 CWsfActiveWaiter::~CWsfActiveWaiter()
       
    69     {
       
    70     Cancel();
       
    71     }
       
    72 
       
    73 
       
    74 // ---------------------------------------------------------
       
    75 // CWsfActiveWaiter::DoCancel()
       
    76 // ---------------------------------------------------------
       
    77 // 
       
    78 void CWsfActiveWaiter::DoCancel()
       
    79     {
       
    80     }
       
    81      
       
    82  
       
    83 // ---------------------------------------------------------
       
    84 // CWsfActiveWaiter::RunL()
       
    85 // ---------------------------------------------------------
       
    86 //     
       
    87 void CWsfActiveWaiter::RunL()
       
    88     {
       
    89     LOG_ENTERFN( "CWsfActiveWaiter::RunL" );
       
    90     if ( iWait.IsStarted() )
       
    91         {
       
    92         LOG_WRITE("async call completed, resuming.");
       
    93         iWait.AsyncStop();
       
    94         }
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------
       
    98 // CWsfActiveWaiter::WaitForRequest()
       
    99 // ---------------------------------------------------------
       
   100 // 
       
   101 TInt CWsfActiveWaiter::WaitForRequest()
       
   102     {
       
   103     LOG_ENTERFN("CWsfActiveWaiter::WaitForRequest");
       
   104     SetActive(); 
       
   105     iWait.Start();
       
   106 
       
   107     return iStatus.Int();
       
   108     }    
       
   109 // End of File
       
   110