Debian Codegraph @

src/common/PrinterDriver.h

raw
1 // -*- C++ -*-
2 // $Id: PrinterDriver.h 14976 2011-04-26 15:24:48Z aleksandr $
3
4 // DYMO LabelWriter Drivers
5 // Copyright (C) 2008 Sanford L.P.
6
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 #ifndef h6125e012_f7b5_4377_aa47_e2cdad351cc6
22 #define h6125e012_f7b5_4377_aa47_e2cdad351cc6
23
24 #include "CommonTypedefs.h"
25
26 //using namespace dymo;
27
28 namespace DymoPrinterDriver
29 {
30
31 /**
32 Generic interface to the driver.
33 */
34 class IPrinterDriver
35 {
36 public:
37 virtual void StartDoc() = 0;
38 virtual void EndDoc() = 0;
39
40 virtual void StartPage() = 0;
41 virtual void EndPage() = 0;
42
43 virtual void ProcessRasterLine(const buffer_t& LineBuffer) = 0;
44
45 virtual ~IPrinterDriver() {}
46 };
47
48 /**
49 Provides interface to the environment could be used by IPrinterDriver
50 */
51 class IPrintEnvironment
52 {
53 public:
54 typedef enum
55 {
56 jsOK,
57 jsPaperOut,
58 jsError,
59 jsDeleted,
60 jsPaperSizeError,
61 jsPaperSizeUndefinedError,
62 jsHeadOverheat,
63 jsSlotStatusError,
64 jsBusy
65 } job_status_t;
66
67 virtual void WriteData(const buffer_t& DataBuffer) = 0;
68 virtual void ReadData(buffer_t& DataBuffer) = 0;
69
70 virtual job_status_t GetJobStatus() = 0;
71 virtual void SetJobStatus(job_status_t JobStatus) = 0;
72
73 virtual ~IPrintEnvironment() {}
74 };
75
76 /**
77 * Interface to monitor sending printer data
78 *
79 */
80 class ILanguageMonitor
81 {
82 public:
83 virtual void StartDoc() = 0;
84 virtual void EndDoc() = 0;
85
86 virtual void StartPage() = 0;
87 virtual void EndPage() = 0;
88
89 virtual void ProcessData(const buffer_t& Data) = 0;
90
91 virtual ~ILanguageMonitor() {}
92 };
93
94
95 }; //namespace
96
97 #endif
98
99 /*
100 * End of "$Id: PrinterDriver.h 14976 2011-04-26 15:24:48Z aleksandr $".
101 */