Flutter Engine
flutter::testing::StubFlutterApi Class Reference

#include <stub_flutter_api.h>

Public Member Functions

virtual ~StubFlutterApi ()
 
virtual void PluginRegistrarSetDestructionHandler (FlutterDesktopOnPluginRegistrarDestroyed callback)
 
virtual bool MessengerSend (const char *channel, const uint8_t *message, const size_t message_size)
 
virtual bool MessengerSendWithReply (const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
 
virtual void MessengerSendResponse (const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
 
virtual void MessengerSetCallback (const char *channel, FlutterDesktopMessageCallback callback, void *user_data)
 

Static Public Member Functions

static void SetTestStub (StubFlutterApi *stub)
 
static StubFlutterApiGetTestStub ()
 

Public Attributes

bool message_engine_result = true
 

Detailed Description

Definition at line 22 of file stub_flutter_api.h.

Constructor & Destructor Documentation

◆ ~StubFlutterApi()

virtual flutter::testing::StubFlutterApi::~StubFlutterApi ( )
inlinevirtual

Definition at line 35 of file stub_flutter_api.h.

35 {}

Member Function Documentation

◆ GetTestStub()

StubFlutterApi * flutter::testing::StubFlutterApi::GetTestStub ( )
static

Definition at line 18 of file stub_flutter_api.cc.

References s_stub_implementation.

Referenced by flutter::testing::ScopedStubFlutterApi::ScopedStubFlutterApi().

18  {
19  return s_stub_implementation;
20 }
static flutter::testing::StubFlutterApi * s_stub_implementation

◆ MessengerSend()

virtual bool flutter::testing::StubFlutterApi::MessengerSend ( const char *  channel,
const uint8_t *  message,
const size_t  message_size 
)
inlinevirtual

Definition at line 42 of file stub_flutter_api.h.

References message_engine_result.

Referenced by FlutterDesktopMessengerSend().

44  {
45  return message_engine_result;
46  }

◆ MessengerSendResponse()

virtual void flutter::testing::StubFlutterApi::MessengerSendResponse ( const FlutterDesktopMessageResponseHandle handle,
const uint8_t *  data,
size_t  data_length 
)
inlinevirtual

Definition at line 58 of file stub_flutter_api.h.

Referenced by FlutterDesktopMessengerSendResponse().

61  {}

◆ MessengerSendWithReply()

virtual bool flutter::testing::StubFlutterApi::MessengerSendWithReply ( const char *  channel,
const uint8_t *  message,
const size_t  message_size,
const FlutterDesktopBinaryReply  reply,
void *  user_data 
)
inlinevirtual

Definition at line 49 of file stub_flutter_api.h.

References message_engine_result.

Referenced by FlutterDesktopMessengerSendWithReply().

53  {
54  return message_engine_result;
55  }

◆ MessengerSetCallback()

virtual void flutter::testing::StubFlutterApi::MessengerSetCallback ( const char *  channel,
FlutterDesktopMessageCallback  callback,
void *  user_data 
)
inlinevirtual

Definition at line 64 of file stub_flutter_api.h.

Referenced by FlutterDesktopMessengerSetCallback().

66  {}

◆ PluginRegistrarSetDestructionHandler()

virtual void flutter::testing::StubFlutterApi::PluginRegistrarSetDestructionHandler ( FlutterDesktopOnPluginRegistrarDestroyed  callback)
inlinevirtual

Definition at line 38 of file stub_flutter_api.h.

Referenced by FlutterDesktopPluginRegistrarSetDestructionHandler().

39  {}

◆ SetTestStub()

void flutter::testing::StubFlutterApi::SetTestStub ( StubFlutterApi stub)
static

Definition at line 13 of file stub_flutter_api.cc.

Referenced by flutter::testing::ScopedStubFlutterApi::ScopedStubFlutterApi(), and flutter::testing::ScopedStubFlutterApi::~ScopedStubFlutterApi().

13  {
14  s_stub_implementation = stub;
15 }
static flutter::testing::StubFlutterApi * s_stub_implementation

Member Data Documentation

◆ message_engine_result

bool flutter::testing::StubFlutterApi::message_engine_result = true

Definition at line 26 of file stub_flutter_api.h.

Referenced by MessengerSend(), and MessengerSendWithReply().


The documentation for this class was generated from the following files: