|
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 MEMSPYCOMMANDLINE_H |
|
19 #define MEMSPYCOMMANDLINE_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 #include <badesca.h> |
|
25 |
|
26 #ifdef _DEBUG |
|
27 # define TRACE( x ) x |
|
28 #else |
|
29 # define TRACE( x ) |
|
30 #endif |
|
31 |
|
32 // Constants |
|
33 const TInt KMemSpyCommandLineMaxLength = 128; |
|
34 |
|
35 // Classes referenced |
|
36 class RFs; |
|
37 class CCommandLineArguments; |
|
38 class RMemSpyEngineClientInterface; |
|
39 |
|
40 class CMemSpyCommandLine : public CBase |
|
41 { |
|
42 public: |
|
43 static CMemSpyCommandLine* NewLC(); |
|
44 ~CMemSpyCommandLine(); |
|
45 |
|
46 private: |
|
47 CMemSpyCommandLine(); |
|
48 void ConstructL(); |
|
49 |
|
50 public: // API |
|
51 void PerformBatchL( const TDesC& aFileName ); |
|
52 void PerformOpL( const CCommandLineArguments& aCommandLine ); |
|
53 void PerformSingleOpL( const TDesC& aCommand, const CDesCArray& aParameters ); |
|
54 |
|
55 private: // Internal methods |
|
56 void ConnectToMemSpyL(); |
|
57 void LaunchMemSpyL(); |
|
58 CDesCArray* ReadLinesL( RFile& aFile ); |
|
59 void ParseSWMTParametersL( const CDesCArray& aParameters, TInt& aCategories, TDes& aFilter ); |
|
60 TInt FindBatchFile( TDes &aFileName ); |
|
61 TInt FindFile( TDes &aFileName, const TDesC &aDirPath ); |
|
62 |
|
63 private: // Data members |
|
64 RFs iFsSession; |
|
65 RMemSpyEngineClientInterface* iMemSpy; |
|
66 TBool iIsBatch; // For avoiding recursion |
|
67 }; |
|
68 |
|
69 |
|
70 #endif |