1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
42 TFileName iFileName; |
45 TFileName iFileName; |
43 RFile iFile; |
46 RFile iFile; |
44 TBool iCancelled; |
47 TBool iCancelled; |
45 }; |
48 }; |
46 |
49 |
47 /** |
|
48 * @internalTechnology |
|
49 * Internal to Symbian |
|
50 */ |
|
51 class TOutputHandshake |
|
52 { |
|
53 public: |
|
54 IMPORT_C TOutputHandshake(); |
|
55 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
56 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
57 public: |
|
58 TBool iXonXoff; |
|
59 TBool iCts; |
|
60 TBool iDsr; |
|
61 TBool iDcd; |
|
62 }; |
|
63 |
|
64 /** |
|
65 * @internalTechnology |
|
66 * Internal to Symbian |
|
67 */ |
|
68 class TSerialPrinterPortConfig |
|
69 { |
|
70 public: |
|
71 IMPORT_C TSerialPrinterPortConfig(); |
|
72 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
73 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
74 public: |
|
75 TBps iRate; |
|
76 TDataBits iDataBits; |
|
77 TStopBits iStopBits; |
|
78 TParity iParity; |
|
79 TBool iIgnoreParity; |
|
80 TOutputHandshake iHandshake; |
|
81 }; |
|
82 |
|
83 /** |
|
84 * @internalTechnology |
|
85 * Internal to Symbian |
|
86 */ |
|
87 class CCommPrinterPort : public CPrinterPort |
|
88 { |
|
89 public: |
|
90 IMPORT_C static CCommPrinterPort* NewL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable); |
|
91 IMPORT_C ~CCommPrinterPort(); |
|
92 IMPORT_C void WriteRequest(const TDesC8& aBuf, TRequestStatus& aRequestStatus); |
|
93 IMPORT_C void Cancel(); |
|
94 protected: |
|
95 IMPORT_C void ConstructL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable); |
|
96 IMPORT_C CCommPrinterPort(); |
|
97 protected: |
|
98 RCommServ iCommServ; |
|
99 RComm iComm; |
|
100 }; |
|
101 |
|
102 /** |
|
103 * @internalTechnology |
|
104 * Internal to Symbian |
|
105 */ |
|
106 class CSerialPrinterPort : public CCommPrinterPort |
|
107 { |
|
108 public: |
|
109 IMPORT_C static CSerialPrinterPort* NewL(const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig); |
|
110 IMPORT_C ~CSerialPrinterPort(); |
|
111 IMPORT_C TSerialPrinterPortConfig Config(); // returns the current port config |
|
112 private: |
|
113 void ConstructL(const TDesC& aPortName); |
|
114 CSerialPrinterPort(const TSerialPrinterPortConfig& aConfig); |
|
115 private: |
|
116 TSerialPrinterPortConfig iConfig; |
|
117 }; |
|
118 |
|
119 /** |
|
120 * @internalTechnology |
|
121 * Internal to Symbian |
|
122 */ |
|
123 class CParallelPrinterPort : public CCommPrinterPort |
|
124 { |
|
125 public: |
|
126 IMPORT_C static CParallelPrinterPort* NewL(const TDesC& aPortName); |
|
127 IMPORT_C ~CParallelPrinterPort(); |
|
128 private: |
|
129 void ConstructL(const TDesC& aPortName); |
|
130 CParallelPrinterPort(); |
|
131 }; |
|
132 |
|
133 /** |
|
134 * @internalTechnology |
|
135 * Internal to Symbian |
|
136 */ |
|
137 class CIrdaPrinterPort : public CCommPrinterPort |
|
138 { |
|
139 public: |
|
140 IMPORT_C static CIrdaPrinterPort* NewL(); |
|
141 IMPORT_C ~CIrdaPrinterPort(); |
|
142 private: |
|
143 void ConstructL(); |
|
144 CIrdaPrinterPort(); |
|
145 }; |
|
146 |
|
147 /** |
|
148 * @internalTechnology |
|
149 * Internal to Symbian |
|
150 */ |
|
151 class CEpocConnectPort : public CCommPrinterPort |
|
152 { |
|
153 public: |
|
154 IMPORT_C static CEpocConnectPort* NewL(); |
|
155 IMPORT_C ~CEpocConnectPort(); |
|
156 private: |
|
157 void ConstructL(); |
|
158 CEpocConnectPort(); |
|
159 }; |
|
160 |
|
161 #endif |
50 #endif |