aboutsummaryrefslogtreecommitdiff
path: root/src/message.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.hpp')
-rw-r--r--src/message.hpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/message.hpp b/src/message.hpp
index a834b15..86a455c 100644
--- a/src/message.hpp
+++ b/src/message.hpp
@@ -3,24 +3,23 @@
#include <cstddef>
#include <istream>
-#include <string>
#include <optional>
+#include <string>
namespace wanda
{
+ inline namespace v1
+ {
+ auto constexpr message_argument_hello = "1.0.0";
+ }
-inline namespace v1
-{
-auto constexpr message_argument_hello = "1.0.0";
-}
+ auto constexpr message_source_controller = "C";
+ auto constexpr message_source_daemon = "D";
-auto constexpr message_source_controller = "C";
-auto constexpr message_source_daemon = "D";
+ auto constexpr message_command_hello = "HELLO";
-auto constexpr message_command_hello = "HELLO";
-
-struct message
-{
+ struct message
+ {
explicit operator std::string() const;
std::size_t size() const;
@@ -28,11 +27,11 @@ struct message
std::string source;
std::string command;
std::optional<std::string> argument;
-};
+ };
-std::istream &operator>>(std::istream &in, message &message);
-std::ostream &operator<<(std::ostream &out, message const &message);
+ std::istream & operator>>(std::istream & in, message & message);
+ std::ostream & operator<<(std::ostream & out, message const & message);
-} // namespace wanda
+} // namespace wanda
#endif \ No newline at end of file