kima2/src/printer/posprinter.h

28 lines
499 B
C
Raw Normal View History

2018-08-05 21:51:30 +02:00
#ifndef POS_PRINTER_H
#define POS_PRINTER_H
#include <memory>
#include <libusb-1.0/libusb.h>
2018-08-06 09:59:06 +02:00
struct SupportedPrinters {
std::array<std::pair<int, int>, 2> models{
// {Vendor ID, Model ID}
std::make_pair(0x0456, 0x0808),
std::make_pair(0x0416, 0x5011),
};
};
2018-08-05 21:51:30 +02:00
class PosPrinter
{
public:
PosPrinter();
~PosPrinter();
2018-08-06 09:59:06 +02:00
private:
2018-08-05 21:51:30 +02:00
libusb_context* contextPtr_{};
libusb_device_handle* devicePtr_{};
2018-08-06 09:59:06 +02:00
SupportedPrinters supportedPrinters_;
2018-08-05 21:51:30 +02:00
};
#endif