memspy/Console/Include/ConsoleMenu.h
changeset 0 a03f92240627
child 20 ca8a1b6995f6
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     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 
       
    30 // User includes
       
    31 #include "ConsoleConstants.h"
       
    32 
       
    33 // Classes referenced
       
    34 class CConsoleBase;
       
    35 
       
    36 
       
    37 class CMemSpyConsoleMenu : public CActive, public MMemSpyEngineObserver
       
    38     {
       
    39 public:
       
    40     static CMemSpyConsoleMenu* NewLC( CMemSpyEngine& aEngine, CConsoleBase& aConsole );
       
    41     ~CMemSpyConsoleMenu();
       
    42 
       
    43 private:
       
    44     CMemSpyConsoleMenu( CMemSpyEngine& 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     CMemSpyEngine& iEngine;
       
    78     CConsoleBase& iConsole;
       
    79     //
       
    80     TBuf<KMemSpyMaxInputBufferLength> iCommandBuffer;
       
    81     TPoint iCommandPromptPos;
       
    82     TPoint iStatusMessagePos;
       
    83     TBool iRunningDeviceWideOperation;
       
    84     };
       
    85 
       
    86 
       
    87 
       
    88 #endif