natplugins/natpnatfwsdpprovider/tsrc/testconsole/inc/nsptestasyncservice.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NSPTESTASYNCSERVICE_H
       
    19 #define NSPTESTASYNCSERVICE_H
       
    20 
       
    21 class MAsyncService
       
    22 	{
       
    23 public: // Methods
       
    24 
       
    25 	virtual void StartScheduler() = 0;
       
    26 	
       
    27 	virtual void Stop() = 0;
       
    28 	
       
    29 	};
       
    30 
       
    31 
       
    32 class CNSPTestAsyncService : public CActive, public MAsyncService
       
    33 	{
       
    34 public: // Methods
       
    35 	static CNSPTestAsyncService* NewL( TInt& aTimerStatus );
       
    36 	static CNSPTestAsyncService* NewLC( TInt& aTimerStatus );
       
    37 	virtual ~CNSPTestAsyncService();
       
    38 	
       
    39 	// From CActive
       
    40 	void RunL();
       
    41 	void DoCancel();
       
    42 	
       
    43     // From MAsyncService
       
    44     void StartScheduler();
       
    45     void Stop();
       
    46 
       
    47 private: // Methods
       
    48 	CNSPTestAsyncService( TInt& aTimerStatus );
       
    49 	void ConstructL();
       
    50 
       
    51 private: // data
       
    52 
       
    53 	TInt& iTimerStatus;
       
    54 	RTimer iTimer;
       
    55 	CActiveSchedulerWait* iWait; // own
       
    56 
       
    57 	};
       
    58 
       
    59 #endif // NSPTESTASYNCSERVICE_H