author | Tom Sutcliffe <thomas.sutcliffe@accenture.com> |
Thu, 04 Nov 2010 23:22:39 +0000 | |
changeset 100 | 706c7a69e448 |
parent 30 | 35cb3fe43f60 |
permissions | -rw-r--r-- |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
1 |
// consoleextensions.h |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
2 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
3 |
// Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
4 |
// This component and the accompanying materials are made available |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
5 |
// under the terms of the "Eclipse Public License v1.0" |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
6 |
// which accompanies this distribution, and is available |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
8 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
9 |
// Initial Contributors: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
10 |
// Accenture - Initial contribution |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
11 |
// |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
12 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
13 |
#ifndef __CONSOLEEXTENSIONS_H__ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
14 |
#define __CONSOLEEXTENSIONS_H__ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
15 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
16 |
#include <e32base.h> |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
17 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
18 |
class ConsoleMode |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
19 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
20 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
21 |
enum TMode |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
22 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
23 |
EBinary, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
24 |
EText, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
25 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
26 |
static const TUint KSetConsoleModeExtension = 0x10285e15; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
27 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
28 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
29 |
A console implementation that does not support different mode or a CBase derived class |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
30 |
that does not derive from CConsoleBase will return KErrExtensionNotSupported if passed |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
31 |
into this function. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
32 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
33 |
static inline TInt Set(CBase* aConsole, TMode aMode); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
34 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
35 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
36 |
class UnderlyingConsole |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
37 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
38 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
39 |
static const TUint KSetUnderlyingConsoleExtension = 0x10287199; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
40 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
41 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
42 |
Set the underlying console of another console. The underlying console may be used during construction |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
43 |
of the actual console to display information or error messages, such as the IP address to connect to |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
44 |
in the case of a TCP console implementation. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
45 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
46 |
Note, for consoles loaded within the IO server, the underlying console is write only. Attempting to |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
47 |
read from it will cause a panic. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
48 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
49 |
static inline TInt Set(CBase* aConsole, CConsoleBase* aUnderlyingConsole); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
50 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
51 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
52 |
class ConsoleAttributes |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
53 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
54 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
55 |
// Note these are also defined in win32cons.h |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
56 |
enum TAttribute |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
57 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
58 |
ENone = 0x0001, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
59 |
EBold = 0x0002, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
60 |
EUnderscore = 0x0004, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
61 |
EBlink = 0x0008, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
62 |
EInverse = 0x0010, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
63 |
EConceal = 0x0020 |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
64 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
65 |
enum TColor |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
66 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
67 |
EBlack, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
68 |
ERed, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
69 |
EGreen, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
70 |
EYellow, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
71 |
EBlue, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
72 |
EMagenta, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
73 |
ECyan, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
74 |
EWhite, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
75 |
EReset, |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
76 |
EUnchanged |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
77 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
78 |
class TAttributes |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
79 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
80 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
81 |
inline TAttributes(TUint aAttributes, TColor aForegroundColor = EUnchanged, TColor aBackgroundColor = EUnchanged); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
82 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
83 |
TUint iAttributes; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
84 |
TColor iForegroundColor; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
85 |
TColor iBackgroundColor; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
86 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
87 |
static const TUint KSetConsoleAttributesExtension = 0x10286B6E; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
88 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
89 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
90 |
A console implementation that does not support different mode or a CBase derived class |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
91 |
that does not derive from CConsoleBase will return KErrExtensionNotSupported if passed |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
92 |
into this function. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
93 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
94 |
static inline TInt Set(CBase* aConsole, const TAttributes& aAttributes); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
95 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
96 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
97 |
class LazyConsole |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
98 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
99 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
100 |
static const TUint KLazyConsoleExtension = 0x1028719e; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
101 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
102 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
103 |
Returns true if the console is lazy. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
104 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
105 |
static inline TBool IsLazy(CBase* aConsole); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
106 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
107 |
Returns true if he console is lazy, AND it's been constructed. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
108 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
109 |
static inline TBool IsConstructed(CBase* aConsole); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
110 |
}; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
111 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
112 |
class ConsoleStdErr |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
113 |
{ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
114 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
115 |
static const TInt KWriteStdErrConsoleExtension = 0x10286aaa; |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
116 |
public: |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
117 |
/** |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
118 |
Write to StdErr of the underlying console if the console supports this. |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
119 |
*/ |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
120 |
static inline TInt Write(CBase* aConsole, const TDesC& aDes); |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
121 |
}; |
30
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
122 |
|
100
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
123 |
class ConsoleSize |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
124 |
{ |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
125 |
public: |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
126 |
static const TInt KConsoleSizeReportedCorrectlyExtension = 0x10286F75; |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
127 |
static const TInt KConsoleSizeNotifyChangedExtension = 0x10286F78; |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
128 |
public: |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
129 |
/** |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
130 |
Returns true if the console is known to correctly report its size (and thus that the console size detect routines |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
131 |
in iosrv do not need to be run). Only needed because econs.dll (the text windowserver one, which we can't change) |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
132 |
doesn't. |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
133 |
*/ |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
134 |
static inline TBool ReportedCorrectly(CBase* aConsole); |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
135 |
|
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
136 |
/** |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
137 |
If not supported, aStatus is completed with KErrExtensionNotSupported |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
138 |
Only one notification can be outstanding on a given console at a given time. |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
139 |
*/ |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
140 |
static inline void NotifySizeChanged(CBase* aConsole, TRequestStatus& aStatus); |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
141 |
static inline void CancelNotifySizeChanged(CBase* aConsole); |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
142 |
}; |
706c7a69e448
Migrated from FCL: foreach bugfix, ConsoleSize::ReportedCorrectly() and ConsoleSize::NotifySizeChanged() console extensions
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
30
diff
changeset
|
143 |
|
30
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
144 |
// BC on this interface is not guaranteed - only for use by things inside /fshell/plugins/consoles |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
145 |
class MIosrvConsoleHelper |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
146 |
{ |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
147 |
protected: |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
148 |
enum TVerbosity |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
149 |
{ |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
150 |
EInformation, |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
151 |
EError, |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
152 |
EDebug, |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
153 |
}; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
154 |
IMPORT_C void Message(TVerbosity aVerbosity, TRefByValue<const TDesC> aFmt, ...); |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
155 |
IMPORT_C TBool Debug() const; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
156 |
IMPORT_C void SetDebug(TBool aDebug); |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
157 |
IMPORT_C void HandleConsoleCreationError(const TDesC& aConsoleName, TInt aError); |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
158 |
IMPORT_C void CleanupUnderlyingConsole(); |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
159 |
IMPORT_C CConsoleBase* UnderlyingConsole() const; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
160 |
|
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
161 |
IMPORT_C TInt MIosrvConsoleHelper_Extension(TUint aExtensionId, TAny*& a0, TAny* a1); |
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
162 |
|
30
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
163 |
IMPORT_C virtual TInt WriteStdErr(const TDesC& aDes); // Default returns KErrExtensionNotSupported |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
164 |
|
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
165 |
private: |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
166 |
TBool iDebug; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
167 |
CConsoleBase* iUnderlyingConsole; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
168 |
}; |
35cb3fe43f60
Refactored CVtcConsoleBase::Message() into separate helper for use by non-VT100 consoles
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
0
diff
changeset
|
169 |
|
0
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
170 |
#include <fshell/consoleextensions.inl> |
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
171 |
|
7f656887cf89
First submission to Symbian Foundation staging server.
Tom Sutcliffe <thomas.sutcliffe@accenture.com>
parents:
diff
changeset
|
172 |
#endif //__CONSOLEEXTENSIONS_H__ |