os/kernelhwsrv/kerneltest/e32test/property/t_property.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __T_PROPERTY_H__
sl@0
    17
#define __T_PROPERTY_H__
sl@0
    18
sl@0
    19
#include "t_framework.h"
sl@0
    20
sl@0
    21
class CPropDefine : public CTestProgram
sl@0
    22
	{
sl@0
    23
public:
sl@0
    24
	CPropDefine(TUid aCategory, TUint aKey, RProperty::TType aType);
sl@0
    25
	void Run(TUint aCount);
sl@0
    26
private:
sl@0
    27
sl@0
    28
	TUid				iCategory;
sl@0
    29
	TUint				iKey;
sl@0
    30
	RProperty::TType	iType;
sl@0
    31
	};
sl@0
    32
sl@0
    33
class CPropDelete : public CTestProgram
sl@0
    34
	{
sl@0
    35
public:
sl@0
    36
	CPropDelete(TUid aCategory, TUint aKey, RProperty::TType aType);
sl@0
    37
	void Run(TUint aCount);
sl@0
    38
private:
sl@0
    39
sl@0
    40
	TUid				iCategory;
sl@0
    41
	TUint				iKey;
sl@0
    42
	RProperty::TType	iType;
sl@0
    43
	};
sl@0
    44
sl@0
    45
class CPropPanic : public CTestProgram
sl@0
    46
	{
sl@0
    47
public:
sl@0
    48
	CPropPanic(TUid aCategory, TUint aKey);
sl@0
    49
	void Run(TUint aCount);
sl@0
    50
private:
sl@0
    51
	static TInt DoubleSubscribeThreadEntry(TAny* ptr);
sl@0
    52
	static TInt BadHandleSubscribeThreadEntry(TAny* ptr);
sl@0
    53
	static TInt BadHandleCancelThreadEntry(TAny* ptr);
sl@0
    54
	static TInt BadHandleGetIThreadEntry(TAny* ptr);
sl@0
    55
	static TInt BadHandleGetBThreadEntry(TAny* ptr);
sl@0
    56
	static TInt BadHandleSetIThreadEntry(TAny* ptr);
sl@0
    57
	static TInt BadHandleSetBThreadEntry(TAny* ptr);
sl@0
    58
sl@0
    59
	static TThreadFunction BadHandles[];
sl@0
    60
sl@0
    61
sl@0
    62
	TUid				iCategory;
sl@0
    63
	TUint				iKey;
sl@0
    64
	};
sl@0
    65
sl@0
    66
class CPropSetGet : public CTestProgram
sl@0
    67
	{
sl@0
    68
public:
sl@0
    69
	CPropSetGet(TUid aCategory, TUint aKey, RProperty::TType aType); 
sl@0
    70
	void Run(TUint aCount);
sl@0
    71
private:
sl@0
    72
sl@0
    73
	TUid				iCategory;
sl@0
    74
	TUint				iKey;
sl@0
    75
	RProperty::TType	iType;
sl@0
    76
	};
sl@0
    77
		
sl@0
    78
class CPropSubsCancel : public CTestProgram
sl@0
    79
	{
sl@0
    80
public:
sl@0
    81
	CPropSubsCancel(TUid aCategory, TUint aKey, RProperty::TType aType);
sl@0
    82
	void Run(TUint aCount);
sl@0
    83
private:
sl@0
    84
sl@0
    85
	TUid				iCategory;
sl@0
    86
	TUint				iKey;
sl@0
    87
	RProperty::TType	iType;
sl@0
    88
	};
sl@0
    89
sl@0
    90
class CPropSecurity : public CTestProgram
sl@0
    91
	{
sl@0
    92
public:
sl@0
    93
	CPropSecurity(TUid aCategory, TUint aMasterKey, RProperty::TType aType, TUint aSlaveKeySlot);
sl@0
    94
	void Run(TUint aCount);
sl@0
    95
sl@0
    96
	struct TArgs
sl@0
    97
		{
sl@0
    98
		TUint				iCount;
sl@0
    99
		TUid				iCategory;
sl@0
   100
		TUint				iMasterKey;
sl@0
   101
		TUint				iSlaveKeySlot;
sl@0
   102
		};
sl@0
   103
sl@0
   104
private:
sl@0
   105
	TUid				iCategory;
sl@0
   106
	TUint				iMasterKey;
sl@0
   107
	TUint				iSlaveKeySlot;
sl@0
   108
	RProperty::TType	iType;
sl@0
   109
	};
sl@0
   110
sl@0
   111
class CPropSetGetRace : public CTestProgram
sl@0
   112
	{
sl@0
   113
public:
sl@0
   114
	CPropSetGetRace(TUid aCategory, TUint aKey);
sl@0
   115
	void Run(TUint aCount);
sl@0
   116
private:
sl@0
   117
	static TInt TrublemakerThreadEntry(TAny* ptr);
sl@0
   118
	void Trublemaker(TDes8& aBuf);
sl@0
   119
sl@0
   120
	TUid	iCategory;
sl@0
   121
	TUint	iKey;
sl@0
   122
sl@0
   123
	TBuf8<RProperty::KMaxPropertySize> iBuf1;
sl@0
   124
	TBuf8<RProperty::KMaxPropertySize> iBuf2;
sl@0
   125
	};
sl@0
   126
sl@0
   127
class CPropCancelRace : public CTestProgram
sl@0
   128
	{
sl@0
   129
public:
sl@0
   130
	CPropCancelRace(TUid aCategory, TUint aKey);
sl@0
   131
	void Run(TUint aCount);
sl@0
   132
private:
sl@0
   133
	static TInt TrublemakerThreadEntry(TAny* ptr);
sl@0
   134
	void Trublemaker();
sl@0
   135
sl@0
   136
	TUid	iCategory;
sl@0
   137
	TUint	iKey;
sl@0
   138
sl@0
   139
	RProperty	iProp;
sl@0
   140
	};
sl@0
   141
sl@0
   142
class CPropBroadcast : public CTestProgram
sl@0
   143
	{
sl@0
   144
public:
sl@0
   145
	CPropBroadcast(TUid aCategory, TUint aMasterKey, TUint aSlaveKeySlot, TUint aSlaveCount, TUint aFirstHighPriority);
sl@0
   146
	void Run(TUint aCount);
sl@0
   147
sl@0
   148
private:
sl@0
   149
	class CPropBroadcastSlave*	iSlaveList;
sl@0
   150
sl@0
   151
	TUid	iCategory;
sl@0
   152
	TUint	iMasterKey;
sl@0
   153
	TUint	iSlaveKeySlot;
sl@0
   154
	TUint	iSlaveCount;
sl@0
   155
	TUint	iFirstHighPriority;
sl@0
   156
	};
sl@0
   157
sl@0
   158
class CPropLddClient : public CTestProgram
sl@0
   159
	{
sl@0
   160
public:
sl@0
   161
	CPropLddClient(TUid aCategory, TUint aKey, RProperty::TType iType);
sl@0
   162
	void Run(TUint aCount);
sl@0
   163
sl@0
   164
private:
sl@0
   165
sl@0
   166
	TUid				iCategory;
sl@0
   167
	TUint				iKey;
sl@0
   168
	RProperty::TType	iType;
sl@0
   169
sl@0
   170
	};
sl@0
   171
sl@0
   172
static _LIT_SECURITY_POLICY_PASS(KPassPolicy);
sl@0
   173
static _LIT_SECURITY_POLICY_FAIL(KFailPolicy);
sl@0
   174
sl@0
   175
#endif