9 #ifndef SERVER_STD_CMDS_IMPL_HPP_
10 #define SERVER_STD_CMDS_IMPL_HPP_
12 #include "events.rad.hpp"
16 #include <rad/exceptions.hpp>
17 #include <rad/smAdapter.hpp>
31 virtual elt::mal::future<std::string>
Exit()
override {
33 auto ev = std::make_shared<Events::Exit>();
35 return ev->GetPayload().GetReplyFuture();
38 virtual elt::mal::future<std::string>
Init()
override {
40 auto ev = std::make_shared<Events::Init>();
42 return ev->GetPayload().GetReplyFuture();
45 virtual elt::mal::future<std::string>
Stop()
override {
47 auto ev = std::make_shared<Events::Stop>();
49 return ev->GetPayload().GetReplyFuture();
52 virtual elt::mal::future<std::string>
Reset()
override {
54 auto ev = std::make_shared<Events::Reset>();
56 return ev->GetPayload().GetReplyFuture();
59 virtual elt::mal::future<std::string>
GetState()
override {
61 auto ev = std::make_shared<Events::GetState>();
63 return ev->GetPayload().GetReplyFuture();
66 virtual elt::mal::future<std::string>
GetStatus()
override {
68 auto ev = std::make_shared<Events::GetStatus>();
70 return ev->GetPayload().GetReplyFuture();
73 virtual elt::mal::future<std::string>
GetVersion()
override {
76 return boost::make_ready_future(std::string(VERSION));
79 virtual elt::mal::future<std::string>
Enable()
override {
81 auto ev = std::make_shared<Events::Enable>();
83 return ev->GetPayload().GetReplyFuture();
86 virtual elt::mal::future<std::string>
Disable()
override {
88 auto ev = std::make_shared<Events::Disable>();
90 return ev->GetPayload().GetReplyFuture();
93 virtual elt::mal::future<std::string>
94 SetLogLevel(
const std::shared_ptr<stdif::LogInfo>& info)
override {
96 auto ev = std::make_shared<Events::SetLogLevel>(info->clone());
98 return ev->GetPayload().GetReplyFuture();
102 rad::SMAdapter& m_sm;
virtual elt::mal::future< std::string > Enable() override
virtual elt::mal::future< std::string > Reset() override
virtual elt::mal::future< std::string > Disable() override
virtual elt::mal::future< std::string > GetState() override
virtual elt::mal::future< std::string > GetStatus() override
virtual elt::mal::future< std::string > SetLogLevel(const std::shared_ptr< stdif::LogInfo > &info) override
virtual elt::mal::future< std::string > Exit() override
StdCmdsImpl(rad::SMAdapter &sm)
virtual elt::mal::future< std::string > Stop() override
virtual elt::mal::future< std::string > Init() override
virtual elt::mal::future< std::string > GetVersion() override
log4cplus::Logger & GetLogger()