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