diff -r 4fde310f06fe -r 86a2e675b80a memspy/CommandLine/Include/MemSpyCommandLine.h --- a/memspy/CommandLine/Include/MemSpyCommandLine.h Mon Jun 14 11:37:33 2010 +0300 +++ b/memspy/CommandLine/Include/MemSpyCommandLine.h Mon Jun 28 15:36:07 2010 +0300 @@ -22,6 +22,9 @@ #include #include #include +#include + +#include "MemSpyCommands.h" #ifdef _DEBUG # define TRACE( x ) x @@ -36,21 +39,28 @@ class RFs; class CCommandLineArguments; class RMemSpyEngineClientInterface; +class CConsoleBase; +class RMemSpySession; -class CMemSpyCommandLine : public CBase +class CMemSpyCommandLine : public CActive { public: - static CMemSpyCommandLine* NewLC(); + //static CMemSpyCommandLine* NewLC(); + static CMemSpyCommandLine* NewLC( CConsoleBase& aConsole ); ~CMemSpyCommandLine(); private: - CMemSpyCommandLine(); + //CMemSpyCommandLine(); + CMemSpyCommandLine( CConsoleBase& aConsole ); void ConstructL(); public: // API - void PerformBatchL( const TDesC& aFileName ); + //void PerformBatchL( const TDesC& aFileName ); //support of the batch files removed void PerformOpL( const CCommandLineArguments& aCommandLine ); void PerformSingleOpL( const TDesC& aCommand, const CDesCArray& aParameters ); + // + //AO request method + void WaitForInput(); private: // Internal methods void ConnectToMemSpyL(); @@ -60,10 +70,26 @@ TInt FindBatchFile( TDes &aFileName ); TInt FindFile( TDes &aFileName, const TDesC &aDirPath ); +private: // Console write methods + void RedrawInputPrompt(); + void RedrawStatusMessage(); + void RedrawStatusMessage( const TDesC& aMessage ); + void ProcessCommandBufferL(); + void RunL(); // from CActive + TInt RunError( TInt aError ); + void DoCancel(); + private: // Data members RFs iFsSession; RMemSpyEngineClientInterface* iMemSpy; + RMemSpySession* iMemSpySession; TBool iIsBatch; // For avoiding recursion + +private: // Data members - console - write status messages + CConsoleBase& iConsole; + TPoint iCommandPromptPos; + TPoint iStatusMessagePos; + TBuf iCommandBuffer; };