3
#ifndef BINARY_LOG_H_INCLUDED
4
#define BINARY_LOG_H_INCLUDED
6
#include <drizzled/message/binary_log.pb.h>
7
#include "binlog_encoding.h"
9
#include <google/protobuf/io/zero_copy_stream.h>
17
Wrapper class to wrap a protobuf event in a type tag and a length.
19
The type tag is not part of the actual message, but is handled
20
separately since it is needed to decode the events.
34
Event(EventType type, google::protobuf::Message *message)
35
: m_type(type), m_message(message)
40
: m_type(UNDEF), m_message(0)
48
bool write(google::protobuf::io::CodedOutputStream* out) const;
49
void print(std::ostream& out) const;
50
bool read(google::protobuf::io::CodedInputStream* in);
54
google::protobuf::Message *m_message;
58
#endif /* BINARY_LOG_H_INCLUDED */