#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_codec.h"
#include <gmodule.h>
Go to the source code of this file.
◆ fl_binary_codec_class_init()
static void fl_binary_codec_class_init |
( |
FlBinaryCodecClass * |
klass | ) |
|
|
static |
Definition at line 42 of file fl_binary_codec.cc.
42 {
43 FL_MESSAGE_CODEC_CLASS(klass)->encode_message =
45 FL_MESSAGE_CODEC_CLASS(klass)->decode_message =
47}
static GBytes * fl_binary_codec_encode_message(FlMessageCodec *codec, FlValue *value, GError **error)
static FlValue * fl_binary_codec_decode_message(FlMessageCodec *codec, GBytes *message, GError **error)
◆ fl_binary_codec_decode_message()
static FlValue * fl_binary_codec_decode_message |
( |
FlMessageCodec * |
codec, |
|
|
GBytes * |
message, |
|
|
GError ** |
error |
|
) |
| |
|
static |
Definition at line 33 of file fl_binary_codec.cc.
35 {
36 gsize data_length;
38 static_cast<const uint8_t*
>(g_bytes_get_data(
message, &data_length));
40}
G_MODULE_EXPORT FlValue * fl_value_new_uint8_list(const uint8_t *data, size_t data_length)
std::shared_ptr< const fml::Mapping > data
◆ fl_binary_codec_encode_message()
static GBytes * fl_binary_codec_encode_message |
( |
FlMessageCodec * |
codec, |
|
|
FlValue * |
value, |
|
|
GError ** |
error |
|
) |
| |
|
static |
Definition at line 18 of file fl_binary_codec.cc.
20 {
24 "Only uint8[] values supported");
25 return nullptr;
26 }
27
30}
@ FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE
#define FL_MESSAGE_CODEC_ERROR
const uint8_t uint32_t uint32_t GError ** error
G_MODULE_EXPORT FlValueType fl_value_get_type(FlValue *self)
G_MODULE_EXPORT const uint8_t * fl_value_get_uint8_list(FlValue *self)
G_MODULE_EXPORT size_t fl_value_get_length(FlValue *self)
@ FL_VALUE_TYPE_UINT8_LIST
◆ fl_binary_codec_init()
static void fl_binary_codec_init |
( |
FlBinaryCodec * |
self | ) |
|
|
static |
◆ fl_binary_codec_new()
G_MODULE_EXPORT FlBinaryCodec * fl_binary_codec_new |
( |
| ) |
|
Definition at line 51 of file fl_binary_codec.cc.
51 {
52 return static_cast<FlBinaryCodec*>(
53 g_object_new(fl_binary_codec_get_type(), nullptr));
54}