1
0

refactor shared

This commit is contained in:
2026-01-08 19:23:19 +08:00
parent 07cc58fb36
commit 64368b7837
23 changed files with 400 additions and 234 deletions

View 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;
}
}