#include <test_binary_messenger.h>
|
| TestBinaryMessenger (SendHandler send_handler=nullptr) |
|
virtual | ~TestBinaryMessenger ()=default |
|
bool | SimulateEngineMessage (const std::string &channel, const uint8_t *message, size_t message_size, BinaryReply reply) |
|
void | Send (const std::string &channel, const uint8_t *message, size_t message_size, BinaryReply reply) const override |
|
void | SetMessageHandler (const std::string &channel, BinaryMessageHandler handler) override |
|
virtual | ~BinaryMessenger ()=default |
|
virtual void | Send (const std::string &channel, const uint8_t *message, size_t message_size, BinaryReply reply=nullptr) const =0 |
|
virtual void | SetMessageHandler (const std::string &channel, BinaryMessageHandler handler)=0 |
|
Definition at line 19 of file test_binary_messenger.h.
◆ SendHandler
using flutter::TestBinaryMessenger::SendHandler = std::function<void(const std::string& channel, const uint8_t* message, size_t message_size, BinaryReply reply)> |
◆ TestBinaryMessenger()
flutter::TestBinaryMessenger::TestBinaryMessenger |
( |
SendHandler |
send_handler = nullptr | ) |
|
|
inlineexplicit |
◆ ~TestBinaryMessenger()
virtual flutter::TestBinaryMessenger::~TestBinaryMessenger |
( |
| ) |
|
|
virtualdefault |
◆ Send()
void flutter::TestBinaryMessenger::Send |
( |
const std::string & |
channel, |
|
|
const uint8_t * |
message, |
|
|
size_t |
message_size, |
|
|
BinaryReply |
reply |
|
) |
| const |
|
inlineoverridevirtual |
◆ SetMessageHandler()
void flutter::TestBinaryMessenger::SetMessageHandler |
( |
const std::string & |
channel, |
|
|
BinaryMessageHandler |
handler |
|
) |
| |
|
inlineoverridevirtual |
◆ SimulateEngineMessage()
bool flutter::TestBinaryMessenger::SimulateEngineMessage |
( |
const std::string & |
channel, |
|
|
const uint8_t * |
message, |
|
|
size_t |
message_size, |
|
|
BinaryReply |
reply |
|
) |
| |
|
inline |
Definition at line 35 of file test_binary_messenger.h.
38 {
39 auto handler = registered_handlers_.find(channel);
40 if (handler == registered_handlers_.end()) {
41 return false;
42 }
43 (handler->second)(
message, message_size, reply);
44 return true;
45 }
The documentation for this class was generated from the following file: