24#ifndef CODECS_BINARY_INCLUDED
25#define CODECS_BINARY_INCLUDED
43 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
48 std::size_t size)
const override = 0;
90 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
108 std::size_t size)
const override;
145 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
163 std::size_t size)
const override;
This is the abstract base class for binary log events.
Definition: binlog_event.h:826
Event_reader class purpose is to avoid out-of-buffer reads when deserializing binary log events and i...
Definition: event_reader.h:74
This is the abstract and base class for binary log codecs.
Definition: base.h:39
This is the abstract and base class for binary log BINARY codecs.
Definition: binary.h:37
std::pair< std::size_t, bool > encode(const Binary_log_event &from, unsigned char *to, std::size_t size) const override=0
Member function that shall encode the contents of the given binary log event into an in memory buffer...
std::pair< std::size_t, bool > decode(const unsigned char *from, std::size_t size, Binary_log_event &to) const override=0
Member function that shall decode the contents of the given buffer into a binary log event.
Event_reader & reader()
Definition: binary.h:40
~Base_codec() override=default
Event_reader * m_reader
Definition: binary.h:39
Binary codec for the heartbeat log event.
Definition: binary.h:114
fields
The on-the-wire fields.
Definition: binary.h:119
@ OTW_HB_HEADER_END_MARK
Marks the end of the fields.
Definition: binary.h:121
@ OTW_HB_LOG_POSITION_FIELD
The log position field.
Definition: binary.h:127
@ OTW_HB_LOG_FILENAME_FIELD
The log file name.
Definition: binary.h:124
std::pair< std::size_t, bool > decode(const unsigned char *from, std::size_t size, Binary_log_event &to) const override
This member function shall decode the contents of the buffer provided and fill in the event reference...
Definition: binary.cpp:141
Heartbeat()
Definition: binary.h:132
std::pair< std::size_t, bool > encode(const Binary_log_event &from, unsigned char *to, std::size_t size) const override
This member function shall encode the contents of the event referenced and store the result in the bu...
Definition: binary.cpp:213
Binary codec for the transaction payload log event.
Definition: binary.h:56
std::pair< std::size_t, bool > decode(const unsigned char *from, std::size_t size, Binary_log_event &to) const override
This member function shall decode the contents of the buffer provided and fill in the event reference...
Definition: binary.cpp:46
std::pair< std::size_t, bool > encode(const Binary_log_event &from, unsigned char *to, std::size_t size) const override
This member function shall encode the contents of the event referenced and store the result in the bu...
Definition: binary.cpp:275
Transaction_payload()=default
fields
The on-the-wire fields.
Definition: binary.h:61
@ OTW_PAYLOAD_HEADER_END_MARK
Marks the end of the payload header.
Definition: binary.h:63
@ OTW_PAYLOAD_UNCOMPRESSED_SIZE_FIELD
The uncompressed size field.
Definition: binary.h:72
@ OTW_PAYLOAD_COMPRESSION_TYPE_FIELD
The compression type field.
Definition: binary.h:69
@ OTW_PAYLOAD_SIZE_FIELD
The payload field.
Definition: binary.h:66
The namespace contains classes representing events that can occur in a replication stream.
constexpr value_type binary
Definition: classic_protocol_constants.h:275