|
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 CONSOLEMENU_H |
|
19 #define CONSOLEMENU_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <e32cons.h> |
|
24 #include <e32hashtab.h> |
|
25 |
|
26 // Engine includes |
|
27 #include <memspy/engine/memspyengine.h> |
|
28 #include <memspy/engine/memspyengineobserver.h> |
|
29 #include <memspysession.h> |
|
30 // User includes |
|
31 #include "ConsoleConstants.h" |
|
32 |
|
33 // Classes referenced |
|
34 class CConsoleBase; |
|
35 class RMemSpySession; |
|
36 |
|
37 class CMemSpyConsoleMenu : public CActive, public MMemSpyEngineObserver |
|
38 { |
|
39 public: |
|
40 static CMemSpyConsoleMenu* NewLC( RMemSpySession& aSession, CConsoleBase& aConsole ); |
|
41 ~CMemSpyConsoleMenu(); |
|
42 |
|
43 private: |
|
44 CMemSpyConsoleMenu( RMemSpySession& aEngine, CConsoleBase& aConsole ); |
|
45 void ConstructL(); |
|
46 |
|
47 public: // API |
|
48 void DrawMenuL(); |
|
49 void WaitForInput(); |
|
50 |
|
51 private: // From CActive |
|
52 void RunL(); |
|
53 void DoCancel(); |
|
54 |
|
55 private: // From MMemSpyEngineObserver |
|
56 void HandleMemSpyEngineEventL( MMemSpyEngineObserver::TEvent aEvent, TAny* aContext ); |
|
57 |
|
58 private: // Command handlers |
|
59 void OnCmdSinkTypeToggleL(); |
|
60 void OnCmdKernelObjectListingL(); |
|
61 void OnCmdHeapDataKernelL(); |
|
62 void OnCmdHeapDataUserL(); |
|
63 void OnCmdCSVListingHeapL(); |
|
64 void OnCmdCSVListingStackL(); |
|
65 void OnCmdHeapCellListUserL(); |
|
66 |
|
67 private: // Internal methods |
|
68 void ClearCommandBuffer(); |
|
69 void ProcessCommandBufferL(); |
|
70 void RedrawInputPrompt(); |
|
71 void RedrawStatusMessage(); |
|
72 void RedrawStatusMessage( const TDesC& aMessage ); |
|
73 void GetProcessName(); |
|
74 void InitiateMemSpyClientServerOperationL( TInt aOpCode ); |
|
75 |
|
76 private: // Data members |
|
77 RMemSpySession& iSession; |
|
78 CConsoleBase& iConsole; |
|
79 |
|
80 TMemSpyOutputType iOutputType; |
|
81 // |
|
82 TBuf<KMemSpyMaxInputBufferLength> iCommandBuffer; |
|
83 TPoint iCommandPromptPos; |
|
84 TPoint iStatusMessagePos; |
|
85 TBool iRunningDeviceWideOperation; |
|
86 }; |
|
87 |
|
88 |
|
89 |
|
90 #endif |