diff -r 0ff24a8f6ca2 -r 98307c651589 perfsrv/memspy/Console/Include/ConsoleMenu.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perfsrv/memspy/Console/Include/ConsoleMenu.h Mon Sep 06 15:00:47 2010 +0300 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef CONSOLEMENU_H +#define CONSOLEMENU_H + +// System includes +#include +#include +#include + +// Engine includes +#include +#include +#include +// User includes +#include "ConsoleConstants.h" + +// Classes referenced +class CConsoleBase; +class RMemSpySession; + +class CMemSpyConsoleMenu : public CActive, public MMemSpyEngineObserver + { +public: + static CMemSpyConsoleMenu* NewLC( RMemSpySession& aSession, CConsoleBase& aConsole ); + ~CMemSpyConsoleMenu(); + +private: + CMemSpyConsoleMenu( RMemSpySession& aEngine, CConsoleBase& aConsole ); + void ConstructL(); + +public: // API + void DrawMenuL(); + void WaitForInput(); + +private: // From CActive + void RunL(); + void DoCancel(); + +private: // From MMemSpyEngineObserver + void HandleMemSpyEngineEventL( MMemSpyEngineObserver::TEvent aEvent, TAny* aContext ); + +private: // Command handlers + void OnCmdSinkTypeToggleL(); + void OnCmdKernelObjectListingL(); + void OnCmdHeapDataKernelL(); + void OnCmdHeapDataUserL(); + void OnCmdCSVListingHeapL(); + void OnCmdCSVListingStackL(); + void OnCmdHeapCellListUserL(); + +private: // Internal methods + void ClearCommandBuffer(); + void ProcessCommandBufferL(); + void RedrawInputPrompt(); + void RedrawStatusMessage(); + void RedrawStatusMessage( const TDesC& aMessage ); + void GetProcessName(); + void InitiateMemSpyClientServerOperationL( TInt aOpCode ); + +private: // Data members + RMemSpySession& iSession; + CConsoleBase& iConsole; + + TMemSpyOutputType iOutputType; + // + TBuf iCommandBuffer; + TPoint iCommandPromptPos; + TPoint iStatusMessagePos; + TBool iRunningDeviceWideOperation; + }; + + + +#endif