sl@0: /* sl@0: * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Name : stdiosesion.h sl@0: * Part of : stdio server sl@0: * To implement the stdio session sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #ifndef __STDIOSESSION_H__ sl@0: #define __STDIOSESSION_H__ sl@0: sl@0: sl@0: #include "inidata.h" //CIniData sl@0: #include "StdioServer.h" //CStdioServer sl@0: #include "streambase.h" //CStreamBase2 sl@0: #include "ReadRequestHandler.h" sl@0: sl@0: sl@0: //ini file path and name sl@0: _LIT(KFileName, "\\system\\data\\config.ini"); sl@0: sl@0: class CStreamFactoryBase; sl@0: sl@0: sl@0: //----------------------------------------------------------------------- sl@0: //Class name: CStdioSession sl@0: //Description: Implement a session for the stdio redirection server. sl@0: // This class contains the handle stream class for a sl@0: // particular media type. The type of media is read from the sl@0: // config.ini file. sl@0: //----------------------------------------------------------------------- sl@0: sl@0: class CStdioSession : public CSession2 sl@0: { sl@0: public: sl@0: static CSession2* NewL(); sl@0: void ServiceL(const RMessage2&); sl@0: virtual void CreateL(); sl@0: ~CStdioSession(); sl@0: sl@0: private: sl@0: CStdioSession() sl@0: { sl@0: // nada sl@0: } sl@0: sl@0: void ReadIniL(CIniData* aIniData,TPtrC& aMedia, sl@0: CStreamBase*& aStream,TBool aIsWrite); sl@0: void ConstructL(); sl@0: CStdioServer& Server(); sl@0: TInt WriteStream(const RMessage2& aMessage); sl@0: CStreamBase* iStreamRead; sl@0: CStreamBase* iStreamWrite; sl@0: CIniData* iIniData; sl@0: CReadRequestHandler* iReadRequestHandler; sl@0: TBuf8<256> iErrInBuf; sl@0: TBuf8<256> iErrOutBuf; sl@0: TBool iIsInputConsole; sl@0: TBool iIsInMediaFile; sl@0: }; sl@0: sl@0: sl@0: #endif //__STDIOSESSION_H__