diff --git a/src/Message.h b/src/Message.h index 2c73842fb1..e3fcc78235 100644 --- a/src/Message.h +++ b/src/Message.h @@ -47,6 +47,14 @@ class Message { MsgType type() const { return m_type; } bool Is(MsgType type) const { return type == m_type; } + // Message data accessors. Callers are responsible for knowing what data is + // actually provided for a particular message. + const std::string& str() const { return m_str; } + std::shared_ptr value() const { return m_value; } + unsigned int id() const { return m_id; } + unsigned int flags() const { return m_flags; } + unsigned int seq_num_uid() const { return m_seq_num_uid; } + // Read and write from wire representation void Write(WireEncoder& encoder) const; static std::shared_ptr Read(WireDecoder& decoder,