sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef PRINTERPORT_H sl@0: #define PRINTERPORT_H sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class TOutputHandshake sl@0: { sl@0: public: sl@0: IMPORT_C TOutputHandshake(); sl@0: IMPORT_C void InternalizeL(RReadStream& aStream); sl@0: IMPORT_C void ExternalizeL(RWriteStream& aStream) const; sl@0: public: sl@0: TBool iXonXoff; sl@0: TBool iCts; sl@0: TBool iDsr; sl@0: TBool iDcd; sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class TSerialPrinterPortConfig sl@0: { sl@0: public: sl@0: IMPORT_C TSerialPrinterPortConfig(); sl@0: IMPORT_C void InternalizeL(RReadStream& aStream); sl@0: IMPORT_C void ExternalizeL(RWriteStream& aStream) const; sl@0: public: sl@0: TBps iRate; sl@0: TDataBits iDataBits; sl@0: TStopBits iStopBits; sl@0: TParity iParity; sl@0: TBool iIgnoreParity; sl@0: TOutputHandshake iHandshake; sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class CCommPrinterPort : public CPrinterPort sl@0: { sl@0: public: sl@0: IMPORT_C static CCommPrinterPort* NewL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable); sl@0: IMPORT_C ~CCommPrinterPort(); sl@0: IMPORT_C void WriteRequest(const TDesC8& aBuf, TRequestStatus& aRequestStatus); sl@0: IMPORT_C void Cancel(); sl@0: protected: sl@0: IMPORT_C void ConstructL(const TDesC& aCsyName, const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig, const TFifo aFifo = EFifoEnable); sl@0: IMPORT_C CCommPrinterPort(); sl@0: protected: sl@0: RCommServ iCommServ; sl@0: RComm iComm; sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class CSerialPrinterPort : public CCommPrinterPort sl@0: { sl@0: public: sl@0: IMPORT_C static CSerialPrinterPort* NewL(const TDesC& aPortName, const TSerialPrinterPortConfig& aConfig); sl@0: IMPORT_C ~CSerialPrinterPort(); sl@0: IMPORT_C TSerialPrinterPortConfig Config(); // returns the current port config sl@0: private: sl@0: void ConstructL(const TDesC& aPortName); sl@0: CSerialPrinterPort(const TSerialPrinterPortConfig& aConfig); sl@0: private: sl@0: TSerialPrinterPortConfig iConfig; sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class CParallelPrinterPort : public CCommPrinterPort sl@0: { sl@0: public: sl@0: IMPORT_C static CParallelPrinterPort* NewL(const TDesC& aPortName); sl@0: IMPORT_C ~CParallelPrinterPort(); sl@0: private: sl@0: void ConstructL(const TDesC& aPortName); sl@0: CParallelPrinterPort(); sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class CIrdaPrinterPort : public CCommPrinterPort sl@0: { sl@0: public: sl@0: IMPORT_C static CIrdaPrinterPort* NewL(); sl@0: IMPORT_C ~CIrdaPrinterPort(); sl@0: private: sl@0: void ConstructL(); sl@0: CIrdaPrinterPort(); sl@0: }; sl@0: sl@0: /** sl@0: * @internalTechnology sl@0: * Internal to Symbian sl@0: */ sl@0: class CEpocConnectPort : public CCommPrinterPort sl@0: { sl@0: public: sl@0: IMPORT_C static CEpocConnectPort* NewL(); sl@0: IMPORT_C ~CEpocConnectPort(); sl@0: private: sl@0: void ConstructL(); sl@0: CEpocConnectPort(); sl@0: }; sl@0: sl@0: #endif // PRINTERPORT_H