1.1 --- a/epoc32/include/pdrport.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/pdrport.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,161 @@
1.4 -pdrport.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef PDRPORT_H
1.21 +#define PDRPORT_H
1.22 +
1.23 +#include <e32std.h>
1.24 +#include <c32comm.h>
1.25 +#include <gdi.h>
1.26 +#include <s32file.h>
1.27 +
1.28 +
1.29 +/**
1.30 + @publishedAll
1.31 + @released
1.32 + */
1.33 +class CFilePrinterPort : public CPrinterPort
1.34 + {
1.35 +public:
1.36 + IMPORT_C static CFilePrinterPort* NewL(const TDesC& aFileName);
1.37 + IMPORT_C ~CFilePrinterPort();
1.38 + void WriteRequest(const TDesC8& aBuf,TRequestStatus& aRequestStatus);
1.39 + void Cancel();
1.40 + inline const TDesC& FileName() { return iFileName; }
1.41 +private:
1.42 + void ConstructL();
1.43 + CFilePrinterPort(const TDesC& aFileName);
1.44 +private:
1.45 + RFs iFs;
1.46 + TFileName iFileName;
1.47 + RFile iFile;
1.48 + TBool iCancelled;
1.49 + };
1.50 +
1.51 +/**
1.52 + * @internalTechnology
1.53 + * Internal to Symbian
1.54 + */
1.55 +class TOutputHandshake
1.56 + {
1.57 +public:
1.58 + IMPORT_C TOutputHandshake();
1.59 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.60 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.61 +public:
1.62 + TBool iXonXoff;
1.63 + TBool iCts;
1.64 + TBool iDsr;
1.65 + TBool iDcd;
1.66 + };
1.67 +
1.68 +/**
1.69 + * @internalTechnology
1.70 + * Internal to Symbian
1.71 + */
1.72 +class TSerialPrinterPortConfig
1.73 + {
1.74 +public:
1.75 + IMPORT_C TSerialPrinterPortConfig();
1.76 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.77 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.78 +public:
1.79 + TBps iRate;
1.80 + TDataBits iDataBits;
1.81 + TStopBits iStopBits;
1.82 + TParity iParity;
1.83 + TBool iIgnoreParity;
1.84 + TOutputHandshake iHandshake;
1.85 + };
1.86 +
1.87 +/**
1.88 + * @internalTechnology
1.89 + * Internal to Symbian
1.90 + */
1.91 +class CCommPrinterPort : public CPrinterPort
1.92 + {
1.93 +public:
1.94 + IMPORT_C static CCommPrinterPort* NewL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
1.95 + IMPORT_C ~CCommPrinterPort();
1.96 + IMPORT_C void WriteRequest(const TDesC8& aBuf, TRequestStatus& aRequestStatus);
1.97 + IMPORT_C void Cancel();
1.98 +protected:
1.99 + IMPORT_C void ConstructL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
1.100 + IMPORT_C CCommPrinterPort();
1.101 +protected:
1.102 + RCommServ iCommServ;
1.103 + RComm iComm;
1.104 + };
1.105 +
1.106 +/**
1.107 + * @internalTechnology
1.108 + * Internal to Symbian
1.109 + */
1.110 +class CSerialPrinterPort : public CCommPrinterPort
1.111 + {
1.112 +public:
1.113 + IMPORT_C static CSerialPrinterPort* NewL(const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig);
1.114 + IMPORT_C ~CSerialPrinterPort();
1.115 + IMPORT_C TSerialPrinterPortConfig Config(); // returns the current port config
1.116 +private:
1.117 + void ConstructL(const TDesC& aPortName);
1.118 + CSerialPrinterPort(const TSerialPrinterPortConfig& aConfig);
1.119 +private:
1.120 + TSerialPrinterPortConfig iConfig;
1.121 + };
1.122 +
1.123 +/**
1.124 + * @internalTechnology
1.125 + * Internal to Symbian
1.126 + */
1.127 +class CParallelPrinterPort : public CCommPrinterPort
1.128 + {
1.129 +public:
1.130 + IMPORT_C static CParallelPrinterPort* NewL(const TDesC& aPortName);
1.131 + IMPORT_C ~CParallelPrinterPort();
1.132 +private:
1.133 + void ConstructL(const TDesC& aPortName);
1.134 + CParallelPrinterPort();
1.135 + };
1.136 +
1.137 +/**
1.138 + * @internalTechnology
1.139 + * Internal to Symbian
1.140 + */
1.141 +class CIrdaPrinterPort : public CCommPrinterPort
1.142 + {
1.143 +public:
1.144 + IMPORT_C static CIrdaPrinterPort* NewL();
1.145 + IMPORT_C ~CIrdaPrinterPort();
1.146 +private:
1.147 + void ConstructL();
1.148 + CIrdaPrinterPort();
1.149 + };
1.150 +
1.151 +/**
1.152 + * @internalTechnology
1.153 + * Internal to Symbian
1.154 + */
1.155 +class CEpocConnectPort : public CCommPrinterPort
1.156 + {
1.157 +public:
1.158 + IMPORT_C static CEpocConnectPort* NewL();
1.159 + IMPORT_C ~CEpocConnectPort();
1.160 +private:
1.161 + void ConstructL();
1.162 + CEpocConnectPort();
1.163 + };
1.164 +
1.165 +#endif