kerneltest/e32test/secure/d_sldd.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     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 // e32test\secure\d_sldd.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __D_SLDD_H__
       
    19 #define __D_SLDD_H__
       
    20 #include <e32cmn.h>
       
    21 #ifndef __KERNEL_MODE__
       
    22 #include <e32std.h>
       
    23 #endif
       
    24 
       
    25 class TCapsTestV01
       
    26 	{
       
    27 public:
       
    28 	TVersion	iVersion;
       
    29 	};
       
    30 
       
    31 class RLddTest : public RBusLogicalChannel
       
    32 	{
       
    33 public:
       
    34 	enum TControl
       
    35 		{
       
    36 		EControlTest1=0,
       
    37 		EGetIds,
       
    38 		EGetKernelConfigFlags,
       
    39 		ESetKernelConfigFlags,
       
    40 		ESetDisabledCapabilities0,
       
    41 		EKernelTestData,
       
    42 		EGetSecureInfos,
       
    43 		};
       
    44 	enum TRequest
       
    45 		{
       
    46 		};
       
    47 	enum TTestValues
       
    48 		{
       
    49 		ETest1Value = 0x07654321,
       
    50 		};
       
    51 	
       
    52 	struct TIds
       
    53 		{
       
    54 		TVendorId iThreadVID;
       
    55 		TVendorId iProcessVID;
       
    56 		TSecureId iThreadSID;
       
    57 		TSecureId iProcessSID;
       
    58 		};
       
    59 
       
    60 public:
       
    61 	inline TInt OpenLocal();
       
    62 	inline TInt OpenProtected();
       
    63 	inline TInt Test1();
       
    64 	inline void GetIds(RLddTest::TIds& aIds);
       
    65 	inline TUint32 GetKernelConfigFlags();
       
    66 	inline void SetKernelConfigFlags(TUint32 aNewFlags);
       
    67 	inline void SetDisabledCapabilities0(TUint32 aNewWord0);
       
    68 	inline void KernelTestData(TUint32*& aAddress, TUint32& aData);
       
    69 	inline void GetSecureInfos(TSecurityInfo* aThreadSecureInfo, TSecurityInfo* aProcessSecureInfo);
       
    70 	};
       
    71 
       
    72 #ifndef __KERNEL_MODE__
       
    73 inline TInt RLddTest::OpenLocal()
       
    74 	{ return DoCreate(_L("D_SLDD"),TVersion(0,1,1),KNullUnit,NULL,NULL); }
       
    75 inline TInt RLddTest::OpenProtected()
       
    76 	{ return DoCreate(_L("D_SLDD"),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread,ETrue); }
       
    77 inline TInt RLddTest::Test1()
       
    78 	{ return DoControl(EControlTest1); }
       
    79 inline void RLddTest::GetIds(RLddTest::TIds& aIds)
       
    80 	{ DoControl(EGetIds,&aIds); }
       
    81 inline TUint32 RLddTest::GetKernelConfigFlags()
       
    82 	{ return DoControl(EGetKernelConfigFlags); }
       
    83 inline void RLddTest::SetKernelConfigFlags(TUint32 aNewFlags)
       
    84 	{ DoControl(ESetKernelConfigFlags, (TAny*)aNewFlags); }
       
    85 inline void RLddTest::SetDisabledCapabilities0(TUint32 aNewWord0)
       
    86 	{ DoControl(ESetDisabledCapabilities0, (TAny*)aNewWord0); }
       
    87 inline void RLddTest::KernelTestData(TUint32*& aAddress, TUint32& aData)
       
    88 	{ DoControl(EKernelTestData, &aAddress,&aData); }
       
    89 inline void RLddTest::GetSecureInfos(TSecurityInfo* aThreadSecureInfo, TSecurityInfo* aProcessSecureInfo)
       
    90 	{ DoControl(EGetSecureInfos, aThreadSecureInfo,aProcessSecureInfo); }
       
    91 #endif
       
    92 
       
    93 #endif