sl@0: // Copyright (c) 1998-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: // f32test\loader\d_ldrtst.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __D_LDRTST_H__ sl@0: #define __D_LDRTST_H__ sl@0: #include sl@0: #include sl@0: sl@0: _LIT(KLdrTestLddName, "LdrTest"); sl@0: sl@0: sl@0: #ifndef TMODULEHANDLE_DEFINED sl@0: #define TMODULEHANDLE_DEFINED sl@0: class TModuleHandle_dummy_class; sl@0: typedef TModuleHandle_dummy_class* TModuleHandle; sl@0: #endif sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: class TCapsTestV01 sl@0: { sl@0: public: sl@0: TVersion iVersion; sl@0: }; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: class RLdrTest : public RBusLogicalChannel sl@0: { sl@0: public: sl@0: enum TControl sl@0: { sl@0: EControlGetCodeSegInfo, sl@0: EControlProcessCodeSeg, sl@0: EControlLibraryCodeSeg, sl@0: EControlModuleCodeSeg, sl@0: EControlGetCodeSegList, sl@0: EControlCodeSegFromAddr, sl@0: EControlModuleHandleFromAddr, sl@0: EControlProcessSMPUnsafeCount, sl@0: }; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: struct SEntry sl@0: { sl@0: TAny* iHandle; sl@0: TUint32 iUid3; sl@0: }; sl@0: public: sl@0: inline TInt Open(); sl@0: inline TInt GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo); sl@0: inline TAny* ProcessCodeSeg(TInt aProcessHandle); sl@0: inline TAny* LibraryCodeSeg(TInt aLibraryHandle); sl@0: inline TAny* ModuleCodeSeg(TModuleHandle aModuleHandle); sl@0: inline TInt GetCodeSegList(SEntry* aList, TInt aMax); sl@0: inline TAny* CodeSegFromAddr(TLinAddr aAddr); sl@0: inline TModuleHandle ModuleHandleFromAddr(TLinAddr aAddr); sl@0: inline TInt ProcessSMPUnsafeCount(TInt aProcessHandle); sl@0: }; sl@0: sl@0: #ifndef __KERNEL_MODE__ sl@0: inline TInt RLdrTest::Open() sl@0: { return DoCreate(KLdrTestLddName, TVersion(0,1,1), KNullUnit, NULL, NULL); } sl@0: inline TInt RLdrTest::GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo) sl@0: { return DoControl(EControlGetCodeSegInfo, aHandle, &aInfo); } sl@0: inline TAny* RLdrTest::ProcessCodeSeg(TInt aProcessHandle) sl@0: { return (TAny*)DoControl(EControlProcessCodeSeg, (TAny*)aProcessHandle); } sl@0: inline TAny* RLdrTest::LibraryCodeSeg(TInt aLibraryHandle) sl@0: { return (TAny*)DoControl(EControlLibraryCodeSeg, (TAny*)aLibraryHandle); } sl@0: inline TAny* RLdrTest::ModuleCodeSeg(TModuleHandle aModuleHandle) sl@0: { return (TAny*)DoControl(EControlModuleCodeSeg, (TAny*)aModuleHandle); } sl@0: inline TInt RLdrTest::GetCodeSegList(SEntry* aList, TInt aMax) sl@0: { return DoControl(EControlGetCodeSegList, aList, (TAny*)aMax); } sl@0: inline TAny* RLdrTest::CodeSegFromAddr(TLinAddr aAddr) sl@0: { return (TAny*)DoControl(EControlCodeSegFromAddr, (TAny*)aAddr); } sl@0: inline TModuleHandle RLdrTest::ModuleHandleFromAddr(TLinAddr aAddr) sl@0: { return (TModuleHandle)DoControl(EControlModuleHandleFromAddr, (TAny*)aAddr); } sl@0: inline TInt RLdrTest::ProcessSMPUnsafeCount(TInt aProcessHandle) sl@0: { return DoControl(EControlProcessSMPUnsafeCount, (TAny*)aProcessHandle); } sl@0: #endif sl@0: sl@0: #endif sl@0: