sysstatemgmt/systemstatemgr/test/tsus/src/tsus_badsup.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 
       
    24 #include "tsus_badsup.h"
       
    25 
       
    26 EXPORT_C MSsmUtility* CBadSup::NewL()
       
    27 	{
       
    28 	return NULL; //bad behaviour used in CSsmSupLoaderTest::doTestCreatePluginLCL()
       
    29 	}
       
    30 
       
    31 CBadSup::CBadSup() : CActive(CActive::EPriorityStandard)
       
    32 	{
       
    33 	}
       
    34 
       
    35 CBadSup::~CBadSup()
       
    36 	{
       
    37 	}
       
    38 
       
    39 void CBadSup::InitializeL()
       
    40 	{
       
    41 	CActiveScheduler::Add(this);
       
    42 	}
       
    43 
       
    44 void CBadSup::StartL()
       
    45 	{
       
    46 	if(IsAdded())
       
    47 		{
       
    48 		if(!IsActive())
       
    49 			{
       
    50 			SetActive();
       
    51 			TRequestStatus* status = &iStatus;
       
    52 			User::RequestComplete(status, KErrNone);
       
    53 			}
       
    54 		}
       
    55 	else
       
    56 		{
       
    57 		User::Leave(KErrNotReady);
       
    58 		}
       
    59 	}
       
    60 
       
    61 void CBadSup::Release()
       
    62 	{
       
    63 	Deque();
       
    64 	}
       
    65 
       
    66 void CBadSup::DoCancel()
       
    67 	{
       
    68 	}
       
    69 
       
    70 void CBadSup::RunL()
       
    71 	{
       
    72 	}
       
    73 
       
    74 TInt CBadSup::RunError(TInt aError)
       
    75 	{
       
    76 	return aError;
       
    77 	}