sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Bootstrap Shadow Memory Region Test Driver User I/F sl@0: // sl@0: sl@0: #ifndef D_SMR_H sl@0: #define D_SMR_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #ifndef __KERNEL_MODE__ sl@0: #include sl@0: #endif sl@0: sl@0: sl@0: /** sl@0: Interface to the fast-trace memory buffer. sl@0: */ sl@0: class RSMRTest : public RBusLogicalChannel sl@0: { sl@0: public: sl@0: sl@0: #ifndef __KERNEL_MODE__ sl@0: inline TInt Open() sl@0: { sl@0: return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread); sl@0: } sl@0: sl@0: /* SMR Feature Testing sl@0: */ sl@0: sl@0: inline TUint Test_CheckSMRIBPtr(TBool aEnforce) sl@0: { sl@0: return DoControl(ECtrlCheckSMRIBPtr, (TAny*)aEnforce); sl@0: } sl@0: inline TUint Test_PrintSMRIB(TBool aEnforce) sl@0: { sl@0: return DoControl(ECtrlPrintSMRIB, (TAny*)aEnforce); sl@0: } sl@0: inline TUint Test_AccessAllSMRs(TBool aEnforce) sl@0: { sl@0: return DoControl(ECtrlAccessAllSMRs, (TAny*)aEnforce); sl@0: } sl@0: inline TUint Test_FreeHalfSMR1PhysicalRam(TBool aEnforce) sl@0: { sl@0: return DoControl(ECtrlFreeHalfSMR1PhysicalRam, (TAny*)aEnforce); sl@0: } sl@0: inline TUint Test_FreeAllSMR2PhysicalRam(TBool aEnforce) sl@0: { sl@0: return DoControl(ECtrlFreeAllSMR2PhysicalRam, (TAny*)aEnforce); sl@0: } sl@0: sl@0: #endif sl@0: sl@0: inline static const TDesC& Name(); sl@0: sl@0: private: sl@0: enum TControl sl@0: { sl@0: ECtrlUndefined = 0, sl@0: sl@0: ECtrlCheckSMRIBPtr, sl@0: ECtrlPrintSMRIB, sl@0: ECtrlAccessAllSMRs, sl@0: ECtrlFreeHalfSMR1PhysicalRam, sl@0: ECtrlFreeAllSMR2PhysicalRam sl@0: sl@0: }; sl@0: sl@0: friend class DSMRTestChannel; sl@0: friend class DSMRTestFactory; sl@0: }; sl@0: sl@0: inline const TDesC& RSMRTest::Name() sl@0: { sl@0: _LIT(KTestDriver,"d_smr"); sl@0: return KTestDriver; sl@0: } sl@0: sl@0: sl@0: sl@0: #endif // D_SMR_H