diff options
Diffstat (limited to 'include/ingen/Message.hpp')
-rw-r--r-- | include/ingen/Message.hpp | 103 |
1 files changed, 43 insertions, 60 deletions
diff --git a/include/ingen/Message.hpp b/include/ingen/Message.hpp index b7342eba..be0b5d00 100644 --- a/include/ingen/Message.hpp +++ b/include/ingen/Message.hpp @@ -17,52 +17,45 @@ #ifndef INGEN_MESSAGE_HPP #define INGEN_MESSAGE_HPP -#include "ingen/Atom.hpp" -#include "ingen/Properties.hpp" -#include "ingen/Resource.hpp" -#include "ingen/Status.hpp" -#include "ingen/URI.hpp" -#include "raul/Path.hpp" - -#include <boost/variant/variant.hpp> +#include <ingen/Atom.hpp> +#include <ingen/Properties.hpp> +#include <ingen/Resource.hpp> +#include <ingen/Status.hpp> +#include <ingen/URI.hpp> +#include <raul/Path.hpp> #include <cstdint> #include <string> +#include <variant> namespace ingen { -struct BundleBegin -{ +struct BundleBegin { int32_t seq; }; -struct BundleEnd -{ +struct BundleEnd { int32_t seq; }; -struct Connect -{ +struct Connect { int32_t seq; raul::Path tail; raul::Path head; }; -struct Copy -{ +struct Copy { int32_t seq; URI old_uri; URI new_uri; }; -struct Del -{ +struct Del { int32_t seq; URI uri; }; -struct Delta -{ +struct Delta { int32_t seq; URI uri; Properties remove; @@ -70,61 +63,52 @@ struct Delta Resource::Graph ctx; }; -struct Disconnect -{ +struct Disconnect { int32_t seq; raul::Path tail; raul::Path head; }; -struct DisconnectAll -{ +struct DisconnectAll { int32_t seq; raul::Path graph; raul::Path path; }; -struct Error -{ +struct Error { int32_t seq; std::string message; }; -struct Get -{ +struct Get { int32_t seq; URI subject; }; -struct Move -{ +struct Move { int32_t seq; raul::Path old_path; raul::Path new_path; }; -struct Put -{ +struct Put { int32_t seq; URI uri; Properties properties; Resource::Graph ctx; }; -struct Redo -{ +struct Redo { int32_t seq; }; -struct Response -{ +struct Response { int32_t id; Status status; std::string subject; }; -struct SetProperty -{ +struct SetProperty { int32_t seq; URI subject; URI predicate; @@ -132,28 +116,27 @@ struct SetProperty Resource::Graph ctx; }; -struct Undo -{ +struct Undo { int32_t seq; }; -using Message = boost::variant<BundleBegin, - BundleEnd, - Connect, - Copy, - Del, - Delta, - Disconnect, - DisconnectAll, - Error, - Get, - Move, - Put, - Redo, - Response, - SetProperty, - Undo>; - -} // namespace ingen - -#endif // INGEN_MESSAGE_HPP +using Message = std::variant<BundleBegin, + BundleEnd, + Connect, + Copy, + Del, + Delta, + Disconnect, + DisconnectAll, + Error, + Get, + Move, + Put, + Redo, + Response, + SetProperty, + Undo>; + +} // namespace ingen + +#endif // INGEN_MESSAGE_HPP |