23#ifndef CODECS_BINARY_INCLUDED
24#define CODECS_BINARY_INCLUDED
42 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
47 std::size_t size)
const override = 0;
89 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
107 std::size_t size)
const override;
144 std::pair<std::size_t, bool>
decode(
const unsigned char *from,
162 std::size_t size)
const override;
This is the abstract base class for binary log events.
Definition: binlog_event.h:819
Event_reader class purpose is to avoid out-of-buffer reads when deserializing binary log events and i...
Definition: event_reader.h:73
This is the abstract and base class for binary log codecs.
Definition: base.h:38
This is the abstract and base class for binary log BINARY codecs.
Definition: binary.h:36
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:39
~Base_codec() override=default
Event_reader * m_reader
Definition: binary.h:38
Binary codec for the heartbeat log event.
Definition: binary.h:113
fields
The on-the-wire fields.
Definition: binary.h:118
@ OTW_HB_HEADER_END_MARK
Marks the end of the fields.
Definition: binary.h:120
@ OTW_HB_LOG_POSITION_FIELD
The log position field.
Definition: binary.h:126
@ OTW_HB_LOG_FILENAME_FIELD
The log file name.
Definition: binary.h:123
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:140
Heartbeat()
Definition: binary.h:131
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:212
Binary codec for the transaction payload log event.
Definition: binary.h:55
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:45
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:274
Transaction_payload()=default
fields
The on-the-wire fields.
Definition: binary.h:60
@ OTW_PAYLOAD_HEADER_END_MARK
Marks the end of the payload header.
Definition: binary.h:62
@ OTW_PAYLOAD_UNCOMPRESSED_SIZE_FIELD
The uncompressed size field.
Definition: binary.h:71
@ OTW_PAYLOAD_COMPRESSION_TYPE_FIELD
The compression type field.
Definition: binary.h:68
@ OTW_PAYLOAD_SIZE_FIELD
The payload field.
Definition: binary.h:65
The namespace contains classes representing events that can occur in a replication stream.
constexpr value_type binary
Definition: classic_protocol_constants.h:274