3
#ifndef BINARY_LOG_H_INCLUDED
4
#define BINARY_LOG_H_INCLUDED
6
#include "binary_log.pb.h"
7
#include "binlog_encoding.h"
9
#include <google/protobuf/io/zero_copy_stream.h>
15
using namespace google::protobuf;
16
using namespace google::protobuf::io;
19
Wrapper class to wrap a protobuf event in a type tag and a length.
21
The type tag is not part of the actual message, but is handled
22
separately since it is needed to decode the events.
36
Event(EventType type, Message *message)
37
: m_type(type), m_message(message)
42
: m_type(UNDEF), m_message(0)
50
bool write(CodedOutputStream* out) const;
51
void print(std::ostream& out) const;
52
bool read(CodedInputStream* in);
60
#endif /* BINARY_LOG_H_INCLUDED */