os/kernelhwsrv/kerneltest/e32test/property/t_property.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/property/t_property.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,175 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __T_PROPERTY_H__
    1.20 +#define __T_PROPERTY_H__
    1.21 +
    1.22 +#include "t_framework.h"
    1.23 +
    1.24 +class CPropDefine : public CTestProgram
    1.25 +	{
    1.26 +public:
    1.27 +	CPropDefine(TUid aCategory, TUint aKey, RProperty::TType aType);
    1.28 +	void Run(TUint aCount);
    1.29 +private:
    1.30 +
    1.31 +	TUid				iCategory;
    1.32 +	TUint				iKey;
    1.33 +	RProperty::TType	iType;
    1.34 +	};
    1.35 +
    1.36 +class CPropDelete : public CTestProgram
    1.37 +	{
    1.38 +public:
    1.39 +	CPropDelete(TUid aCategory, TUint aKey, RProperty::TType aType);
    1.40 +	void Run(TUint aCount);
    1.41 +private:
    1.42 +
    1.43 +	TUid				iCategory;
    1.44 +	TUint				iKey;
    1.45 +	RProperty::TType	iType;
    1.46 +	};
    1.47 +
    1.48 +class CPropPanic : public CTestProgram
    1.49 +	{
    1.50 +public:
    1.51 +	CPropPanic(TUid aCategory, TUint aKey);
    1.52 +	void Run(TUint aCount);
    1.53 +private:
    1.54 +	static TInt DoubleSubscribeThreadEntry(TAny* ptr);
    1.55 +	static TInt BadHandleSubscribeThreadEntry(TAny* ptr);
    1.56 +	static TInt BadHandleCancelThreadEntry(TAny* ptr);
    1.57 +	static TInt BadHandleGetIThreadEntry(TAny* ptr);
    1.58 +	static TInt BadHandleGetBThreadEntry(TAny* ptr);
    1.59 +	static TInt BadHandleSetIThreadEntry(TAny* ptr);
    1.60 +	static TInt BadHandleSetBThreadEntry(TAny* ptr);
    1.61 +
    1.62 +	static TThreadFunction BadHandles[];
    1.63 +
    1.64 +
    1.65 +	TUid				iCategory;
    1.66 +	TUint				iKey;
    1.67 +	};
    1.68 +
    1.69 +class CPropSetGet : public CTestProgram
    1.70 +	{
    1.71 +public:
    1.72 +	CPropSetGet(TUid aCategory, TUint aKey, RProperty::TType aType); 
    1.73 +	void Run(TUint aCount);
    1.74 +private:
    1.75 +
    1.76 +	TUid				iCategory;
    1.77 +	TUint				iKey;
    1.78 +	RProperty::TType	iType;
    1.79 +	};
    1.80 +		
    1.81 +class CPropSubsCancel : public CTestProgram
    1.82 +	{
    1.83 +public:
    1.84 +	CPropSubsCancel(TUid aCategory, TUint aKey, RProperty::TType aType);
    1.85 +	void Run(TUint aCount);
    1.86 +private:
    1.87 +
    1.88 +	TUid				iCategory;
    1.89 +	TUint				iKey;
    1.90 +	RProperty::TType	iType;
    1.91 +	};
    1.92 +
    1.93 +class CPropSecurity : public CTestProgram
    1.94 +	{
    1.95 +public:
    1.96 +	CPropSecurity(TUid aCategory, TUint aMasterKey, RProperty::TType aType, TUint aSlaveKeySlot);
    1.97 +	void Run(TUint aCount);
    1.98 +
    1.99 +	struct TArgs
   1.100 +		{
   1.101 +		TUint				iCount;
   1.102 +		TUid				iCategory;
   1.103 +		TUint				iMasterKey;
   1.104 +		TUint				iSlaveKeySlot;
   1.105 +		};
   1.106 +
   1.107 +private:
   1.108 +	TUid				iCategory;
   1.109 +	TUint				iMasterKey;
   1.110 +	TUint				iSlaveKeySlot;
   1.111 +	RProperty::TType	iType;
   1.112 +	};
   1.113 +
   1.114 +class CPropSetGetRace : public CTestProgram
   1.115 +	{
   1.116 +public:
   1.117 +	CPropSetGetRace(TUid aCategory, TUint aKey);
   1.118 +	void Run(TUint aCount);
   1.119 +private:
   1.120 +	static TInt TrublemakerThreadEntry(TAny* ptr);
   1.121 +	void Trublemaker(TDes8& aBuf);
   1.122 +
   1.123 +	TUid	iCategory;
   1.124 +	TUint	iKey;
   1.125 +
   1.126 +	TBuf8<RProperty::KMaxPropertySize> iBuf1;
   1.127 +	TBuf8<RProperty::KMaxPropertySize> iBuf2;
   1.128 +	};
   1.129 +
   1.130 +class CPropCancelRace : public CTestProgram
   1.131 +	{
   1.132 +public:
   1.133 +	CPropCancelRace(TUid aCategory, TUint aKey);
   1.134 +	void Run(TUint aCount);
   1.135 +private:
   1.136 +	static TInt TrublemakerThreadEntry(TAny* ptr);
   1.137 +	void Trublemaker();
   1.138 +
   1.139 +	TUid	iCategory;
   1.140 +	TUint	iKey;
   1.141 +
   1.142 +	RProperty	iProp;
   1.143 +	};
   1.144 +
   1.145 +class CPropBroadcast : public CTestProgram
   1.146 +	{
   1.147 +public:
   1.148 +	CPropBroadcast(TUid aCategory, TUint aMasterKey, TUint aSlaveKeySlot, TUint aSlaveCount, TUint aFirstHighPriority);
   1.149 +	void Run(TUint aCount);
   1.150 +
   1.151 +private:
   1.152 +	class CPropBroadcastSlave*	iSlaveList;
   1.153 +
   1.154 +	TUid	iCategory;
   1.155 +	TUint	iMasterKey;
   1.156 +	TUint	iSlaveKeySlot;
   1.157 +	TUint	iSlaveCount;
   1.158 +	TUint	iFirstHighPriority;
   1.159 +	};
   1.160 +
   1.161 +class CPropLddClient : public CTestProgram
   1.162 +	{
   1.163 +public:
   1.164 +	CPropLddClient(TUid aCategory, TUint aKey, RProperty::TType iType);
   1.165 +	void Run(TUint aCount);
   1.166 +
   1.167 +private:
   1.168 +
   1.169 +	TUid				iCategory;
   1.170 +	TUint				iKey;
   1.171 +	RProperty::TType	iType;
   1.172 +
   1.173 +	};
   1.174 +
   1.175 +static _LIT_SECURITY_POLICY_PASS(KPassPolicy);
   1.176 +static _LIT_SECURITY_POLICY_FAIL(KFailPolicy);
   1.177 +
   1.178 +#endif