diff --git a/modules/you_done_it/ydi_networking.h b/modules/you_done_it/ydi_networking.h index db8be659..f922f0bf 100644 --- a/modules/you_done_it/ydi_networking.h +++ b/modules/you_done_it/ydi_networking.h @@ -14,6 +14,7 @@ class NetworkData : Object { public: enum MessageType { + MSG_NONE = 0u, // connection management messages MSG_CONNECT = 1u, MSG_OK, @@ -39,10 +40,11 @@ public: }; enum NOKReason { - NOK_UNAUTHENTICATED, - NOK_UNKNOWN_MSG, - NOK_OUT_OF_CONTEXT, //!< this means a received message is not valid in the recipient's current context - NOK_INVALID_REASON //!< this means the value could not be parsed as a NOK reason, not that the reason is an invalid message. + NOK_UNAUTHENTICATED, //!< message sender is not known by recipient. + NOK_UNKNOWN_MSG, //!< message type is not valid now or ever for recipient. + NOK_OUT_OF_CONTEXT, //!< this means a received message type is not valid in the recipient's current state, but COULD otherwise be valid. + NOK_MALFORMED_ARGUMENTS, //!< message type is valid but arguments could not be interpreted. + NOK_INVALID_REASON //!< this means the value could not be parsed as a NOKReason, not that the reason is an invalid message. Use UNKNOWN_MSG for that. }; }; @@ -55,7 +57,7 @@ NetworkData::ClueID to_clue_id(zmq::message_t const &msg); void print_message_contents(zmq::multipart_t const &mpart); void extend_multipart(zmq::multipart_t &mpart, NetworkData::MessageType type); -void extend_multipart(zmq::multipart_t &mpart, NetworkData::ClueID type); +void extend_multipart(zmq::multipart_t &mpart, NetworkData::ClueID id); void extend_multipart(zmq::multipart_t &mpart, std::string const &string); void extend_multipart(zmq::multipart_t &mpart, std::string_view const &strv);