williamr@2
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
// Abstract stream classes for Stdio Redirection app
|
williamr@2
|
17 |
//
|
williamr@2
|
18 |
#ifndef _REDIRSTR_H_
|
williamr@2
|
19 |
#define _REDIRSTR_H_
|
williamr@2
|
20 |
|
williamr@2
|
21 |
#include <e32base.h>
|
williamr@2
|
22 |
#include <e32std.h>
|
williamr@2
|
23 |
/**
|
williamr@2
|
24 |
Maximum size of TBuf<> data member in the CStreamFactoryBase2 class.
|
williamr@2
|
25 |
@see CStreamFactoryBase2
|
williamr@2
|
26 |
@publishedPartner
|
williamr@2
|
27 |
@released
|
williamr@2
|
28 |
*/
|
williamr@2
|
29 |
const TInt KMaxStatusTextLength = 128;
|
williamr@2
|
30 |
|
williamr@2
|
31 |
// The following functions are defined to replace previous exports so def file
|
williamr@2
|
32 |
// does not need reordering.
|
williamr@2
|
33 |
IMPORT_C void DummyReserved9();
|
williamr@2
|
34 |
IMPORT_C void DummyReserved10();
|
williamr@2
|
35 |
IMPORT_C void DummyReserved11();
|
williamr@2
|
36 |
|
williamr@2
|
37 |
/**
|
williamr@2
|
38 |
Abstract class that defines stream like objects.
|
williamr@2
|
39 |
|
williamr@2
|
40 |
@publishedPartner
|
williamr@2
|
41 |
@released
|
williamr@2
|
42 |
*/
|
williamr@2
|
43 |
class CStreamBase2 : public CBase
|
williamr@2
|
44 |
{
|
williamr@2
|
45 |
public:
|
williamr@2
|
46 |
virtual void Write(TDes8& aDes) = 0;
|
williamr@2
|
47 |
virtual void Read(const RMessage2& aMessage) = 0;
|
williamr@2
|
48 |
protected:
|
williamr@2
|
49 |
TBuf8<256> iBuf; // buffer for holding stdin characters
|
williamr@2
|
50 |
IMPORT_C void CompleteRead(const RMessage2 &aMessage);
|
williamr@2
|
51 |
};
|
williamr@2
|
52 |
|
williamr@2
|
53 |
/**
|
williamr@2
|
54 |
Abstract Factory class for creating stream-like classes.
|
williamr@2
|
55 |
|
williamr@2
|
56 |
@publishedPartner
|
williamr@2
|
57 |
@released
|
williamr@2
|
58 |
*/
|
williamr@2
|
59 |
class CStreamFactoryBase2 : public CBase
|
williamr@2
|
60 |
{
|
williamr@2
|
61 |
public:
|
williamr@2
|
62 |
virtual CStreamBase2* GetStream() = 0;
|
williamr@2
|
63 |
virtual void Configure() = 0;
|
williamr@2
|
64 |
IMPORT_C virtual const TDesC& GetStatus() const;
|
williamr@2
|
65 |
protected:
|
williamr@2
|
66 |
IMPORT_C void AppendToStatus(const TDesC& aMsg);
|
williamr@2
|
67 |
private:
|
williamr@2
|
68 |
TBuf<KMaxStatusTextLength> iStatusMsg;
|
williamr@2
|
69 |
};
|
williamr@2
|
70 |
|
williamr@2
|
71 |
|
williamr@2
|
72 |
#endif
|