Utils/Src/SmokeTestActive.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // SmokeTestTestActive.h
       
    15 // This contains CTestActive
       
    16 // 
       
    17 //
       
    18 
       
    19 #include "SmokeTestActive.h"
       
    20 
       
    21 
       
    22 //////////////////////////////////////////////////////////////////////
       
    23 // Construction/Destruction
       
    24 //////////////////////////////////////////////////////////////////////
       
    25 
       
    26 EXPORT_C CTestActive::~CTestActive()
       
    27 	{
       
    28 	}
       
    29 
       
    30 EXPORT_C CTestActive* CTestActive::NewL(MTestActiveCallback& aTestActiveCallback, TInt aPriority)
       
    31 	{
       
    32 	CTestActive*	self=NewLC(aTestActiveCallback, aPriority);
       
    33 	CleanupStack::Pop();
       
    34 	return self;
       
    35 	}
       
    36 
       
    37 EXPORT_C CTestActive* CTestActive::NewLC(MTestActiveCallback& aTestActiveCallback, TInt aPriority)
       
    38 	{
       
    39 	CTestActive*	self=new(ELeave) CTestActive(aTestActiveCallback, aPriority);
       
    40 	CleanupStack::PushL(self);
       
    41 	self->ConstructL();
       
    42 	return self;
       
    43 	}
       
    44 
       
    45 EXPORT_C void CTestActive::Activate()
       
    46 	{
       
    47 	SetActive();
       
    48 	}
       
    49 
       
    50 CTestActive::CTestActive(MTestActiveCallback& aTestActiveCallback, TInt aPriority)
       
    51 :	CActive(aPriority)
       
    52 ,	iTestActiveCallback(aTestActiveCallback)
       
    53 	{
       
    54 	}
       
    55 
       
    56 void CTestActive::ConstructL()
       
    57 	{
       
    58 	CActiveScheduler::Add(this);
       
    59 	}
       
    60 
       
    61 void CTestActive::RunL()
       
    62 	{
       
    63 	iTestActiveCallback.RunL();
       
    64 	}
       
    65 
       
    66 void CTestActive::DoCancel()
       
    67 	{
       
    68 	iTestActiveCallback.DoCancel();
       
    69 	}