1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/secure/d_sldd.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,93 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32test\secure\d_sldd.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __D_SLDD_H__
1.22 +#define __D_SLDD_H__
1.23 +#include <e32cmn.h>
1.24 +#ifndef __KERNEL_MODE__
1.25 +#include <e32std.h>
1.26 +#endif
1.27 +
1.28 +class TCapsTestV01
1.29 + {
1.30 +public:
1.31 + TVersion iVersion;
1.32 + };
1.33 +
1.34 +class RLddTest : public RBusLogicalChannel
1.35 + {
1.36 +public:
1.37 + enum TControl
1.38 + {
1.39 + EControlTest1=0,
1.40 + EGetIds,
1.41 + EGetKernelConfigFlags,
1.42 + ESetKernelConfigFlags,
1.43 + ESetDisabledCapabilities0,
1.44 + EKernelTestData,
1.45 + EGetSecureInfos,
1.46 + };
1.47 + enum TRequest
1.48 + {
1.49 + };
1.50 + enum TTestValues
1.51 + {
1.52 + ETest1Value = 0x07654321,
1.53 + };
1.54 +
1.55 + struct TIds
1.56 + {
1.57 + TVendorId iThreadVID;
1.58 + TVendorId iProcessVID;
1.59 + TSecureId iThreadSID;
1.60 + TSecureId iProcessSID;
1.61 + };
1.62 +
1.63 +public:
1.64 + inline TInt OpenLocal();
1.65 + inline TInt OpenProtected();
1.66 + inline TInt Test1();
1.67 + inline void GetIds(RLddTest::TIds& aIds);
1.68 + inline TUint32 GetKernelConfigFlags();
1.69 + inline void SetKernelConfigFlags(TUint32 aNewFlags);
1.70 + inline void SetDisabledCapabilities0(TUint32 aNewWord0);
1.71 + inline void KernelTestData(TUint32*& aAddress, TUint32& aData);
1.72 + inline void GetSecureInfos(TSecurityInfo* aThreadSecureInfo, TSecurityInfo* aProcessSecureInfo);
1.73 + };
1.74 +
1.75 +#ifndef __KERNEL_MODE__
1.76 +inline TInt RLddTest::OpenLocal()
1.77 + { return DoCreate(_L("D_SLDD"),TVersion(0,1,1),KNullUnit,NULL,NULL); }
1.78 +inline TInt RLddTest::OpenProtected()
1.79 + { return DoCreate(_L("D_SLDD"),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread,ETrue); }
1.80 +inline TInt RLddTest::Test1()
1.81 + { return DoControl(EControlTest1); }
1.82 +inline void RLddTest::GetIds(RLddTest::TIds& aIds)
1.83 + { DoControl(EGetIds,&aIds); }
1.84 +inline TUint32 RLddTest::GetKernelConfigFlags()
1.85 + { return DoControl(EGetKernelConfigFlags); }
1.86 +inline void RLddTest::SetKernelConfigFlags(TUint32 aNewFlags)
1.87 + { DoControl(ESetKernelConfigFlags, (TAny*)aNewFlags); }
1.88 +inline void RLddTest::SetDisabledCapabilities0(TUint32 aNewWord0)
1.89 + { DoControl(ESetDisabledCapabilities0, (TAny*)aNewWord0); }
1.90 +inline void RLddTest::KernelTestData(TUint32*& aAddress, TUint32& aData)
1.91 + { DoControl(EKernelTestData, &aAddress,&aData); }
1.92 +inline void RLddTest::GetSecureInfos(TSecurityInfo* aThreadSecureInfo, TSecurityInfo* aProcessSecureInfo)
1.93 + { DoControl(EGetSecureInfos, aThreadSecureInfo,aProcessSecureInfo); }
1.94 +#endif
1.95 +
1.96 +#endif