|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMSPYDRIVERINSPECTEDPROCESSMANAGER_H |
|
19 #define MEMSPYDRIVERINSPECTEDPROCESSMANAGER_H |
|
20 |
|
21 // System includes |
|
22 #include <e32cmn.h> |
|
23 #include <kern_priv.h> |
|
24 |
|
25 // User includes |
|
26 #include "MemSpyDriverEventMonitor.h" |
|
27 |
|
28 // Classes referenced |
|
29 class DMemSpyDriverDevice; |
|
30 class DMemSpyInspectedProcess; |
|
31 |
|
32 |
|
33 class DMemSpyInspectedProcessManager : public DObject, public MMemSpyEventMonitorObserver |
|
34 { |
|
35 public: |
|
36 DMemSpyInspectedProcessManager(); |
|
37 ~DMemSpyInspectedProcessManager(); |
|
38 TInt Create( DMemSpyDriverDevice* aDevice ); |
|
39 |
|
40 public: // API |
|
41 TInt ProcessOpen( DProcess* aProcess ); |
|
42 TInt ProcessClose( DProcess* aProcess ); |
|
43 TInt ProcessCount() const; |
|
44 // |
|
45 DMemSpyInspectedProcess* InspectedProcessByProcessId( TUint aProcessId ); |
|
46 void AutoStartListReset(); |
|
47 TInt AutoStartListAdd( TUint aSID ); |
|
48 |
|
49 private: // Event handler queue methods |
|
50 void FreeAllInspectedProcesses(); |
|
51 DMemSpyEventMonitor& EventMonitor(); |
|
52 |
|
53 private: // From MMemSpyEventMonitorObserver |
|
54 TUint EMTypeMask() const; |
|
55 void EMHandleProcessAdd( DProcess& aProcess ); |
|
56 |
|
57 private: |
|
58 DMemSpyDriverDevice* iDevice; |
|
59 SDblQue iMonitoredProcesses; |
|
60 |
|
61 // So that MemSpy can be informed when one of the observed processes changed |
|
62 DThread* iObserverThread; |
|
63 TRequestStatus* iObserverRS; |
|
64 RArray<TUint> iAutoStartSIDs; |
|
65 }; |
|
66 |
|
67 |
|
68 #endif |