17 #ifndef LIB_WINSS_CONTROL_HPP_ 18 #define LIB_WINSS_CONTROL_HPP_ 49 virtual const std::string&
GetName()
const;
80 static const int kTimeoutExitCode;
82 static const char kTimeoutGroup[];
86 std::map<std::string, winss::NotOwningPtr<ControlItem>> items;
87 std::set<std::string> ready;
90 const int timeout_exit_code;
91 const bool finish_all;
104 DWORD timeout = INFINITE,
int timeout_exit_code = 1,
105 bool finish_all =
true);
114 bool IsStarted()
const;
128 void Ready(std::string
name);
135 void Remove(std::string name);
155 static const int kNoSendExitCode;
159 const std::vector<char>& commands;
160 bool written =
false;
166 const std::vector<char>& commands, std::string
name);
199 bool WriteComplete();
224 virtual bool IsEnabled() = 0;
231 virtual bool CanStart() = 0;
243 virtual bool HandleReceived(
const std::vector<char>& message) = 0;
264 bool complete =
false;
304 bool Received(
const std::vector<char>& message);
320 #endif // LIB_WINSS_CONTROL_HPP_ virtual ~ControlItem()
Default destructor.
Definition: control.hpp:69
Inbound control item.
Definition: control.hpp:256
ControlItem(std::string name)
Constructs a control item with the given name.
Definition: control.cpp:24
virtual ~InboundControlItemListener()
Default destructor.
Definition: control.hpp:248
A listener for pipe client received data events.
Definition: pipe_client.hpp:239
A listener for inbound control item events.
Definition: control.hpp:217
Outbound control item.
Definition: control.hpp:151
Base class for inbound and outbound control item.
Definition: control.hpp:32
Definition: case_ignore.hpp:23
virtual void Init()
Initializes the control item.
Definition: control.hpp:54
virtual void Start()
Signals the start of either sending events or listening to events.
Definition: control.hpp:59
const std::string name
The name of the control item.
Definition: control.hpp:34
virtual const std::string & GetName() const
Gets the name of the control item.
Definition: control.cpp:26
Orchestrates control.
Definition: control.hpp:78
A listener for pipe client send complete events.
Definition: pipe_client.hpp:223
virtual void HandleConnected()
Call back for connected event.
Definition: control.hpp:236
virtual bool Completed() const =0
Signals that the events have been sent or all have been received.