#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.
References buffer, error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA, and TRUE.
Referenced by read_align(), read_float32_list_value(), read_float64_list_value(), read_float64_value(), read_int32_list_value(), read_int32_value(), read_int64_list_value(), read_int64_value(), read_string_value(), read_uint16(), read_uint32(), read_uint8(), and read_uint8_list_value().
|
static |
Definition at line 625 of file fl_standard_message_codec.cc.
References fl_standard_message_codec_decode_message(), fl_standard_message_codec_encode_message(), fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
static |
Definition at line 415 of file fl_standard_message_codec.cc.
References error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA, fl_standard_message_codec_read_value(), fl_value_new_null(), fl_value_ref(), and value.
Referenced by fl_standard_message_codec_class_init().
|
static |
Definition at line 400 of file fl_standard_message_codec.cc.
References buffer, error, and fl_standard_message_codec_write_value().
Referenced by fl_standard_message_codec_class_init().
|
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.
Referenced by decode_error_value(), decode_message(), decode_semantic_data(), encode_message(), fl_accessible_text_field_perform_action(), fl_standard_method_codec_new(), perform_set_selection_action(), perform_set_text_action(), and TEST().
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.
References buffer, error, read_uint16(), read_uint32(), read_uint8(), TRUE, and value.
Referenced by read_custom_value(), read_custom_value1(), read_float32_list_value(), read_float64_list_value(), read_int32_list_value(), read_int64_list_value(), read_list_value(), read_map_value(), read_string_value(), and read_uint8_list_value().
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.
References buffer, error, read_uint8(), and type.
Referenced by fl_standard_message_codec_decode_message(), fl_standard_method_codec_decode_method_call(), fl_standard_method_codec_decode_response(), read_list_value(), and read_map_value().
|
static |
Definition at line 580 of file fl_standard_message_codec.cc.
References buffer, error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE, fl_value_new_bool(), fl_value_new_null(), fl_value_ref(), kValueFalse, kValueFloat32List, kValueFloat64, kValueFloat64List, kValueInt32, kValueInt32List, kValueInt64, kValueInt64List, kValueList, kValueMap, kValueNull, kValueString, kValueTrue, kValueUint8List, read_float32_list_value(), read_float64_list_value(), read_float64_value(), read_int32_list_value(), read_int32_value(), read_int64_list_value(), read_int64_value(), read_list_value(), read_map_value(), read_string_value(), read_uint8_list_value(), TRUE, type, and value.
Referenced by fl_standard_message_codec_class_init().
|
static |
Definition at line 444 of file fl_standard_message_codec.cc.
References buffer, error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE, fl_standard_message_codec_write_size(), fl_standard_message_codec_write_value(), fl_value_get_bool(), fl_value_get_float(), fl_value_get_float32_list(), fl_value_get_float_list(), fl_value_get_int(), fl_value_get_int32_list(), fl_value_get_int64_list(), fl_value_get_length(), fl_value_get_list_value(), fl_value_get_map_key(), fl_value_get_map_value(), fl_value_get_string(), fl_value_get_type(), fl_value_get_uint8_list(), FL_VALUE_TYPE_BOOL, FL_VALUE_TYPE_CUSTOM, FL_VALUE_TYPE_FLOAT, FL_VALUE_TYPE_FLOAT32_LIST, FL_VALUE_TYPE_FLOAT_LIST, FL_VALUE_TYPE_INT, FL_VALUE_TYPE_INT32_LIST, FL_VALUE_TYPE_INT64_LIST, FL_VALUE_TYPE_LIST, FL_VALUE_TYPE_MAP, FL_VALUE_TYPE_NULL, FL_VALUE_TYPE_STRING, FL_VALUE_TYPE_UINT8_LIST, g_byte_array_append(), i, kValueFalse, kValueFloat32List, kValueFloat64, kValueFloat64List, kValueInt32, kValueInt32List, kValueInt64, kValueInt64List, kValueList, kValueMap, kValueNull, kValueString, kValueTrue, kValueUint8List, length, TRUE, value, write_align(), write_float64(), write_int32(), and write_int64().
Referenced by fl_standard_message_codec_class_init().
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.
References buffer, write_uint16(), and write_uint32().
Referenced by fl_standard_message_codec_real_write_value().
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.
References buffer, error, and value.
Referenced by fl_standard_message_codec_encode_message(), fl_standard_message_codec_real_write_value(), fl_standard_method_codec_encode_error_envelope(), fl_standard_method_codec_encode_method_call(), and fl_standard_method_codec_encode_success_envelope().
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.
References buffer.
Referenced by read_float32_list_value(), read_float64_list_value(), read_float64_value(), read_int32_list_value(), read_int32_value(), read_int64_list_value(), read_int64_value(), read_string_value(), read_uint16(), read_uint32(), read_uint8(), and read_uint8_list_value().
|
static |
Definition at line 86 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, and TRUE.
Referenced by read_float32_list_value(), read_float64_list_value(), read_float64_value(), read_int32_list_value(), and read_int64_list_value().
|
static |
Definition at line 297 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_float32_list(), get_data(), length, read_align(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 321 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_float_list(), get_data(), length, read_align(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 189 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_value_new_float(), get_data(), read_align(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 249 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_int32_list(), get_data(), length, read_align(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 157 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_value_new_int(), get_data(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 273 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_int64_list(), get_data(), length, read_align(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 173 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_value_new_int(), get_data(), and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 345 of file fl_standard_message_codec.cc.
References buffer, error, fl_standard_message_codec_read_size(), fl_standard_message_codec_read_value(), fl_value_append(), fl_value_new_list(), fl_value_ref(), i, and length.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 371 of file fl_standard_message_codec.cc.
References buffer, error, fl_standard_message_codec_read_size(), fl_standard_message_codec_read_value(), fl_value_new_map(), fl_value_ref(), fl_value_set(), i, length, and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 208 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_string_sized(), get_data(), length, and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 126 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, get_data(), TRUE, and value.
Referenced by fl_standard_message_codec_read_size().
|
static |
Definition at line 141 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, get_data(), TRUE, and value.
Referenced by fl_standard_message_codec_read_size().
|
static |
Definition at line 111 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, get_data(), TRUE, and value.
Referenced by fl_standard_message_codec_read_size(), and fl_standard_message_codec_read_value().
|
static |
Definition at line 229 of file fl_standard_message_codec.cc.
References buffer, check_size(), error, fl_standard_message_codec_read_size(), fl_value_new_uint8_list(), get_data(), length, and value.
Referenced by fl_standard_message_codec_read_value_of_type().
|
static |
Definition at line 66 of file fl_standard_message_codec.cc.
References buffer.
Referenced by fl_standard_message_codec_real_write_value().
|
static |
Definition at line 60 of file fl_standard_message_codec.cc.
References buffer, g_byte_array_append(), and value.
Referenced by fl_standard_message_codec_real_write_value().
|
static |
Definition at line 50 of file fl_standard_message_codec.cc.
References buffer, g_byte_array_append(), and value.
Referenced by fl_standard_message_codec_real_write_value().
|
static |
Definition at line 55 of file fl_standard_message_codec.cc.
References buffer, g_byte_array_append(), and value.
Referenced by fl_standard_message_codec_real_write_value().
|
static |
Definition at line 40 of file fl_standard_message_codec.cc.
References buffer, g_byte_array_append(), and value.
Referenced by fl_standard_message_codec_write_size().
|
static |
Definition at line 45 of file fl_standard_message_codec.cc.
References buffer, g_byte_array_append(), and value.
Referenced by fl_standard_message_codec_write_size().
|
staticconstexpr |
Definition at line 17 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 28 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 20 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 25 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 18 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 23 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 19 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 24 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 26 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 27 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 15 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 21 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 16 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
|
staticconstexpr |
Definition at line 22 of file fl_standard_message_codec.cc.
Referenced by fl_standard_message_codec_read_value_of_type(), and fl_standard_message_codec_real_write_value().
uint8_t value |
Definition at line 36 of file fl_standard_message_codec.cc.
Referenced by FlValueHandler::add(), build_list(), build_map(), cancel_channel(), flutter::CheckEncodeDecode(), flutter::CheckEncodeDecodeWithEncodePrefix(), decode_error_message(), decode_message(), flutter::JsonMethodCodec::DecodeAndProcessResponseEnvelopeInternal(), flutter::StandardMethodCodec::DecodeAndProcessResponseEnvelopeInternal(), define_system_cursor(), do_unref(), echo_response_cb(), encode_bool(), encode_error_message(), encode_float(), encode_int(), encode_message(), encode_message_error(), encode_string(), find_physical_from_logical_loop_body(), fl_accessible_node_set_property(), fl_accessible_node_set_value(), fl_accessible_text_field_set_value(), fl_binary_codec_encode_message(), fl_engine_set_property(), fl_gnome_settings_get_color_scheme(), fl_gnome_settings_set_property(), fl_json_message_codec_decode(), fl_json_message_codec_decode_message(), fl_json_message_codec_encode(), fl_json_method_codec_decode_method_call(), fl_json_method_codec_decode_response(), fl_settings_portal_get_clock_format(), fl_settings_portal_get_color_scheme(), fl_settings_portal_get_enable_animations(), fl_settings_portal_get_high_contrast(), fl_settings_portal_get_text_scaling_factor(), fl_settings_portal_start(), fl_standard_message_codec_decode_message(), fl_standard_message_codec_read_size(), fl_standard_message_codec_read_value_of_type(), fl_standard_message_codec_real_write_value(), fl_standard_message_codec_write_value(), fl_string_codec_encode_message(), fl_test_codec_encode_message(), fl_value_append(), fl_value_append_take(), fl_value_destroy(), fl_value_lookup_string(), fl_value_new_bool(), fl_value_new_custom(), fl_value_new_float(), fl_value_new_int(), fl_value_new_list_from_strv(), fl_value_new_string(), fl_value_new_string_sized(), fl_value_set(), fl_value_set_string(), fl_value_set_string_take(), fl_value_set_take(), fl_value_to_string(), fl_view_accessible_handle_update_semantics(), fl_view_get_property(), fl_view_set_property(), float_to_string(), G_DECLARE_DERIVABLE_TYPE(), G_DEFINE_TYPE(), G_DEFINE_TYPE_WITH_CODE(), get_keyboard_state(), get_value(), hash_table_find_equal_value(), if(), initialize_logical_key_to_lock_bit_loop_body(), int_to_string(), is_known_modifier_physical_key_loop_body(), listen_channel(), MATCHER_P(), MATCHER_P2(), perform_set_selection_action(), perform_set_text_action(), FlValueHandler::push(), read_float32_list_value(), read_float64_list_value(), read_float64_value(), read_int32_list_value(), read_int32_value(), read_int64_list_value(), read_int64_value(), read_map_value(), read_string_value(), read_uint16(), read_uint32(), read_uint8(), read_uint8_list_value(), flutter::ByteStreamReader::ReadDouble(), flutter::ByteStreamReader::ReadInt32(), flutter::ByteStreamReader::ReadInt64(), flutter::StandardCodecSerializer::ReadSize(), flutter::StandardCodecSerializer::ReadValueOfType(), reverse_lookup_hash_table(), set_app_lifecycle_state(), set_value(), settings_portal_changed_cb(), settings_portal_read(), synchronize_lock_states_loop_body(), synchronize_pressed_states_loop_body(), flutter::TEST(), TEST(), update_editing_state(), update_editing_state_with_delta(), value_to_string(), write_float64(), write_int32(), write_int64(), write_uint16(), write_uint32(), flutter::ByteStreamWriter::WriteDouble(), flutter::ByteStreamWriter::WriteInt32(), flutter::ByteStreamWriter::WriteInt64(), flutter::StandardCodecSerializer::WriteSize(), and flutter::StandardCodecSerializer::WriteValue().