sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_goodsup.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21 
       
    22 
       
    23 #include "tcmd_goodsup.h"
       
    24 
       
    25 
       
    26 EXPORT_C MSsmUtility* CCmdGoodSup::NewL()
       
    27 	{
       
    28 	return new (ELeave) CCmdGoodSup;
       
    29 	}
       
    30 
       
    31 CCmdGoodSup::CCmdGoodSup() : CActive(CActive::EPriorityStandard)
       
    32 	{
       
    33 	}
       
    34 
       
    35 CCmdGoodSup::~CCmdGoodSup()
       
    36 	{
       
    37 	if(IsAdded())
       
    38 		{
       
    39 		Deque();
       
    40 		}
       
    41 	}
       
    42 
       
    43 void CCmdGoodSup::InitializeL()
       
    44 	{
       
    45 	CActiveScheduler::Add(this);
       
    46 	}
       
    47 
       
    48 void CCmdGoodSup::StartL()
       
    49 	{
       
    50 	if(IsAdded())
       
    51 		{
       
    52 		if(!IsActive())
       
    53 			{
       
    54 			SetActive();
       
    55 			TRequestStatus* status = &iStatus;
       
    56 			User::RequestComplete(status, KErrNone);
       
    57 			}
       
    58 		}
       
    59 	else
       
    60 		{
       
    61 		User::Leave(KErrNotReady);
       
    62 		}
       
    63 	}
       
    64 
       
    65 void CCmdGoodSup::Release()
       
    66 	{
       
    67 	delete this;
       
    68 	}
       
    69 
       
    70 void CCmdGoodSup::DoCancel()
       
    71 	{
       
    72 	}
       
    73 
       
    74 void CCmdGoodSup::RunL()
       
    75 	{
       
    76 	}
       
    77 
       
    78 TInt CCmdGoodSup::RunError(TInt aError)
       
    79 	{
       
    80 	return aError;
       
    81 	}