Flutter Engine
The Flutter Engine
|
#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
#include <gmodule.h>
#include <cstring>
Go to the source code of this file.
Functions | |
G_DEFINE_TYPE (FlStandardMessageCodec, fl_standard_message_codec, fl_message_codec_get_type()) static void write_uint8(GByteArray *buffer | |
static void | write_uint16 (GByteArray *buffer, uint16_t value) |
static void | write_uint32 (GByteArray *buffer, uint32_t value) |
static void | write_int32 (GByteArray *buffer, int32_t value) |
static void | write_int64 (GByteArray *buffer, int64_t value) |
static void | write_float64 (GByteArray *buffer, double value) |
static void | write_align (GByteArray *buffer, guint align) |
static gboolean | check_size (GBytes *buffer, size_t offset, size_t required, GError **error) |
static gboolean | read_align (GBytes *buffer, size_t *offset, size_t align, GError **error) |
static const uint8_t * | get_data (GBytes *buffer, size_t *offset) |
static gboolean | read_uint8 (GBytes *buffer, size_t *offset, uint8_t *value, GError **error) |
static gboolean | read_uint16 (GBytes *buffer, size_t *offset, uint16_t *value, GError **error) |
static gboolean | read_uint32 (GBytes *buffer, size_t *offset, uint32_t *value, GError **error) |
static FlValue * | read_int32_value (GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_int64_value (GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_float64_value (GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_string_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_uint8_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_int32_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_int64_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_float32_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_float64_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_list_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static FlValue * | read_map_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
static GBytes * | fl_standard_message_codec_encode_message (FlMessageCodec *codec, FlValue *message, GError **error) |
static FlValue * | fl_standard_message_codec_decode_message (FlMessageCodec *codec, GBytes *message, GError **error) |
static gboolean | fl_standard_message_codec_real_write_value (FlStandardMessageCodec *self, GByteArray *buffer, FlValue *value, GError **error) |
static FlValue * | fl_standard_message_codec_read_value_of_type (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, int type, GError **error) |
static void | fl_standard_message_codec_class_init (FlStandardMessageCodecClass *klass) |
static void | fl_standard_message_codec_init (FlStandardMessageCodec *self) |
G_MODULE_EXPORT FlStandardMessageCodec * | fl_standard_message_codec_new () |
G_MODULE_EXPORT void | fl_standard_message_codec_write_size (FlStandardMessageCodec *codec, GByteArray *buffer, uint32_t size) |
G_MODULE_EXPORT gboolean | fl_standard_message_codec_read_size (FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, uint32_t *value, GError **error) |
G_MODULE_EXPORT gboolean | fl_standard_message_codec_write_value (FlStandardMessageCodec *self, GByteArray *buffer, FlValue *value, GError **error) |
G_MODULE_EXPORT FlValue * | fl_standard_message_codec_read_value (FlStandardMessageCodec *self, GBytes *buffer, size_t *offset, GError **error) |
Variables | |
static constexpr int | kValueNull = 0 |
static constexpr int | kValueTrue = 1 |
static constexpr int | kValueFalse = 2 |
static constexpr int | kValueInt32 = 3 |
static constexpr int | kValueInt64 = 4 |
static constexpr int | kValueFloat64 = 6 |
static constexpr int | kValueString = 7 |
static constexpr int | kValueUint8List = 8 |
static constexpr int | kValueInt32List = 9 |
static constexpr int | kValueInt64List = 10 |
static constexpr int | kValueFloat64List = 11 |
static constexpr int | kValueList = 12 |
static constexpr int | kValueMap = 13 |
static constexpr int | kValueFloat32List = 14 |
uint8_t | value |
|
static |
Definition at line 73 of file fl_standard_message_codec.cc.
|
static |
Definition at line 625 of file fl_standard_message_codec.cc.
|
static |
Definition at line 415 of file fl_standard_message_codec.cc.
|
static |
Definition at line 400 of file fl_standard_message_codec.cc.
|
static |
Definition at line 635 of file fl_standard_message_codec.cc.
G_MODULE_EXPORT FlStandardMessageCodec * fl_standard_message_codec_new | ( | ) |
Definition at line 637 of file fl_standard_message_codec.cc.
G_MODULE_EXPORT gboolean fl_standard_message_codec_read_size | ( | FlStandardMessageCodec * | codec, |
GBytes * | buffer, | ||
size_t * | offset, | ||
uint32_t * | value, | ||
GError ** | error | ||
) |
fl_standard_message_codec_read_size: @codec: an #FlStandardMessageCodec. @buffer: buffer to read from. @offset: (inout): read position in @buffer. @value: location to read size. @error: (allow-none): #GError location to store the error occurring, or NULL.
Reads a size field in Flutter Standard encoding.
This method is intended for use by subclasses overriding FlStandardMessageCodec::read_value_of_type.
Returns: TRUE on success.
Definition at line 657 of file fl_standard_message_codec.cc.
G_MODULE_EXPORT FlValue * fl_standard_message_codec_read_value | ( | FlStandardMessageCodec * | codec, |
GBytes * | buffer, | ||
size_t * | offset, | ||
GError ** | error | ||
) |
fl_standard_message_codec_read_value: @codec: an #FlStandardMessageCodec. @buffer: buffer to read from. @offset: (inout): read position in @buffer. @value: location to read size. @error: (allow-none): #GError location to store the error occurring, or NULL.
Reads an FlValue in Flutter Standard encoding.
This method is intended for use by subclasses overriding FlStandardMessageCodec::read_value_of_type.
Returns: a new FlValue or NULL on error.
Definition at line 694 of file fl_standard_message_codec.cc.
|
static |
Definition at line 580 of file fl_standard_message_codec.cc.
|
static |
Definition at line 444 of file fl_standard_message_codec.cc.
G_MODULE_EXPORT void fl_standard_message_codec_write_size | ( | FlStandardMessageCodec * | codec, |
GByteArray * | buffer, | ||
uint32_t | size | ||
) |
fl_standard_message_codec_write_size: @codec: an #FlStandardMessageCodec. @buffer: buffer to write into. @size: size value to write.
Writes a size field in Flutter Standard encoding.
Definition at line 642 of file fl_standard_message_codec.cc.
G_MODULE_EXPORT gboolean fl_standard_message_codec_write_value | ( | FlStandardMessageCodec * | codec, |
GByteArray * | buffer, | ||
FlValue * | value, | ||
GError ** | error | ||
) |
fl_standard_message_codec_write_value: @codec: an #FlStandardMessageCodec. @buffer: buffer to write into. @value: (allow-none): value to write. @error: (allow-none): #GError location to store the error occurring, or NULL.
Writes an FlValue in Flutter Standard encoding.
This method is intended for use by subclasses overriding FlStandardMessageCodec::write_value.
Returns: TRUE on success.
Definition at line 685 of file fl_standard_message_codec.cc.
G_DEFINE_TYPE | ( | FlStandardMessageCodec | , |
fl_standard_message_codec | , | ||
fl_message_codec_get_type() | |||
) |
|
static |
Definition at line 104 of file fl_standard_message_codec.cc.
|
static |
Definition at line 86 of file fl_standard_message_codec.cc.
|
static |
Definition at line 297 of file fl_standard_message_codec.cc.
|
static |
Definition at line 321 of file fl_standard_message_codec.cc.
|
static |
Definition at line 189 of file fl_standard_message_codec.cc.
|
static |
Definition at line 249 of file fl_standard_message_codec.cc.
|
static |
Definition at line 157 of file fl_standard_message_codec.cc.
|
static |
Definition at line 273 of file fl_standard_message_codec.cc.
|
static |
Definition at line 173 of file fl_standard_message_codec.cc.
|
static |
Definition at line 345 of file fl_standard_message_codec.cc.
|
static |
Definition at line 371 of file fl_standard_message_codec.cc.
|
static |
Definition at line 208 of file fl_standard_message_codec.cc.
|
static |
|
static |
|
static |
|
static |
Definition at line 229 of file fl_standard_message_codec.cc.
|
static |
Definition at line 66 of file fl_standard_message_codec.cc.
|
static |
Definition at line 60 of file fl_standard_message_codec.cc.
|
static |
Definition at line 50 of file fl_standard_message_codec.cc.
|
static |
Definition at line 55 of file fl_standard_message_codec.cc.
|
static |
Definition at line 40 of file fl_standard_message_codec.cc.
|
static |
Definition at line 45 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 17 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 28 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 20 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 25 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 18 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 23 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 19 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 24 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 26 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 27 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 15 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 21 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 16 of file fl_standard_message_codec.cc.
|
staticconstexpr |
Definition at line 22 of file fl_standard_message_codec.cc.
uint8_t value |
Definition at line 36 of file fl_standard_message_codec.cc.