Complete implementation of printer serial transport

- Allow to configure the baudrate (it is set by the printer settings,
  but the transport didn't care)
- Implement reading from the serial port (some printers will need us to
  poll the status and the like, as there is usually no hardware flow
  control)

Change-Id: I70ba2566595d5dfa5eda3d518614db6514cb2398
This commit is contained in:
Adrien Destugues
2018-06-05 21:44:14 +00:00
committed by waddlesplash
parent 4f059c1fc5
commit 1407e6d7b1
5 changed files with 97 additions and 43 deletions
@@ -54,6 +54,11 @@ protected:
void WriteSpoolChar(char c)
throw (TransportException);
void ReadSpoolData(void* buffer, size_t size)
throw (TransportException);
int ReadSpoolChar()
throw (TransportException);
static void ConvertToRGB24(const void* src, void* dst, int width,
color_space cs);
static void ConvertToGray(const void* src, void* dst, int width,
+2
View File
@@ -39,6 +39,8 @@ public:
void Write(const void *buffer, size_t size)
throw (TransportException);
void Read(void *buffer, size_t size)
throw (TransportException);
bool CheckAbort() const;
bool IsPrintToFileCanceled() const;
const string& LastError() const;