cryptomgmtlibs/securitytestfw/inc/captestframework.h
changeset 15 da2ae96f639b
parent 10 afc583cfa176
child 16 5ed53bb58874
child 19 cd501b96611d
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
     1 /*
       
     2 * Copyright (c) 2005-2009 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 the License "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 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23 */
       
    24 
       
    25 #ifndef CAPTESTFRAMEWORK_H__
       
    26 #define CAPTESTFRAMEWORK_H__
       
    27 
       
    28 // Used to transfer data to the helper
       
    29 const TInt KDllNameTransferSlot=5;
       
    30 const TInt KShouldPassTransferSlot=6;
       
    31 const TInt KTestNumberTransferSlot=7;
       
    32 const TInt KLogFileTransferSlot=8;
       
    33 const TInt KFileSessionTransferSlot=9;
       
    34 const TInt KLogFileNameTransferSlot=10;
       
    35 
       
    36 
       
    37 // markers for the file used to transfer the results
       
    38 
       
    39 enum TFileMarker
       
    40 	{
       
    41 	ETestPassed,
       
    42 	ETestFailed,
       
    43 	ETestsEnded,
       
    44 	EFileEnd,
       
    45 	};
       
    46 
       
    47 
       
    48 class RFile;
       
    49 
       
    50 // classes to be implemented by the actaul test dll.
       
    51 class MCapabilityTest
       
    52 	{
       
    53 public:
       
    54 	virtual const TDesC& Name() const=0;
       
    55 	virtual const TDesC& SubName() const=0;
       
    56 	
       
    57 	virtual TCapabilitySet CapabilitiesRequired() const=0;
       
    58 	virtual TUid VidRequired() const=0;
       
    59 	virtual TUid SidRequired() const=0;
       
    60 
       
    61 	virtual void RunTestL(RFile& aLogFile)=0;
       
    62 	virtual void SetExpectPermissionDenied(TBool aExpectPermissionDenied)=0;
       
    63 	virtual ~MCapabilityTest() {};
       
    64 	};
       
    65 
       
    66 class MCapabilityTestFactory
       
    67 	{
       
    68 public:
       
    69 	virtual TInt NumberOfTests()=0;
       
    70 	virtual MCapabilityTest* Test(TInt aTestNumber)=0;
       
    71 	virtual ~MCapabilityTestFactory() {};
       
    72 	};
       
    73 
       
    74 
       
    75 
       
    76 
       
    77 #endif // #ifndef CAPTESTFRAMEWORK_H__