kerneltest/e32test/debug/reventtracker.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2003-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/debug/rventtracker.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __REVENTTRACKER_H__
       
    19 #define __REVENTTRACKER_H__
       
    20 
       
    21 #include <e32cmn.h>
       
    22 
       
    23 #ifndef __KERNEL_MODE__
       
    24 #include <e32std.h>
       
    25 #endif // __KERNEL_MODE__
       
    26 
       
    27 _LIT(KTestLddName, "TestEventTracker");
       
    28 _LIT8(KUseStopModeHook, "UseStopModeHook");
       
    29 
       
    30 /** Session with event tracking debug agent */
       
    31 
       
    32 class REventTracker: public RBusLogicalChannel
       
    33 	{
       
    34 public:
       
    35 	enum 
       
    36 		{
       
    37 		EStart,
       
    38 		EStop,
       
    39 		};
       
    40 public:
       
    41 	static inline TVersion Version() { return TVersion(1, 0, 1); }
       
    42 #ifndef __KERNEL_MODE__
       
    43 public:
       
    44 	inline TInt Open(TBool aUseHook);
       
    45 	inline TInt Start();
       
    46 	inline TInt Stop();
       
    47 #endif
       
    48 	};
       
    49 
       
    50 
       
    51 #ifndef __KERNEL_MODE__
       
    52 
       
    53 inline TInt REventTracker::Open(TBool aUseHook)
       
    54 	{
       
    55 	return DoCreate(KTestLddName, Version(), aUseHook, NULL, NULL, EOwnerThread);
       
    56 	}
       
    57 
       
    58 inline TInt REventTracker::Start()
       
    59 	{
       
    60 	return DoControl(EStart);
       
    61 	}
       
    62 
       
    63 inline TInt REventTracker::Stop()
       
    64 	{
       
    65 	return DoControl(EStop);
       
    66 	}
       
    67 
       
    68 #endif // __KERNEL_MODE__
       
    69 
       
    70 #endif // __REVENTTRACKER_H__