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