25 TInt Create(DLogicalDevice* aDevice, DLogicalChannel* aChannel, DThread* aClient); |
25 TInt Create(DLogicalDevice* aDevice, DLogicalChannel* aChannel, DThread* aClient); |
26 ~DRM_DebugEventHandler(); |
26 ~DRM_DebugEventHandler(); |
27 TInt Start(); |
27 TInt Start(); |
28 TInt Stop(); |
28 TInt Stop(); |
29 |
29 |
|
30 inline void DRM_DebugEventHandler::LockDataAccess() |
|
31 { |
|
32 Kern::SemaphoreWait(*iProtectionLock); |
|
33 } |
|
34 |
|
35 inline void DRM_DebugEventHandler::ReleaseDataAccess() |
|
36 { |
|
37 Kern::SemaphoreSignal(*iProtectionLock); |
|
38 } |
|
39 |
30 private: |
40 private: |
31 static TUint EventHandler(TKernelEvent aEvent, TAny* a1, TAny* a2, TAny* aThis); |
41 static TUint EventHandler(TKernelEvent aEvent, TAny* a1, TAny* a2, TAny* aThis); |
32 TUint HandleEvent(TKernelEvent aType, TAny* a1, TAny* a2); |
42 TUint HandleEvent(TKernelEvent aType, TAny* a1, TAny* a2); |
33 TBool HandleSpecificEvent(TKernelEvent aType, TAny* a1, TAny* a2); |
43 TBool HandleSpecificEvent(TKernelEvent aType, TAny* a1, TAny* a2); |
34 |
44 |
35 private: |
45 private: |
36 /** Lock serialising calls to event handler */ |
46 /** Used to serialise access data structures */ |
37 DSemaphore* iLock; |
47 DSemaphore* iProtectionLock; |
38 |
48 |
39 TBool iTracking; |
49 TBool iTracking; |
40 |
50 |
41 DLogicalDevice* iDevice; // open reference to LDD for avoiding lifetime issues |
51 DLogicalDevice* iDevice; // open reference to LDD for avoiding lifetime issues |
42 DThread* iClientThread; |
52 DThread* iClientThread; |