First public contribution.
1 // Copyright (c) 2008-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 // Hardware Configuration Respoitory Tests
22 #include <drivers/hcr.h>
24 #ifndef __KERNEL_MODE__
30 Interface to the fast-trace memory buffer.
32 class RHcrTest : public RBusLogicalChannel
37 #ifndef __KERNEL_MODE__
40 return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
43 inline TUint Test_SanityTestWordSettings()
45 return DoControl(ECtrlSanityTestWordSettings);
48 inline TUint Test_SanityTestLargeSettings()
50 return DoControl(ECtrlSanityTestLargeSettings);
53 inline TUint Test_SwitchRepository()
55 return DoControl(ECtrlSwitchRepository);
58 inline TUint Test_FindCompiledSettingsInCategory(HCR::TCategoryUid aCatUid,
59 TInt32* aFirst, TInt32* aLast)
62 args[0] = (TAny*) aCatUid;
63 args[1] = (TAny*) aFirst;
64 args[2] = (TAny*) aLast;
66 return DoControl(ECtrlCompiledFindSettingsInCategory, (TAny*)args);
69 inline TUint Test_FindFileSettingsInCategory(HCR::TCategoryUid aCatUid,
70 TInt32* aFirst, TInt32* aLast)
73 args[0] = (TAny*) aCatUid;
74 args[1] = (TAny*) aFirst;
75 args[2] = (TAny*) aLast;
77 return DoControl(ECtrlFileFindSettingsInCategory, (TAny*)args);
80 inline TUint Test_SwitchFileRepository(const TText* aRepName)
83 args[0] = (TAny*) aRepName;
84 return DoControl(ECtrlSwitchFileRepository, (TAny*)args);
88 inline TUint Test_CheckIntegrity()
90 return DoControl(ECtrlCheckOverrideReposIntegrity);
93 inline TUint Test_CheckContent()
95 return DoControl(ECtrlCheckOverrideRepos102400Content);
98 inline TUint Test_NegativeTestsLargeValues(TInt& aExpectedError)
101 args[0] = (TAny*) aExpectedError;
102 return DoControl(ECtrlNegativeTestsLargeValues, (TAny*) args);
104 inline TUint Test_TRepositoryGetWordValue(HCR::TCategoryUid& aCategory, HCR::TElementId& aKey,TInt& type)
107 args[0] = (TAny*) aCategory;
108 args[1] = (TAny*) aKey;
109 args[2] = (TAny*) type;
110 return DoControl(ECtrlGetWordSetting, (TAny*) args);
117 inline static const TDesC& Name();
124 ECtrlSanityTestWordSettings,
125 ECtrlSanityTestLargeSettings,
128 ECtrlGetLargeSetting,
129 ECtrlGetManyWordSettings,
130 ECtrlGetManyLargeSettings,
132 ECtrlSwitchRepository,
134 ECtrlNegativeTestsLargeValues,
136 ECtrlFreePhyscialRam,
137 ECtrlCheckOverrideReposIntegrity,
138 ECtrlCheckOverrideRepos102400Content,
140 ECtrlSwitchFileRepository,
141 ECtrlFileFindSettingsInCategory,
142 ECtrlCompiledFindSettingsInCategory
145 friend class DHcrTestChannel;
146 friend class DHcrTestFactory;
149 inline const TDesC& RHcrTest::Name()
151 _LIT(KTestDriver,"d_hcrut");