37 |
34 |
38 // Classes referenced |
35 // Classes referenced |
39 class RFs; |
36 class RFs; |
40 class CCommandLineArguments; |
37 class CCommandLineArguments; |
41 class RMemSpyEngineClientInterface; |
38 class RMemSpyEngineClientInterface; |
42 class CConsoleBase; |
|
43 class RMemSpySession; |
|
44 |
39 |
45 class CMemSpyCommandLine : public CActive |
40 class CMemSpyCommandLine : public CBase |
46 { |
41 { |
47 public: |
42 public: |
48 //static CMemSpyCommandLine* NewLC(); |
43 static CMemSpyCommandLine* NewLC(); |
49 static CMemSpyCommandLine* NewLC( CConsoleBase& aConsole ); |
|
50 ~CMemSpyCommandLine(); |
44 ~CMemSpyCommandLine(); |
51 |
45 |
52 private: |
46 private: |
53 //CMemSpyCommandLine(); |
47 CMemSpyCommandLine(); |
54 CMemSpyCommandLine( CConsoleBase& aConsole ); |
|
55 void ConstructL(); |
48 void ConstructL(); |
56 |
49 |
57 public: // API |
50 public: // API |
58 //void PerformBatchL( const TDesC& aFileName ); //support of the batch files removed |
51 void PerformBatchL( const TDesC& aFileName ); |
59 void PerformOpL( const CCommandLineArguments& aCommandLine ); |
52 void PerformOpL( const CCommandLineArguments& aCommandLine ); |
60 void PerformSingleOpL( const TDesC& aCommand, const CDesCArray& aParameters ); |
53 void PerformSingleOpL( const TDesC& aCommand, const CDesCArray& aParameters ); |
61 // |
|
62 //AO request method |
|
63 void WaitForInput(); |
|
64 |
54 |
65 private: // Internal methods |
55 private: // Internal methods |
66 void ConnectToMemSpyL(); |
56 void ConnectToMemSpyL(); |
67 void LaunchMemSpyL(); |
57 void LaunchMemSpyL(); |
68 CDesCArray* ReadLinesL( RFile& aFile ); |
58 CDesCArray* ReadLinesL( RFile& aFile ); |
69 void ParseSWMTParametersL( const CDesCArray& aParameters, TInt& aCategories, TDes& aFilter ); |
59 void ParseSWMTParametersL( const CDesCArray& aParameters, TInt& aCategories, TDes& aFilter ); |
70 TInt FindBatchFile( TDes &aFileName ); |
60 TInt FindBatchFile( TDes &aFileName ); |
71 TInt FindFile( TDes &aFileName, const TDesC &aDirPath ); |
61 TInt FindFile( TDes &aFileName, const TDesC &aDirPath ); |
72 |
62 |
73 private: // Console write methods |
|
74 void RedrawInputPrompt(); |
|
75 void RedrawStatusMessage(); |
|
76 void RedrawStatusMessage( const TDesC& aMessage ); |
|
77 void ProcessCommandBufferL(); |
|
78 void RunL(); // from CActive |
|
79 TInt RunError( TInt aError ); |
|
80 void DoCancel(); |
|
81 |
|
82 private: // Data members |
63 private: // Data members |
83 RFs iFsSession; |
64 RFs iFsSession; |
84 RMemSpyEngineClientInterface* iMemSpy; |
65 RMemSpyEngineClientInterface* iMemSpy; |
85 RMemSpySession* iMemSpySession; |
|
86 TBool iIsBatch; // For avoiding recursion |
66 TBool iIsBatch; // For avoiding recursion |
87 |
|
88 private: // Data members - console - write status messages |
|
89 CConsoleBase& iConsole; |
|
90 TPoint iCommandPromptPos; |
|
91 TPoint iStatusMessagePos; |
|
92 TBuf<KMemSpyMaxInputBufferLength> iCommandBuffer; |
|
93 }; |
67 }; |
94 |
68 |
95 |
69 |
96 #endif |
70 #endif |