diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-05-17 17:58:38 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-05-17 17:58:38 +0200 |
| commit | 577fc0845718ed8ad5bebf02a277c0579a817f77 (patch) | |
| tree | 3d1cdc53c426a0ba60a7996619a7b787850bb3b3 /source/apps/include/wanda/wandac | |
| parent | de5bf7ca3b7a2bf6be35b86486b00dc6a071b950 (diff) | |
| download | wanda-577fc0845718ed8ad5bebf02a277c0579a817f77.tar.xz wanda-577fc0845718ed8ad5bebf02a277c0579a817f77.zip | |
Diffstat (limited to 'source/apps/include/wanda/wandac')
| -rw-r--r-- | source/apps/include/wanda/wandac/cli.hpp | 27 | ||||
| -rw-r--r-- | source/apps/include/wanda/wandac/listener.hpp | 26 |
2 files changed, 53 insertions, 0 deletions
diff --git a/source/apps/include/wanda/wandac/cli.hpp b/source/apps/include/wanda/wandac/cli.hpp new file mode 100644 index 0000000..c04b138 --- /dev/null +++ b/source/apps/include/wanda/wandac/cli.hpp @@ -0,0 +1,27 @@ +#ifndef WANDA_APP_WANDAC_CLI_HPP +#define WANDA_APP_WANDAC_CLI_HPP + +#include <lyra/args.hpp> +#include <lyra/cli_parser.hpp> + +#include <iosfwd> +#include <string> + +namespace wandac +{ + + struct cli + { + auto parse(lyra::args arguments, std::ostream & error_stream) -> bool; + auto print_usage(std::ostream & output_stream) -> void; + + std::string command{}; + bool help{}; + + private: + lyra::cli_parser parser{}; + }; + +} // namespace wandac + +#endif
\ No newline at end of file diff --git a/source/apps/include/wanda/wandac/listener.hpp b/source/apps/include/wanda/wandac/listener.hpp new file mode 100644 index 0000000..28b0cfc --- /dev/null +++ b/source/apps/include/wanda/wandac/listener.hpp @@ -0,0 +1,26 @@ +#ifndef WANDA_APP_WANDAC_LISTENER_HPP +#define WANDA_APP_WANDAC_LISTENER_HPP + +#include "wanda/wandac/cli.hpp" + +#include <wanda/control/commander.hpp> + +#include <boost/asio/io_context.hpp> + +namespace wandac +{ + + struct listener : wanda::control::commander::listener + { + listener(wandac::cli const & cli, boost::asio::io_context & service); + + auto on_connected(wanda::control::commander & commander) -> void override ; + + private: + wandac::cli const & m_cli; + boost::asio::io_context & m_service; + }; + +} // namespace wandac + +#endif
\ No newline at end of file |
