kerneltest/e32test/property/t_property.h
author Tom Cosgrove <tom.cosgrove@nokia.com>
Fri, 28 May 2010 16:29:07 +0100
changeset 30 8aab599e3476
parent 0 a41df078684a
permissions -rw-r--r--
Fix for bug 2283 (RVCT 4.0 support is missing from PDK 3.0.h) Have multiple extension sections in the bld.inf, one for each version of the compiler. The RVCT version building the tools will build the runtime libraries for its version, but make sure we extract all the other versions from zip archives. Also add the archive for RVCT4.

// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __T_PROPERTY_H__
#define __T_PROPERTY_H__

#include "t_framework.h"

class CPropDefine : public CTestProgram
	{
public:
	CPropDefine(TUid aCategory, TUint aKey, RProperty::TType aType);
	void Run(TUint aCount);
private:

	TUid				iCategory;
	TUint				iKey;
	RProperty::TType	iType;
	};

class CPropDelete : public CTestProgram
	{
public:
	CPropDelete(TUid aCategory, TUint aKey, RProperty::TType aType);
	void Run(TUint aCount);
private:

	TUid				iCategory;
	TUint				iKey;
	RProperty::TType	iType;
	};

class CPropPanic : public CTestProgram
	{
public:
	CPropPanic(TUid aCategory, TUint aKey);
	void Run(TUint aCount);
private:
	static TInt DoubleSubscribeThreadEntry(TAny* ptr);
	static TInt BadHandleSubscribeThreadEntry(TAny* ptr);
	static TInt BadHandleCancelThreadEntry(TAny* ptr);
	static TInt BadHandleGetIThreadEntry(TAny* ptr);
	static TInt BadHandleGetBThreadEntry(TAny* ptr);
	static TInt BadHandleSetIThreadEntry(TAny* ptr);
	static TInt BadHandleSetBThreadEntry(TAny* ptr);

	static TThreadFunction BadHandles[];


	TUid				iCategory;
	TUint				iKey;
	};

class CPropSetGet : public CTestProgram
	{
public:
	CPropSetGet(TUid aCategory, TUint aKey, RProperty::TType aType); 
	void Run(TUint aCount);
private:

	TUid				iCategory;
	TUint				iKey;
	RProperty::TType	iType;
	};
		
class CPropSubsCancel : public CTestProgram
	{
public:
	CPropSubsCancel(TUid aCategory, TUint aKey, RProperty::TType aType);
	void Run(TUint aCount);
private:

	TUid				iCategory;
	TUint				iKey;
	RProperty::TType	iType;
	};

class CPropSecurity : public CTestProgram
	{
public:
	CPropSecurity(TUid aCategory, TUint aMasterKey, RProperty::TType aType, TUint aSlaveKeySlot);
	void Run(TUint aCount);

	struct TArgs
		{
		TUint				iCount;
		TUid				iCategory;
		TUint				iMasterKey;
		TUint				iSlaveKeySlot;
		};

private:
	TUid				iCategory;
	TUint				iMasterKey;
	TUint				iSlaveKeySlot;
	RProperty::TType	iType;
	};

class CPropSetGetRace : public CTestProgram
	{
public:
	CPropSetGetRace(TUid aCategory, TUint aKey);
	void Run(TUint aCount);
private:
	static TInt TrublemakerThreadEntry(TAny* ptr);
	void Trublemaker(TDes8& aBuf);

	TUid	iCategory;
	TUint	iKey;

	TBuf8<RProperty::KMaxPropertySize> iBuf1;
	TBuf8<RProperty::KMaxPropertySize> iBuf2;
	};

class CPropCancelRace : public CTestProgram
	{
public:
	CPropCancelRace(TUid aCategory, TUint aKey);
	void Run(TUint aCount);
private:
	static TInt TrublemakerThreadEntry(TAny* ptr);
	void Trublemaker();

	TUid	iCategory;
	TUint	iKey;

	RProperty	iProp;
	};

class CPropBroadcast : public CTestProgram
	{
public:
	CPropBroadcast(TUid aCategory, TUint aMasterKey, TUint aSlaveKeySlot, TUint aSlaveCount, TUint aFirstHighPriority);
	void Run(TUint aCount);

private:
	class CPropBroadcastSlave*	iSlaveList;

	TUid	iCategory;
	TUint	iMasterKey;
	TUint	iSlaveKeySlot;
	TUint	iSlaveCount;
	TUint	iFirstHighPriority;
	};

class CPropLddClient : public CTestProgram
	{
public:
	CPropLddClient(TUid aCategory, TUint aKey, RProperty::TType iType);
	void Run(TUint aCount);

private:

	TUid				iCategory;
	TUint				iKey;
	RProperty::TType	iType;

	};

static _LIT_SECURITY_POLICY_PASS(KPassPolicy);
static _LIT_SECURITY_POLICY_FAIL(KFailPolicy);

#endif