| Flutter Linux Embedder |

fl_method_codec_private.h File Reference
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_codec.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_response.h"`

Go to the source code of this file.

## Functions
: method name.
fl_method_codec_encode_method_call: @codec: an #FlMethodCodec. @args: (allow-none): method arguments, or NULL. @error: (allow-none): #GError location to store the error occurring, or NULL. Encodes a method call. Returns: (transfer full): a binary encoding of this method call or NULL if not able to encode.
GBytes * | fl_method_codec_encode_method_call (FlMethodCodec *codec, const gchar *name, FlValue *args, GError **error)
: (transfer full): location to write method name or NULL if not
fl_method_codec_decode_method_call: @codec: an #FlMethodCodec. @message: message to decode. required. @args: (transfer full): location to write method arguments, or NULL if not required. @error: (allow-none): #GError location to store the error occurring, or NULL. Decodes a method call. Returns: TRUE if successfully decoded.
gboolean | fl_method_codec_decode_method_call (FlMethodCodec *codec, GBytes *message, gchar **name, FlValue **args, GError **error)
GBytes * | fl_method_codec_encode_success_envelope (FlMethodCodec *codec, FlValue *result, GError **error)

## Function Documentation

## ◆ fl_method_codec_decode_method_call()

gboolean fl_method_codec_decode_method_call | ( | FlMethodCodec * | codec,
|  | GBytes * | message,
|  | gchar ** | name,
|  | FlValue ** | args,
|  | GError ** | error
| ) |  |

Definition at line 27 of file fl_method_codec.cc.

31 {
32 g_return_val_if_fail(FL_IS_METHOD_CODEC(self), FALSE);
33 g_return_val_if_fail(message != nullptr, FALSE);
34 g_return_val_if_fail(name != nullptr, FALSE);
35 g_return_val_if_fail(args != nullptr, FALSE);
36
37 return FL_METHOD_CODEC_GET_CLASS(self)->decode_method_call(self, message,
38 name, args, error);
39 }
args
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
Definition: fl_event_channel.h:89
error
const uint8_t uint32_t uint32_t GError ** error
Definition: fl_pixel_buffer_texture_test.cc:40

References args, and error.

Referenced by decode_error_method_call(), decode_method_call(), message_cb(), TEST(), and test_method_codec_decode_method_call().

## ◆ fl_method_codec_encode_method_call()

GBytes* fl_method_codec_encode_method_call | ( | FlMethodCodec * | codec,
|  | const gchar * | name,
|  | FlValue * | args,
|  | GError ** | error
| ) |  |

Definition at line 16 of file fl_method_codec.cc.

19 {
20 g_return_val_if_fail(FL_IS_METHOD_CODEC(self), nullptr);
21 g_return_val_if_fail(name != nullptr, nullptr);
22
23 return FL_METHOD_CODEC_GET_CLASS(self)->encode_method_call(self, name, args,
24 error);
25 }

References args, and error.

Referenced by encode_method_call(), fl_method_channel_invoke_method(), resize_channel(), set_warns_on_channel_overflow(), TEST(), and test_method_codec_encode_method_call().

## ◆ fl_method_codec_encode_success_envelope()

GBytes* fl_method_codec_encode_success_envelope | ( | FlMethodCodec * | codec,
|  | FlValue * | result,
|  | GError ** | error
| ) |  |

fl_method_codec_encode_success_envelope: @codec: an #FlMethodCodec.

Returns
  : (allow-none): method result, or NULL. @error: (allow-none): #GError location to store the error occurring, or NULL.

Encodes a successful response to a method call.

Returns: (transfer full): a binary encoding of this response or NULL if not able to encode.

Definition at line 41 of file fl_method_codec.cc.

43 {
44 g_return_val_if_fail(FL_IS_METHOD_CODEC(self), nullptr);
45
46 return FL_METHOD_CODEC_GET_CLASS(self)->encode_success_envelope(self, result,
47 error);
48 }

References error.

Referenced by encode_success_envelope(), fl_event_channel_send(), fl_method_codec_encode_response(), message_cb(), and TEST().