2 * lpr for cygwin/windows
4 * Copyright (C) 2000-2003 Rick Rankin
5 * http://www.cygwin.com/ml/cygwin/2000-07/msg00320.html
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation in version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #if !defined(Printer_hh)
33 #include "src/lpr/PrinterException.hh"
40 Printer(const string &name, bool debugFlag)
41 throw(PrinterException);
46 throw(PrinterException);
48 throw(PrinterException);
50 throw(PrinterException);
51 bool getRawFlag() const;
52 void print(istream & in, const string & docName)
53 throw(PrinterException);
54 void put(unsigned char ch)
55 throw(PrinterException);
56 void setRawFlag(bool flag);
57 void startDoc(const string & docName)
58 throw(PrinterException);
60 throw(PrinterException);
61 void write(unsigned char *buf, unsigned int size)
62 throw(PrinterException);
66 typedef vector<PRINTER_INFO_5> PrinterList;
68 // Don't want copy construction or assignment.
69 Printer(const Printer & rhs);
70 Printer & operator = (const Printer & rhs);
72 // Enumerate the existing printers.
73 PrinterList enumPrinters(DWORD flags, LPTSTR name)
74 throw(PrinterException);
76 // Map a port name (lpt1, etc) to a device name.
78 throw(PrinterException);
80 // Open the printer if it's not already open.
82 throw(PrinterException);
88 unsigned char * m_buffer;
89 unsigned int m_bufferSize;
90 unsigned int m_bufferIndex;
94 #endif /* Printer_hh */