| Flutter Linux Embedder |

Functions
fl_method_channel_private.h File Reference
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_response.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS gboolean | fl_method_channel_respond (FlMethodChannel *channel, FlBinaryMessengerResponseHandle *response_handle, FlMethodResponse *response, GError **error)

## Function Documentation

## ◆ fl_method_channel_respond()

G_BEGIN_DECLS gboolean fl_method_channel_respond | ( | FlMethodChannel * | channel,
|  | FlBinaryMessengerResponseHandle * | response_handle,
|  | FlMethodResponse * | response,
|  | GError ** | error
| ) |  |

fl_method_channel_respond: @channel: an #FlMethodChannel. @response_handle: an #FlBinaryMessengerResponseHandle. @response: an #FlMethodResponse. @error: (allow-none): #GError location to store the error occurring, or NULL to ignore.

Responds to a method call.

Returns: TRUE on success.

Definition at line 215 of file fl_method_channel.cc.

219 {
220 g_return_val_if_fail(FL_IS_METHOD_CHANNEL(self), FALSE);
221 g_return_val_if_fail(FL_IS_BINARY_MESSENGER_RESPONSE_HANDLE(response_handle),
222 FALSE);
223 g_return_val_if_fail(FL_IS_METHOD_RESPONSE(response), FALSE);
224
225 g_autoptr(GBytes) message =
226 fl_method_codec_encode_response(self->codec, response, error);
227 if (message == nullptr) {
228 return FALSE;
229 }
230 return fl_binary_messenger_send_response(self->messenger, response_handle,
231 message, error);
232 }
fl_binary_messenger_send_response
G_MODULE_EXPORT gboolean fl_binary_messenger_send_response(FlBinaryMessenger *self, FlBinaryMessengerResponseHandle *response_handle, GBytes *response, GError **error)
Definition: fl_binary_messenger.cc:422
fl_method_codec_encode_response
GBytes * fl_method_codec_encode_response(FlMethodCodec *self, FlMethodResponse *response, GError **error)
Definition: fl_method_codec.cc:62
error
const uint8_t uint32_t uint32_t GError ** error
Definition: fl_pixel_buffer_texture_test.cc:40

References error, fl_binary_messenger_send_response(), and fl_method_codec_encode_response().

Referenced by fl_method_call_respond(), fl_method_call_respond_error(), fl_method_call_respond_not_implemented(), and fl_method_call_respond_success().