os/security/cryptomgmtlibs/securitytestfw/test/captestframework/captestframework.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptomgmtlibs/securitytestfw/test/captestframework/captestframework.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,77 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 +*/
1.27 +
1.28 +#ifndef CAPTESTFRAMEWORK_H__
1.29 +#define CAPTESTFRAMEWORK_H__
1.30 +
1.31 +// Used to transfer data to the helper
1.32 +const TInt KDllNameTransferSlot=5;
1.33 +const TInt KShouldPassTransferSlot=6;
1.34 +const TInt KTestNumberTransferSlot=7;
1.35 +const TInt KLogFileTransferSlot=8;
1.36 +const TInt KFileSessionTransferSlot=9;
1.37 +const TInt KLogFileNameTransferSlot=10;
1.38 +
1.39 +
1.40 +// markers for the file used to transfer the results
1.41 +
1.42 +enum TFileMarker
1.43 + {
1.44 + ETestPassed,
1.45 + ETestFailed,
1.46 + ETestsEnded,
1.47 + EFileEnd,
1.48 + };
1.49 +
1.50 +
1.51 +class RFile;
1.52 +
1.53 +// classes to be implemented by the actaul test dll.
1.54 +class MCapabilityTest
1.55 + {
1.56 +public:
1.57 + virtual const TDesC& Name() const=0;
1.58 + virtual const TDesC& SubName() const=0;
1.59 +
1.60 + virtual TCapabilitySet CapabilitiesRequired() const=0;
1.61 + virtual TUid VidRequired() const=0;
1.62 + virtual TUid SidRequired() const=0;
1.63 +
1.64 + virtual void RunTestL(RFile& aLogFile)=0;
1.65 + virtual void SetExpectPermissionDenied(TBool aExpectPermissionDenied)=0;
1.66 + virtual ~MCapabilityTest() {};
1.67 + };
1.68 +
1.69 +class MCapabilityTestFactory
1.70 + {
1.71 +public:
1.72 + virtual TInt NumberOfTests()=0;
1.73 + virtual MCapabilityTest* Test(TInt aTestNumber)=0;
1.74 + virtual ~MCapabilityTestFactory() {};
1.75 + };
1.76 +
1.77 +
1.78 +
1.79 +
1.80 +#endif // #ifndef CAPTESTFRAMEWORK_H__