Flutter Engine
_FlutterTaskRunner Struct Reference

Public Member Functions

 _FlutterTaskRunner (uint64_t task, const std::string &channel, const FlutterPlatformMessageResponseHandle *response_handle, const uint8_t *message, size_t message_size)
 
 ~_FlutterTaskRunner ()
 

Public Attributes

uint64_t task
 
std::string channel
 
const FlutterPlatformMessageResponseHandleresponse_handle
 
uint8_t * message
 
size_t message_size
 

Detailed Description

Definition at line 47 of file mock_engine.cc.

Constructor & Destructor Documentation

◆ _FlutterTaskRunner()

_FlutterTaskRunner::_FlutterTaskRunner ( uint64_t  task,
const std::string &  channel,
const FlutterPlatformMessageResponseHandle response_handle,
const uint8_t *  message,
size_t  message_size 
)
inline

Definition at line 54 of file mock_engine.cc.

60  : task(task),
62  response_handle(response_handle),
64  if (message_size > 0) {
65  this->message = static_cast<uint8_t*>(malloc(message_size));
66  memcpy(this->message, message, message_size);
67  } else {
68  this->message = nullptr;
69  }
70  }
const FlutterPlatformMessageResponseHandle * response_handle
Definition: mock_engine.cc:50
std::string channel
Definition: mock_engine.cc:49

◆ ~_FlutterTaskRunner()

_FlutterTaskRunner::~_FlutterTaskRunner ( )
inline

Definition at line 71 of file mock_engine.cc.

References _FlutterPlatformMessageResponseHandle::released.

71  {
72  if (response_handle != nullptr) {
73  EXPECT_TRUE(response_handle->released);
74  delete response_handle;
75  }
76  free(message);
77  }
const FlutterPlatformMessageResponseHandle * response_handle
Definition: mock_engine.cc:50

Member Data Documentation

◆ channel

std::string _FlutterTaskRunner::channel

Definition at line 49 of file mock_engine.cc.

Referenced by FlutterEngineRunTask().

◆ message

uint8_t* _FlutterTaskRunner::message

Definition at line 51 of file mock_engine.cc.

Referenced by FlutterEngineRunTask().

◆ message_size

size_t _FlutterTaskRunner::message_size

Definition at line 52 of file mock_engine.cc.

Referenced by FlutterEngineRunTask().

◆ response_handle

const FlutterPlatformMessageResponseHandle* _FlutterTaskRunner::response_handle

Definition at line 50 of file mock_engine.cc.

Referenced by FlutterEngineRunTask().

◆ task

uint64_t _FlutterTaskRunner::task

Definition at line 48 of file mock_engine.cc.

Referenced by invoke_method(), send_message(), and send_response().


The documentation for this struct was generated from the following file: