Re-structured project

This commit is contained in:
2023-08-26 11:53:44 +02:00
parent c3915336dd
commit 61e2352a3c
25 changed files with 257 additions and 257 deletions

View 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

View 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