Re-structured project
This commit is contained in:
18
src/interface/IPrinterDriver.hpp
Normal file
18
src/interface/IPrinterDriver.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Bitmap.hpp"
|
||||
#include "libusbwrap/interface/IUsbDevice.hpp"
|
||||
|
||||
namespace ptprnt {
|
||||
|
||||
class IPrinterDriver {
|
||||
public:
|
||||
virtual bool attachUsbDevice(std::shared_ptr<libusbwrap::IUsbDevice> usbHndl) = 0;
|
||||
virtual bool detachUsbDevice() = 0;
|
||||
virtual bool printBitmap(const Bitmap& bitmap) = 0;
|
||||
virtual bool printText(const std::string& text, uint16_t fontSize) = 0;
|
||||
};
|
||||
|
||||
} // namespace ptprnt
|
||||
26
src/interface/IPrinterInfo.hpp
Normal file
26
src/interface/IPrinterInfo.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
namespace ptprnt {
|
||||
|
||||
struct PrinterInfo {
|
||||
std::string_view driverName = "";
|
||||
std::string_view name = "";
|
||||
std::string_view version = "";
|
||||
uint16_t vid = 0x00;
|
||||
uint16_t pid = 0x00;
|
||||
};
|
||||
|
||||
class IPrinterInfo {
|
||||
public:
|
||||
virtual const std::string_view getDriverName() = 0;
|
||||
virtual const std::string_view getName() = 0;
|
||||
virtual const std::string_view getVersion() = 0;
|
||||
virtual const uint16_t getVid() = 0;
|
||||
virtual const uint16_t getPid() = 0;
|
||||
};
|
||||
|
||||
} // namespace ptprnt
|
||||
Reference in New Issue
Block a user