sl@0
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef PRINTERPORT_H
|
sl@0
|
17 |
#define PRINTERPORT_H
|
sl@0
|
18 |
|
sl@0
|
19 |
/**
|
sl@0
|
20 |
* @internalTechnology
|
sl@0
|
21 |
* Internal to Symbian
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
class TOutputHandshake
|
sl@0
|
24 |
{
|
sl@0
|
25 |
public:
|
sl@0
|
26 |
IMPORT_C TOutputHandshake();
|
sl@0
|
27 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
sl@0
|
28 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
sl@0
|
29 |
public:
|
sl@0
|
30 |
TBool iXonXoff;
|
sl@0
|
31 |
TBool iCts;
|
sl@0
|
32 |
TBool iDsr;
|
sl@0
|
33 |
TBool iDcd;
|
sl@0
|
34 |
};
|
sl@0
|
35 |
|
sl@0
|
36 |
/**
|
sl@0
|
37 |
* @internalTechnology
|
sl@0
|
38 |
* Internal to Symbian
|
sl@0
|
39 |
*/
|
sl@0
|
40 |
class TSerialPrinterPortConfig
|
sl@0
|
41 |
{
|
sl@0
|
42 |
public:
|
sl@0
|
43 |
IMPORT_C TSerialPrinterPortConfig();
|
sl@0
|
44 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
sl@0
|
45 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
TBps iRate;
|
sl@0
|
48 |
TDataBits iDataBits;
|
sl@0
|
49 |
TStopBits iStopBits;
|
sl@0
|
50 |
TParity iParity;
|
sl@0
|
51 |
TBool iIgnoreParity;
|
sl@0
|
52 |
TOutputHandshake iHandshake;
|
sl@0
|
53 |
};
|
sl@0
|
54 |
|
sl@0
|
55 |
/**
|
sl@0
|
56 |
* @internalTechnology
|
sl@0
|
57 |
* Internal to Symbian
|
sl@0
|
58 |
*/
|
sl@0
|
59 |
class CCommPrinterPort : public CPrinterPort
|
sl@0
|
60 |
{
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
IMPORT_C static CCommPrinterPort* NewL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
|
sl@0
|
63 |
IMPORT_C ~CCommPrinterPort();
|
sl@0
|
64 |
IMPORT_C void WriteRequest(const TDesC8& aBuf, TRequestStatus& aRequestStatus);
|
sl@0
|
65 |
IMPORT_C void Cancel();
|
sl@0
|
66 |
protected:
|
sl@0
|
67 |
IMPORT_C void ConstructL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
|
sl@0
|
68 |
IMPORT_C CCommPrinterPort();
|
sl@0
|
69 |
protected:
|
sl@0
|
70 |
RCommServ iCommServ;
|
sl@0
|
71 |
RComm iComm;
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
/**
|
sl@0
|
75 |
* @internalTechnology
|
sl@0
|
76 |
* Internal to Symbian
|
sl@0
|
77 |
*/
|
sl@0
|
78 |
class CSerialPrinterPort : public CCommPrinterPort
|
sl@0
|
79 |
{
|
sl@0
|
80 |
public:
|
sl@0
|
81 |
IMPORT_C static CSerialPrinterPort* NewL(const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig);
|
sl@0
|
82 |
IMPORT_C ~CSerialPrinterPort();
|
sl@0
|
83 |
IMPORT_C TSerialPrinterPortConfig Config(); // returns the current port config
|
sl@0
|
84 |
private:
|
sl@0
|
85 |
void ConstructL(const TDesC& aPortName);
|
sl@0
|
86 |
CSerialPrinterPort(const TSerialPrinterPortConfig& aConfig);
|
sl@0
|
87 |
private:
|
sl@0
|
88 |
TSerialPrinterPortConfig iConfig;
|
sl@0
|
89 |
};
|
sl@0
|
90 |
|
sl@0
|
91 |
/**
|
sl@0
|
92 |
* @internalTechnology
|
sl@0
|
93 |
* Internal to Symbian
|
sl@0
|
94 |
*/
|
sl@0
|
95 |
class CParallelPrinterPort : public CCommPrinterPort
|
sl@0
|
96 |
{
|
sl@0
|
97 |
public:
|
sl@0
|
98 |
IMPORT_C static CParallelPrinterPort* NewL(const TDesC& aPortName);
|
sl@0
|
99 |
IMPORT_C ~CParallelPrinterPort();
|
sl@0
|
100 |
private:
|
sl@0
|
101 |
void ConstructL(const TDesC& aPortName);
|
sl@0
|
102 |
CParallelPrinterPort();
|
sl@0
|
103 |
};
|
sl@0
|
104 |
|
sl@0
|
105 |
/**
|
sl@0
|
106 |
* @internalTechnology
|
sl@0
|
107 |
* Internal to Symbian
|
sl@0
|
108 |
*/
|
sl@0
|
109 |
class CIrdaPrinterPort : public CCommPrinterPort
|
sl@0
|
110 |
{
|
sl@0
|
111 |
public:
|
sl@0
|
112 |
IMPORT_C static CIrdaPrinterPort* NewL();
|
sl@0
|
113 |
IMPORT_C ~CIrdaPrinterPort();
|
sl@0
|
114 |
private:
|
sl@0
|
115 |
void ConstructL();
|
sl@0
|
116 |
CIrdaPrinterPort();
|
sl@0
|
117 |
};
|
sl@0
|
118 |
|
sl@0
|
119 |
/**
|
sl@0
|
120 |
* @internalTechnology
|
sl@0
|
121 |
* Internal to Symbian
|
sl@0
|
122 |
*/
|
sl@0
|
123 |
class CEpocConnectPort : public CCommPrinterPort
|
sl@0
|
124 |
{
|
sl@0
|
125 |
public:
|
sl@0
|
126 |
IMPORT_C static CEpocConnectPort* NewL();
|
sl@0
|
127 |
IMPORT_C ~CEpocConnectPort();
|
sl@0
|
128 |
private:
|
sl@0
|
129 |
void ConstructL();
|
sl@0
|
130 |
CEpocConnectPort();
|
sl@0
|
131 |
};
|
sl@0
|
132 |
|
sl@0
|
133 |
#endif // PRINTERPORT_H
|