|
1 // iocons.h |
|
2 // |
|
3 // Copyright (c) 2006 - 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 <e32cons.h> |
|
14 #include <fshell/iocli.h> |
|
15 #include <fshell/heaputils.h> |
|
16 using LtkUtils::RAllocatorHelper; |
|
17 |
|
18 #ifdef EKA2 |
|
19 NONSHARABLE_CLASS(CIoConsole) |
|
20 #else |
|
21 class CIoConsole |
|
22 #endif |
|
23 : public CColorConsoleBase |
|
24 { |
|
25 public: |
|
26 CIoConsole(); // Only for use by iocons.dll |
|
27 CIoConsole(RIoConsoleReadHandle& aReadHandle, RIoConsoleWriteHandle& aWriteHandle); // for use by CCommandBase |
|
28 |
|
29 public: // From CConsoleBase. |
|
30 virtual ~CIoConsole(); |
|
31 virtual TInt Create(const TDesC& aTitle, TSize aSize); |
|
32 virtual void Read(TRequestStatus& aStatus); |
|
33 virtual void ReadCancel(); |
|
34 virtual void Write(const TDesC& aDes); |
|
35 virtual TPoint CursorPos() const; |
|
36 virtual void SetCursorPosAbs(const TPoint& aPoint); |
|
37 virtual void SetCursorPosRel(const TPoint& aPoint); |
|
38 virtual void SetCursorHeight(TInt aPercentage); |
|
39 virtual void SetTitle(const TDesC& aTitle); |
|
40 virtual void ClearScreen(); |
|
41 virtual void ClearToEndOfLine(); |
|
42 virtual TSize ScreenSize() const; |
|
43 virtual TKeyCode KeyCode() const; |
|
44 virtual TUint KeyModifiers() const; |
|
45 virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); |
|
46 public: // From CColorConsoleBase |
|
47 virtual void SetTextAttribute(TTextAttribute aAttribute); |
|
48 |
|
49 private: |
|
50 TInt CreateNewConsole(const TDesC& aTitle, TSize aSize); |
|
51 TInt FindClientThreadId(TThreadId& aThreadId); |
|
52 static TBool HeapWalk(TAny* aSelf, RAllocatorHelper::TCellType aCellType, TLinAddr aCellPtr, TInt aCellLength); |
|
53 private: |
|
54 RIoSession iIoSession; |
|
55 RIoConsoleReadHandle iReadHandle; |
|
56 RIoConsoleWriteHandle iWriteHandle; |
|
57 RIoConsole iConsole; |
|
58 TInt iHeapCellCount; |
|
59 TAny* iServerAddress; |
|
60 }; |
|
61 |