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.
sl@0
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Bootstrap Shadow Memory Region Test Driver User I/F
sl@0
    15
//
sl@0
    16
sl@0
    17
#ifndef D_SMR_H
sl@0
    18
#define D_SMR_H
sl@0
    19
sl@0
    20
#include <e32cmn.h>
sl@0
    21
#include <e32ver.h>
sl@0
    22
sl@0
    23
#ifndef __KERNEL_MODE__
sl@0
    24
#include <e32std.h>
sl@0
    25
#endif
sl@0
    26
sl@0
    27
sl@0
    28
/**
sl@0
    29
Interface to the fast-trace memory buffer.
sl@0
    30
*/
sl@0
    31
class RSMRTest : public RBusLogicalChannel
sl@0
    32
	{
sl@0
    33
public:
sl@0
    34
		
sl@0
    35
#ifndef __KERNEL_MODE__
sl@0
    36
	inline TInt Open()
sl@0
    37
		{
sl@0
    38
		return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
sl@0
    39
		}
sl@0
    40
		
sl@0
    41
	/* SMR Feature Testing	
sl@0
    42
	 */	
sl@0
    43
	 
sl@0
    44
	inline TUint Test_CheckSMRIBPtr(TBool aEnforce)
sl@0
    45
		{
sl@0
    46
		return DoControl(ECtrlCheckSMRIBPtr, (TAny*)aEnforce);
sl@0
    47
		}
sl@0
    48
	inline TUint Test_PrintSMRIB(TBool aEnforce)
sl@0
    49
		{
sl@0
    50
		return DoControl(ECtrlPrintSMRIB, (TAny*)aEnforce);
sl@0
    51
		}
sl@0
    52
	inline TUint Test_AccessAllSMRs(TBool aEnforce)
sl@0
    53
		{
sl@0
    54
		return DoControl(ECtrlAccessAllSMRs, (TAny*)aEnforce);
sl@0
    55
		}
sl@0
    56
	inline TUint Test_FreeHalfSMR1PhysicalRam(TBool aEnforce)
sl@0
    57
		{
sl@0
    58
		return DoControl(ECtrlFreeHalfSMR1PhysicalRam, (TAny*)aEnforce);
sl@0
    59
		}
sl@0
    60
	inline TUint Test_FreeAllSMR2PhysicalRam(TBool aEnforce)
sl@0
    61
		{
sl@0
    62
		return DoControl(ECtrlFreeAllSMR2PhysicalRam, (TAny*)aEnforce);
sl@0
    63
		}
sl@0
    64
sl@0
    65
#endif
sl@0
    66
sl@0
    67
	inline static const TDesC& Name();
sl@0
    68
sl@0
    69
private:
sl@0
    70
	enum TControl
sl@0
    71
		{
sl@0
    72
		ECtrlUndefined = 0,
sl@0
    73
		
sl@0
    74
		ECtrlCheckSMRIBPtr,
sl@0
    75
		ECtrlPrintSMRIB,
sl@0
    76
		ECtrlAccessAllSMRs,
sl@0
    77
		ECtrlFreeHalfSMR1PhysicalRam,
sl@0
    78
		ECtrlFreeAllSMR2PhysicalRam
sl@0
    79
		
sl@0
    80
		};
sl@0
    81
		
sl@0
    82
	friend class DSMRTestChannel;
sl@0
    83
	friend class DSMRTestFactory;
sl@0
    84
	};
sl@0
    85
sl@0
    86
inline const TDesC& RSMRTest::Name()
sl@0
    87
	{
sl@0
    88
	_LIT(KTestDriver,"d_smr");
sl@0
    89
	return KTestDriver;
sl@0
    90
	}
sl@0
    91
sl@0
    92
sl@0
    93
sl@0
    94
#endif // D_SMR_H