First public contribution.
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : consolestream.h
16 * Part of : stdio server
17 * To handle console read and write
25 #ifndef _CONSOLESTREAM_H_
26 #define _CONSOLESTREAM_H_
28 #include "streambase.h" //CStreamBase
29 #include "ReadRequestHandler.h" //MRead and CReadRequestHandler
35 //Enumerations for the console echo - server side
38 EOff = 0, //Turn Off the echo
39 EOn = 1, //Turn On the echo
40 EPrintValid = 33, //Printable ascii character set <33-126>
44 //-----------------------------------------------------------------------
45 //Class name: CConsoleStream
46 //Description: This class represents the console stream abstraction.
47 // It is created through the factory class CConsoleStreamFactory
48 //-----------------------------------------------------------------------
49 class CConsoleStream : public CStreamBase
52 static CConsoleStream* NewL(TInt aWidth, TInt aHeight);
53 virtual void WriteL(TDes8& aDes);
54 virtual void Read(TRequestStatus& aStatus, const TInt aLength);
56 virtual void ReadCancel();
58 TInt SetEcho(TUint8 aEcho);
59 TStreamType Type() { return EConsole;}
63 void ConstructL(TSize aConsoleSize);
64 CConsoleBase* iConsole;
66 TUint8 iEchoVal; //decides what to echo
67 void HandleBuf(TKeyCode & key);
71 #endif //_CONSOLESTREAM_H_