First public contribution.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\system\d_dobject.h
18 #ifndef __D_DOBJECT_H__
19 #define __D_DOBJECT_H__
21 #ifndef __KERNEL_MODE__
30 TBool iPerformanceTest;
33 class RTestDObject : public RBusLogicalChannel
42 ERObjectIxThreadTestCreateIx,
43 ERObjectIxThreadTestExerciseIx,
44 ERObjectIxThreadTestFreeIx,
45 ERObjectIxInvalidHandleLookupTest,
52 inline TInt RObjectIxTest1(TInt& aTime);
53 inline TInt RObjectIxTest2(TInt& aTime);
54 inline TInt RObjectIxTest3(SParam& aParam);
55 inline TInt RObjectIxTest4(TInt& aTime);
56 inline TInt RObjectIxThreadTestCreateIx(void*& aRObjectIxPtr);
57 inline TInt RObjectIxThreadTestExerciseIx(void* aRObjectIxPtr);
58 inline TInt RObjectIxThreadTestFreeIx(void* aRObjectIxPtr);
59 inline TInt InvalidHandleLookupTest();
60 inline TInt DObjectNameTest();
63 _LIT(KDObjectTestLddName,"D_DOBJECT");
66 #ifndef __KERNEL_MODE__
67 inline TInt RTestDObject::Open()
68 { return DoCreate(KDObjectTestLddName,TVersion(),KNullUnit,NULL,NULL); }
70 inline TInt RTestDObject::RObjectIxTest1(TInt& aTime)
72 TRequestStatus aStatus;
73 DoRequest(ERObjectIxTest1,aStatus, &aTime);
74 User::WaitForRequest(aStatus);
78 inline TInt RTestDObject::RObjectIxTest2(TInt& aTime)
80 TRequestStatus aStatus;
81 DoRequest(ERObjectIxTest2,aStatus, &aTime);
82 User::WaitForRequest(aStatus);
86 inline TInt RTestDObject::RObjectIxTest3(SParam& aParam)
88 TRequestStatus aStatus;
89 DoRequest(ERObjectIxTest3,aStatus, &aParam);
90 User::WaitForRequest(aStatus);
94 inline TInt RTestDObject::RObjectIxTest4(TInt& aTime)
96 TRequestStatus aStatus;
97 DoRequest(ERObjectIxTest4,aStatus, &aTime);
98 User::WaitForRequest(aStatus);
100 } // RTestDObject::RObjectIxTest4
102 inline TInt RTestDObject::RObjectIxThreadTestCreateIx(void*& aRObjectIxPtr)
104 TRequestStatus aStatus;
105 DoRequest(ERObjectIxThreadTestCreateIx,aStatus, &aRObjectIxPtr);
106 User::WaitForRequest(aStatus);
107 return aStatus.Int();
108 } // RTestDObject::RObjectIxThreadTestCreateIx
110 inline TInt RTestDObject::RObjectIxThreadTestExerciseIx(void* aRObjectIxPtr)
112 TRequestStatus aStatus;
113 DoRequest(ERObjectIxThreadTestExerciseIx, aStatus, aRObjectIxPtr);
114 User::WaitForRequest(aStatus);
115 return aStatus.Int();
116 } // RTestDObject::RObjectIxThreadTestExerciseIx
118 inline TInt RTestDObject::RObjectIxThreadTestFreeIx(void* aRObjectIxPtr)
120 TRequestStatus aStatus;
121 DoRequest(ERObjectIxThreadTestFreeIx,aStatus, aRObjectIxPtr);
122 User::WaitForRequest(aStatus);
123 return aStatus.Int();
124 } // RTestDObject::RObjectIxThreadTestFreeIx
126 inline TInt RTestDObject::InvalidHandleLookupTest()
128 TRequestStatus aStatus;
129 DoRequest(ERObjectIxInvalidHandleLookupTest, aStatus);
130 User::WaitForRequest(aStatus);
131 return aStatus.Int();
132 } // RTestDObject::InvalidHandleLookupTest
134 inline TInt RTestDObject::DObjectNameTest(void)
136 TRequestStatus aStatus;
137 DoRequest(EDObjectNameTest, aStatus);
138 User::WaitForRequest(aStatus);
139 return aStatus.Int();