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