Update contrib.
1 // Copyright (c) 2006-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Purpose: Kernel-side tracking of debug agent information associated
15 // with each process being debugged.
19 #ifndef D_DEBUG_AGENT_H
20 #define D_DEBUG_AGENT_H
22 #include <rm_debug_api.h>
23 #include "d_driver_event_info.h"
25 class DDebugAgent : public DBase
28 static DDebugAgent* New(TUint64);
31 TInt SetEventAction(Debug::TEventType aEvent, Debug::TKernelEventAction aEventAction);
32 void GetEvent(TClientDataRequest<Debug::TEventInfo>* aAsyncGetValueRequest, Debug::TEventInfo* aEventInfo, DThread* aClientThread);
33 TInt EventAction(Debug::TEventType aEvent);
35 TInt CancelGetEvent(void);
36 void NotifyEvent(const TDriverEventInfo& aEventInfo);
40 DDebugAgent(TUint64 aId);
44 void QueueEvent(TDriverEventInfo& aEventInfo);
45 TBool BufferEmpty() const;
46 TBool BufferFull() const;
47 TBool BufferCanStoreEvent() const;
48 TBool BufferAtCriticalLevel() const;
49 void IncrementPosition(TInt& aPosition);
50 TInt NumberOfEmptySlots() const;
54 Debug::TKernelEventAction iEventActions[Debug::EEventsLast];
56 //iEventInfo is a pointer to an object owned by the security server, so
57 //no clean up needs be performed on it
58 Debug::TEventInfo* iEventInfo;
59 RArray<TDriverEventInfo> iEventQueue; // ring buffer.
60 TClientDataRequest<Debug::TEventInfo>* iRequestGetEventStatus;
61 DThread* iClientThread;
64 TInt iHead; // points to the next empty slot in iEventQueue (exc. when iFull == ETrue)
65 TInt iTail; // points to the oldest full slot in iEventQueue (exc. when iEmpty == ETrue)
67 //if we have told the agent that we are ignoring trace events
71 #endif // D_DEBUG_AGENT_H