core/builtins/ps.h
changeset 0 7f656887cf89
child 7 184a1eb85cf2
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // ps.h
       
     2 // 
       
     3 // Copyright (c) 2005 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "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 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #include <fshell/ioutils.h>
       
    14 #include <fshell/common.mmh>
       
    15 #ifdef FSHELL_MEMORY_ACCESS_SUPPORT
       
    16 #include <fshell/memoryaccess.h>
       
    17 #endif
       
    18 
       
    19 using namespace IoUtils;
       
    20 
       
    21 
       
    22 class CCmdPs : public CCommandBase
       
    23 	{
       
    24 public:
       
    25 	static CCommandBase* NewLC();
       
    26 	~CCmdPs();
       
    27 private:
       
    28 	CCmdPs();
       
    29 private: // From CCommandBase.
       
    30 	virtual const TDesC& Name() const;
       
    31 	virtual void DoRunL();
       
    32 	virtual void ArgumentsL(RCommandArgumentList& aArguments);
       
    33 	virtual void OptionsL(RCommandOptionList& aOptions);
       
    34 private:
       
    35 #if defined(__WINS__) && !defined(EKA2)
       
    36 	void PrintInfoL(RThread& aThread);
       
    37 #else
       
    38 	void PrintInfoL(RProcess& aProcess);
       
    39 #endif
       
    40 	void PrintStackInfoL(RThread& aThread, const TDesC& aThreadName);
       
    41 	void PrintHeapInfoL(RThread& aThread, const TDesC& aThreadName);
       
    42 	void PrintCpuTimeL(RThread& aThread, const TDesC& aThreadName);
       
    43 	void PrintChunkInfoL(const TDesC& aProcessName);
       
    44 	void PrintSizeL(const TDesC& aCaption, TInt aSize);
       
    45 private:
       
    46 	TUint iProcessId;
       
    47 	HBufC* iMatch;
       
    48 	TBool iPrintPriority;
       
    49 	TBool iPrintThreads;
       
    50 	TBool iPrintStackInfo;
       
    51 	TBool iPrintHeapInfo;
       
    52 	TBool iPrintCpuTime;
       
    53 	TBool iPrintChunkInfo;
       
    54 	TBool iPrintFileName;
       
    55 	TBool iPrintCommandLine;
       
    56 	TBool iPrintFlags;
       
    57 	TBool iPrintMemoryInfo;
       
    58 	TBool iVerbose;
       
    59 	TBool iHuman;
       
    60 	TBool iExcludeDead;
       
    61 	TBool iOnlyDead;
       
    62 	TBool iAddresses;
       
    63 	TBool iHandleCount;
       
    64 #ifdef FSHELL_MEMORY_ACCESS_SUPPORT
       
    65 	RMemoryAccess iMemoryAccess;
       
    66 #endif
       
    67 	TFullName iProcessName;
       
    68 	TFullName iThreadName;
       
    69 	TFullName iChunkName;
       
    70 	CTextFormatter* iFormatter;
       
    71 	};