equal
deleted
inserted
replaced
|
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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // EPOC Server providing access to Win32 stdin/stdout/stderr |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32std.h> |
|
19 #include <e32base.h> |
|
20 #include <estw32.h> |
|
21 /** |
|
22 @internalComponent |
|
23 */ |
|
24 enum TWin32Stream { |
|
25 EWin32Read, |
|
26 EWin32Write, |
|
27 EWin32Flush |
|
28 }; |
|
29 |
|
30 // |
|
31 class CWin32Stream |
|
32 /** |
|
33 @internalComponent |
|
34 */ |
|
35 { |
|
36 public: |
|
37 static TInt StreamName(TInt aStream, TDes& aBuf); |
|
38 static void StartServer(TInt aStream); |
|
39 static TInt ThreadFunction(TAny* aPtr); |
|
40 private: |
|
41 TInt Init(TInt aStream, const TDesC& aStreamName); |
|
42 void HandleMessage(); |
|
43 TInt ReadStream(RMessage2& aMessage); |
|
44 TInt WriteStream(RMessage2& aMessage); |
|
45 void FlushStream(); |
|
46 TInt MapWin32Error(TInt aDefault); |
|
47 |
|
48 RServer2 iServer; |
|
49 RMessage2 iMessage; |
|
50 TAny* iHandle; |
|
51 TAny* iLogHandle; // used to log a copy of stream output, for debug purposes |
|
52 }; |
|
53 |
|
54 // |