mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-25 14:26:28 +00:00
* Move default parameter handling
This commit is contained in:
@@ -73,6 +73,27 @@ bool SCSIPrinter::Init(const param_map& params)
|
||||
return true;
|
||||
}
|
||||
|
||||
void SCSIPrinter::CleanUp()
|
||||
{
|
||||
PrimaryDevice::CleanUp();
|
||||
|
||||
if (out.is_open()) {
|
||||
out.close();
|
||||
|
||||
error_code error;
|
||||
remove(path(filename), error);
|
||||
|
||||
filename = "";
|
||||
}
|
||||
}
|
||||
|
||||
param_map SCSIPrinter::GetDefaultParams() const
|
||||
{
|
||||
return {
|
||||
{ "cmd", "lp -oraw %f" }
|
||||
};
|
||||
}
|
||||
|
||||
void SCSIPrinter::TestUnitReady()
|
||||
{
|
||||
// The printer is always ready
|
||||
@@ -164,17 +185,3 @@ bool SCSIPrinter::WriteByteSequence(span<const uint8_t> buf)
|
||||
|
||||
return !out.fail();
|
||||
}
|
||||
|
||||
void SCSIPrinter::CleanUp()
|
||||
{
|
||||
PrimaryDevice::CleanUp();
|
||||
|
||||
if (out.is_open()) {
|
||||
out.close();
|
||||
|
||||
error_code error;
|
||||
remove(path(filename), error);
|
||||
|
||||
filename = "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user