os/kernelhwsrv/kerneltest/e32test/smr/d_smr.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Bootstrap Shadow Memory Region Test Driver User I/F
    15 //
    16 
    17 #ifndef D_SMR_H
    18 #define D_SMR_H
    19 
    20 #include <e32cmn.h>
    21 #include <e32ver.h>
    22 
    23 #ifndef __KERNEL_MODE__
    24 #include <e32std.h>
    25 #endif
    26 
    27 
    28 /**
    29 Interface to the fast-trace memory buffer.
    30 */
    31 class RSMRTest : public RBusLogicalChannel
    32 	{
    33 public:
    34 		
    35 #ifndef __KERNEL_MODE__
    36 	inline TInt Open()
    37 		{
    38 		return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
    39 		}
    40 		
    41 	/* SMR Feature Testing	
    42 	 */	
    43 	 
    44 	inline TUint Test_CheckSMRIBPtr(TBool aEnforce)
    45 		{
    46 		return DoControl(ECtrlCheckSMRIBPtr, (TAny*)aEnforce);
    47 		}
    48 	inline TUint Test_PrintSMRIB(TBool aEnforce)
    49 		{
    50 		return DoControl(ECtrlPrintSMRIB, (TAny*)aEnforce);
    51 		}
    52 	inline TUint Test_AccessAllSMRs(TBool aEnforce)
    53 		{
    54 		return DoControl(ECtrlAccessAllSMRs, (TAny*)aEnforce);
    55 		}
    56 	inline TUint Test_FreeHalfSMR1PhysicalRam(TBool aEnforce)
    57 		{
    58 		return DoControl(ECtrlFreeHalfSMR1PhysicalRam, (TAny*)aEnforce);
    59 		}
    60 	inline TUint Test_FreeAllSMR2PhysicalRam(TBool aEnforce)
    61 		{
    62 		return DoControl(ECtrlFreeAllSMR2PhysicalRam, (TAny*)aEnforce);
    63 		}
    64 
    65 #endif
    66 
    67 	inline static const TDesC& Name();
    68 
    69 private:
    70 	enum TControl
    71 		{
    72 		ECtrlUndefined = 0,
    73 		
    74 		ECtrlCheckSMRIBPtr,
    75 		ECtrlPrintSMRIB,
    76 		ECtrlAccessAllSMRs,
    77 		ECtrlFreeHalfSMR1PhysicalRam,
    78 		ECtrlFreeAllSMR2PhysicalRam
    79 		
    80 		};
    81 		
    82 	friend class DSMRTestChannel;
    83 	friend class DSMRTestFactory;
    84 	};
    85 
    86 inline const TDesC& RSMRTest::Name()
    87 	{
    88 	_LIT(KTestDriver,"d_smr");
    89 	return KTestDriver;
    90 	}
    91 
    92 
    93 
    94 #endif // D_SMR_H