1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/backend/inc/StdioServer.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,97 @@
1.4 +/*
1.5 +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* Name : stdioserver.h
1.19 +* Part of : stdio server
1.20 +* To implement the server
1.21 +*
1.22 +*
1.23 +*/
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +#ifndef __STDIOSERVER_H__
1.30 +#define __STDIOSERVER_H__
1.31 +
1.32 +#include <f32file.h>
1.33 +#include <c32comm.h>
1.34 +
1.35 +#include "ShutDown.h"
1.36 +
1.37 +/*
1.38 +Messages supported by server.
1.39 +*/
1.40 +enum TRedirStream
1.41 + {
1.42 + ERead,
1.43 + EWrite,
1.44 + EFlush,
1.45 + ECheckMedia,
1.46 + ENotifyActivity,
1.47 + ECancelNotify,
1.48 + EEcho
1.49 + };
1.50 +
1.51 +
1.52 +/*
1.53 +server name
1.54 +*/
1.55 +_LIT(KServerName,"StdioServer");
1.56 +
1.57 +
1.58 +/*
1.59 +A version must be specified when creating a session with the server
1.60 +*/
1.61 +const TUint KStdioServMajorVersionNumber=1;
1.62 +
1.63 +const TUint KStdioServMinorVersionNumber=0;
1.64 +
1.65 +const TUint KStdioServBuildVersionNumber=0;
1.66 +
1.67 +
1.68 +//-----------------------------------------------------------------------
1.69 +//Class name: CStdioServer
1.70 +//Description: Implements the STDIO redirection server.
1.71 +// This class handles all redirection requests from client
1.72 +// process.
1.73 +//-----------------------------------------------------------------------
1.74 +
1.75 +class CStdioServer : public CServer2
1.76 + {
1.77 +public:
1.78 + static CServer2* NewL();
1.79 + static RFs& FsSession();
1.80 + static RCommServ& CsSession();
1.81 + void AddSession();
1.82 + void RemoveSession();
1.83 + void SetStreamFactory();
1.84 + ~CStdioServer();
1.85 +
1.86 +private:
1.87 + CStdioServer(CActive::TPriority aPriority);
1.88 + CSession2* NewSessionL(const TVersion&,const RMessage2&)const;
1.89 + void ConstructL();
1.90 + static RFs iFs;
1.91 + static RCommServ iCs;
1.92 + TInt iSessionCount;
1.93 + CShutDown *iShutDown;
1.94 + };
1.95 +
1.96 +#endif //__STDIOSERVER_H__
1.97 +
1.98 +
1.99 +
1.100 +