refactor shared
This commit is contained in:
29
BasaltPresenter/Shared/basalt/deliver.cpp
Normal file
29
BasaltPresenter/Shared/basalt/deliver.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "deliver.hpp"
|
||||
#include <stdexcept>
|
||||
|
||||
namespace basalt::shared::deliver {
|
||||
|
||||
IDeliver::IDeliver() {}
|
||||
|
||||
IDeliver::~IDeliver() {}
|
||||
|
||||
guid::Guid IDeliver::GetGuid() const {
|
||||
throw std::logic_error("unimplemented function");
|
||||
}
|
||||
|
||||
void IDeliver::Startup(DeliverConfig &&config) {
|
||||
if (this->status != DeliverStatus::Ready) throw std::runtime_error("unexpected deliver status");
|
||||
this->config = std::move(config);
|
||||
this->status = DeliverStatus::Running;
|
||||
}
|
||||
|
||||
void IDeliver::Transmit() {
|
||||
if (this->status != DeliverStatus::Running) throw std::runtime_error("unexpected deliver status");
|
||||
}
|
||||
|
||||
void IDeliver::Shutdown() {
|
||||
if (this->status != DeliverStatus::Running) throw std::runtime_error("unexpected deliver status");
|
||||
this->status = DeliverStatus::Stop;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user