1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/printingservices/printerdriversupport/inc/printerport.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,133 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef PRINTERPORT_H
1.20 +#define PRINTERPORT_H
1.21 +
1.22 +/**
1.23 + * @internalTechnology
1.24 + * Internal to Symbian
1.25 + */
1.26 +class TOutputHandshake
1.27 + {
1.28 +public:
1.29 + IMPORT_C TOutputHandshake();
1.30 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.31 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.32 +public:
1.33 + TBool iXonXoff;
1.34 + TBool iCts;
1.35 + TBool iDsr;
1.36 + TBool iDcd;
1.37 + };
1.38 +
1.39 +/**
1.40 + * @internalTechnology
1.41 + * Internal to Symbian
1.42 + */
1.43 +class TSerialPrinterPortConfig
1.44 + {
1.45 +public:
1.46 + IMPORT_C TSerialPrinterPortConfig();
1.47 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.48 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.49 +public:
1.50 + TBps iRate;
1.51 + TDataBits iDataBits;
1.52 + TStopBits iStopBits;
1.53 + TParity iParity;
1.54 + TBool iIgnoreParity;
1.55 + TOutputHandshake iHandshake;
1.56 + };
1.57 +
1.58 +/**
1.59 + * @internalTechnology
1.60 + * Internal to Symbian
1.61 + */
1.62 +class CCommPrinterPort : public CPrinterPort
1.63 + {
1.64 +public:
1.65 + IMPORT_C static CCommPrinterPort* NewL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
1.66 + IMPORT_C ~CCommPrinterPort();
1.67 + IMPORT_C void WriteRequest(const TDesC8& aBuf, TRequestStatus& aRequestStatus);
1.68 + IMPORT_C void Cancel();
1.69 +protected:
1.70 + IMPORT_C void ConstructL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable);
1.71 + IMPORT_C CCommPrinterPort();
1.72 +protected:
1.73 + RCommServ iCommServ;
1.74 + RComm iComm;
1.75 + };
1.76 +
1.77 +/**
1.78 + * @internalTechnology
1.79 + * Internal to Symbian
1.80 + */
1.81 +class CSerialPrinterPort : public CCommPrinterPort
1.82 + {
1.83 +public:
1.84 + IMPORT_C static CSerialPrinterPort* NewL(const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig);
1.85 + IMPORT_C ~CSerialPrinterPort();
1.86 + IMPORT_C TSerialPrinterPortConfig Config(); // returns the current port config
1.87 +private:
1.88 + void ConstructL(const TDesC& aPortName);
1.89 + CSerialPrinterPort(const TSerialPrinterPortConfig& aConfig);
1.90 +private:
1.91 + TSerialPrinterPortConfig iConfig;
1.92 + };
1.93 +
1.94 +/**
1.95 + * @internalTechnology
1.96 + * Internal to Symbian
1.97 + */
1.98 +class CParallelPrinterPort : public CCommPrinterPort
1.99 + {
1.100 +public:
1.101 + IMPORT_C static CParallelPrinterPort* NewL(const TDesC& aPortName);
1.102 + IMPORT_C ~CParallelPrinterPort();
1.103 +private:
1.104 + void ConstructL(const TDesC& aPortName);
1.105 + CParallelPrinterPort();
1.106 + };
1.107 +
1.108 +/**
1.109 + * @internalTechnology
1.110 + * Internal to Symbian
1.111 + */
1.112 +class CIrdaPrinterPort : public CCommPrinterPort
1.113 + {
1.114 +public:
1.115 + IMPORT_C static CIrdaPrinterPort* NewL();
1.116 + IMPORT_C ~CIrdaPrinterPort();
1.117 +private:
1.118 + void ConstructL();
1.119 + CIrdaPrinterPort();
1.120 + };
1.121 +
1.122 +/**
1.123 + * @internalTechnology
1.124 + * Internal to Symbian
1.125 + */
1.126 +class CEpocConnectPort : public CCommPrinterPort
1.127 + {
1.128 +public:
1.129 + IMPORT_C static CEpocConnectPort* NewL();
1.130 + IMPORT_C ~CEpocConnectPort();
1.131 +private:
1.132 + void ConstructL();
1.133 + CEpocConnectPort();
1.134 + };
1.135 +
1.136 +#endif // PRINTERPORT_H