kerneltest/e32test/hcr/d_hcrut.h
changeset 0 a41df078684a
child 39 5d2844f35677
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     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 // Hardware Configuration Respoitory Tests
       
    15 //
       
    16 
       
    17 #ifndef D_HCR_H
       
    18 #define D_HCR_H
       
    19 
       
    20 #include <e32cmn.h>
       
    21 #include <e32ver.h>
       
    22 #include <drivers/hcr.h>
       
    23 
       
    24 #ifndef __KERNEL_MODE__
       
    25 #include <e32std.h>
       
    26 #endif
       
    27 
       
    28 
       
    29 /**
       
    30 Interface to the fast-trace memory buffer.
       
    31 */
       
    32 class RHcrTest : public RBusLogicalChannel
       
    33 	{
       
    34 public:
       
    35 		
       
    36 #ifndef __KERNEL_MODE__
       
    37 	inline TInt Open()
       
    38 		{
       
    39 		return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
       
    40 		}
       
    41 
       
    42 	inline TUint Test_SanityTestWordSettings()
       
    43 		{
       
    44 		return DoControl(ECtrlSanityTestWordSettings);
       
    45 		}
       
    46 
       
    47 	inline TUint Test_SanityTestLargeSettings()
       
    48 		{
       
    49 		return DoControl(ECtrlSanityTestLargeSettings);
       
    50 		}
       
    51 
       
    52 	inline TUint Test_ReleaseSDRs()
       
    53 		{
       
    54 		return DoControl(ECtrlFreePhyscialRam);
       
    55 		}
       
    56 		
       
    57 	inline TUint Test_SwitchRepository()
       
    58 		{
       
    59 		return DoControl(ECtrlSwitchRepository);
       
    60 		}
       
    61 		
       
    62 
       
    63 #endif
       
    64 
       
    65 	inline static const TDesC& Name();
       
    66 
       
    67 private:
       
    68 	enum TControl
       
    69 		{
       
    70 		ECtrlUndefined = 0,
       
    71 		
       
    72 		ECtrlSanityTestWordSettings,
       
    73 		ECtrlSanityTestLargeSettings,
       
    74 		
       
    75 		ECtrlGetWordSetting,
       
    76 		ECtrlGetLargeSetting,
       
    77 		ECtrlGetManyWordSettings,
       
    78 		ECtrlGetManyLargeSettings,
       
    79 		
       
    80 		ECtrlSwitchRepository,
       
    81 		
       
    82 		ECtrlFreePhyscialRam
       
    83 		};
       
    84 		
       
    85 	friend class DHcrTestChannel;
       
    86 	friend class DHcrTestFactory;
       
    87 	};
       
    88 
       
    89 inline const TDesC& RHcrTest::Name()
       
    90 	{
       
    91 	_LIT(KTestDriver,"d_hcr");
       
    92 	return KTestDriver;
       
    93 	}
       
    94 
       
    95 
       
    96 
       
    97 #endif // D_HCR_H