1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // EPOC Server for redirecting stdin/stdout/stderr to a stream-like object
15 // (console, file or serial port)
26 // The following functions are defined to replace previous exports so def file
27 // does not need reordering.
28 IMPORT_C void DummyReserved1();
29 IMPORT_C void DummyReserved2();
30 IMPORT_C void DummyReserved3();
31 IMPORT_C void DummyReserved4();
32 IMPORT_C void DummyReserved5();
33 IMPORT_C void DummyReserved6();
34 IMPORT_C void DummyReserved7();
35 IMPORT_C void DummyReserved8();
37 class CStreamFactoryBase2;
41 Redirection server class.
43 This class represents the Redir server itself. It is created through the
44 factory function NewL. It is not intended for user derivation.
49 class CRedirServer2 : public CServer2
55 //mpt - need to explain the magic here!
59 IMPORT_C static CRedirServer2* NewL(CStreamFactoryBase2* aStreamFactory);
60 IMPORT_C void SetStreamFactory(CStreamFactoryBase2* aStreamFactory);
61 virtual ~CRedirServer2();
63 CRedirServer2(CStreamFactoryBase2* aStreamFactory);
64 virtual CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
66 CStreamFactoryBase2* iStreamFactory;
70 Client side session for Redirection server
74 class RRedirSession2 : public RSessionBase
77 IMPORT_C TInt Connect();
78 IMPORT_C void Read(TRequestStatus& aStatus, TDes8& aDes);
79 IMPORT_C void Read(TRequestStatus& aStatus, TDes8& aDes, TInt aLength);
80 IMPORT_C void Write(TRequestStatus& aStatus, const TDesC8& aDes);
81 IMPORT_C void Write(TRequestStatus& aStatus, const TDesC8& aDes, TInt aLength);
82 IMPORT_C void Flush(TRequestStatus& aStatus);
84 //TO DO: do we really need this function??
85 TInt CheckEOF(TRequestStatus& aStatus);