support specifying pos printer
This commit is contained in:
parent
4cd0b42072
commit
98ba6db5a3
2 changed files with 25 additions and 3 deletions
|
@ -16,10 +16,16 @@ struct SupportedPrinters {
|
|||
};
|
||||
};
|
||||
|
||||
struct PrinterDevice {
|
||||
int idVendor{};
|
||||
int idProduct{};
|
||||
};
|
||||
|
||||
class PosPrinter
|
||||
{
|
||||
public:
|
||||
PosPrinter();
|
||||
PosPrinter(const PrinterDevice& printerDevice);
|
||||
~PosPrinter();
|
||||
void write(const std::string& text);
|
||||
void printHeader();
|
||||
|
@ -43,6 +49,7 @@ class PosPrinter
|
|||
libusb_context* contextPtr_{};
|
||||
libusb_device_handle* devicePtr_{};
|
||||
SupportedPrinters supportedPrinters_;
|
||||
PrinterDevice printerDevice_;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue