equal
deleted
inserted
replaced
|
1 // console.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 |
|
14 #ifndef __CONSOLE_H__ |
|
15 #define __CONSOLE_H__ |
|
16 |
|
17 #include <e32base.h> |
|
18 #include <fshell/iocli.h> |
|
19 |
|
20 |
|
21 class MConsoleObserver |
|
22 { |
|
23 public: |
|
24 virtual void CoHandleKey(TUint aKeyCode, TUint aModifiers) = 0; |
|
25 virtual void CoHandleError(TInt aError) = 0; |
|
26 }; |
|
27 |
|
28 |
|
29 class CConsoleReader : public CActive |
|
30 { |
|
31 public: |
|
32 static CConsoleReader* NewL(RIoConsoleReadHandle& aStdin, MConsoleObserver& aObserver); |
|
33 ~CConsoleReader(); |
|
34 private: |
|
35 CConsoleReader(RIoConsoleReadHandle& aStdin, MConsoleObserver& aObserver); |
|
36 void Queue(); |
|
37 private: // From CActive. |
|
38 virtual void RunL(); |
|
39 virtual void DoCancel(); |
|
40 private: |
|
41 RIoConsoleReadHandle& iStdin; |
|
42 MConsoleObserver& iObserver; |
|
43 TBool iRawRead; |
|
44 TBuf<1> iRawReadBuf; |
|
45 }; |
|
46 |
|
47 |
|
48 #endif // __CONSOLE_H__ |