From 4fb2014ad389cc6e8f6f59cfcddd5bc3580bdd84 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 11 Sep 2023 13:59:07 +1200 Subject: [PATCH 001/127] Add Linux support https://github.com/flutter/flutter/issues/73740 --- packages/pigeon/CHANGELOG.md | 4 + packages/pigeon/README.md | 8 + packages/pigeon/example/README.md | 63 + packages/pigeon/example/app/lib/main.dart | 1 + packages/pigeon/example/app/linux/.gitignore | 1 + .../pigeon/example/app/linux/CMakeLists.txt | 140 ++ .../example/app/linux/flutter/CMakeLists.txt | 88 ++ .../app/linux/flutter/generated_plugins.cmake | 23 + packages/pigeon/example/app/linux/main.cc | 10 + .../pigeon/example/app/linux/messages.g.cc | 548 +++++++ .../pigeon/example/app/linux/messages.g.h | 96 ++ .../example/app/linux/my_application.cc | 180 +++ .../pigeon/example/app/linux/my_application.h | 22 + .../pigeon/example/app/pigeons/messages.dart | 3 + packages/pigeon/lib/generator_tools.dart | 2 +- packages/pigeon/lib/linux_generator.dart | 1309 +++++++++++++++++ packages/pigeon/lib/pigeon.dart | 1 + packages/pigeon/lib/pigeon_lib.dart | 93 ++ packages/pigeon/pubspec.yaml | 2 +- .../pigeon/test/linux_generator_test.dart | 748 ++++++++++ packages/pigeon/tool/run_tests.dart | 2 + packages/pigeon/tool/shared/generation.dart | 8 + 22 files changed, 3350 insertions(+), 2 deletions(-) create mode 100644 packages/pigeon/example/app/linux/.gitignore create mode 100644 packages/pigeon/example/app/linux/CMakeLists.txt create mode 100644 packages/pigeon/example/app/linux/flutter/CMakeLists.txt create mode 100644 packages/pigeon/example/app/linux/flutter/generated_plugins.cmake create mode 100644 packages/pigeon/example/app/linux/main.cc create mode 100644 packages/pigeon/example/app/linux/messages.g.cc create mode 100644 packages/pigeon/example/app/linux/messages.g.h create mode 100644 packages/pigeon/example/app/linux/my_application.cc create mode 100644 packages/pigeon/example/app/linux/my_application.h create mode 100644 packages/pigeon/lib/linux_generator.dart create mode 100644 packages/pigeon/test/linux_generator_test.dart diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 6e7b64d9829f..1172764bedff 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,7 @@ +## 17.1.2 + +* Add Linux support + ## 17.1.1 * Removes heap allocation in generated C++ code. diff --git a/packages/pigeon/README.md b/packages/pigeon/README.md index 213e650c6324..6697b4c83bb4 100644 --- a/packages/pigeon/README.md +++ b/packages/pigeon/README.md @@ -17,6 +17,7 @@ Currently pigeon supports generating: * Kotlin and Java code for Android * Swift and Objective-C code for iOS and macOS * C++ code for Windows +* C++ code for Linux ### Supported Datatypes @@ -127,6 +128,13 @@ the threading model for handling HostApi methods can be selected with the 1) Implement the generated protocol for handling the calls on macOS, set it up as the handler for the messages. +### Flutter calling into Linux steps + +1) Add the generated C++ code to your `./linux` directory for compilation, and + to your `linux/CMakeLists.txt` file. +1) Implement the generated protocol for handling the calls on Linux, set it up + as the vtable for the API object. + ### Calling into Flutter from the host platform Pigeon also supports calling in the opposite direction. The steps are similar diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index b9ff98aca352..e27c06551f1b 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -19,6 +19,9 @@ needed for your project. cppOptions: CppOptions(namespace: 'pigeon_example'), cppHeaderOut: 'windows/runner/messages.g.h', cppSourceOut: 'windows/runner/messages.g.cpp', + linuxHeaderOut: 'linux/messages.g.h', + linuxSourceOut: 'linux/messages.g.cc', + linuxOptions: LinuxOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), @@ -194,6 +197,41 @@ class PigeonApiImplementation : public ExampleHostApi { }; ``` +### Linux + +```c++ +static MyExampleHostApiGetHostLanguageResponse* handle_get_host_language( + MyExampleHostApi* object, gpointer user_data) { + return my_example_host_api_get_host_language_response_new("C++"); +} + +static MyExampleHostApiAddResponse* handle_add(MyExampleHostApi* object, + int64_t a, int64_t b, + gpointer user_data) { + if (a < 0 || b < 0) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + return my_example_host_api_add_response_new_error("code", "message", + details); + } + + return my_example_host_api_add_response_new(a + b); +} + +static void handle_send_message( + MyExampleHostApi* object, MyMessageData* message, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + MyCode code = my_message_data_get_code(message); + if (code == MY_CODE_ONE) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + my_example_host_api_respond_error_send_message(object, response_handle, + "code", "message", details); + return; + } + + my_example_host_api_respond_send_message(object, response_handle, TRUE); +} +``` + ## FlutterApi Example This example gives an overview of how to use Pigeon to call into the Flutter @@ -277,6 +315,31 @@ void TestPlugin::CallFlutterMethod( } ``` +### Linux + + +```c++ +static void flutter_method_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + if (!my_message_flutter_api_flutter_method_finish( + MY_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { + g_warning("Failed to call Flutter method: %s", error->message); + return; + } + + g_printerr("Got result from Flutter method: %s\n", return_value); +} +``` + + +```c++ +self->flutter_api = my_message_flutter_api_new(messenger); +my_message_flutter_api_flutter_method_async(self->flutter_api, "hello", + nullptr, flutter_method_cb, self); +``` + ## Swift / Kotlin Plugin Example A downloadable example of using Pigeon to create a Flutter Plugin with Swift and diff --git a/packages/pigeon/example/app/lib/main.dart b/packages/pigeon/example/app/lib/main.dart index ea90231c7565..7de8e57bf4c3 100644 --- a/packages/pigeon/example/app/lib/main.dart +++ b/packages/pigeon/example/app/lib/main.dart @@ -19,6 +19,7 @@ class _ExampleFlutterApi implements MessageFlutterApi { // #enddocregion main-dart-flutter void main() { + WidgetsFlutterBinding.ensureInitialized(); // #docregion main-dart-flutter MessageFlutterApi.setup(_ExampleFlutterApi()); // #enddocregion main-dart-flutter diff --git a/packages/pigeon/example/app/linux/.gitignore b/packages/pigeon/example/app/linux/.gitignore new file mode 100644 index 000000000000..d3896c98444f --- /dev/null +++ b/packages/pigeon/example/app/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/packages/pigeon/example/app/linux/CMakeLists.txt b/packages/pigeon/example/app/linux/CMakeLists.txt new file mode 100644 index 000000000000..340076b55677 --- /dev/null +++ b/packages/pigeon/example/app/linux/CMakeLists.txt @@ -0,0 +1,140 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "pigeon_example_app") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "dev.flutter.pigeon_example_app") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "messages.g.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/packages/pigeon/example/app/linux/flutter/CMakeLists.txt b/packages/pigeon/example/app/linux/flutter/CMakeLists.txt new file mode 100644 index 000000000000..d5bd01648a96 --- /dev/null +++ b/packages/pigeon/example/app/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/packages/pigeon/example/app/linux/flutter/generated_plugins.cmake b/packages/pigeon/example/app/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000000..2e1de87a7eb6 --- /dev/null +++ b/packages/pigeon/example/app/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/packages/pigeon/example/app/linux/main.cc b/packages/pigeon/example/app/linux/main.cc new file mode 100644 index 000000000000..1507d02825e7 --- /dev/null +++ b/packages/pigeon/example/app/linux/main.cc @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc new file mode 100644 index 000000000000..96b68a1dd675 --- /dev/null +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -0,0 +1,548 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#include "messages.g.h" + +struct _MyMessageData { + GObject parent_instance; + + gchar* name; + gchar* description; + MyCode code; + FlValue* data; +}; + +G_DEFINE_TYPE(MyMessageData, my_message_data, G_TYPE_OBJECT) + +static void my_message_data_dispose(GObject* object) { + MyMessageData* self = MY_MESSAGE_DATA(object); + g_clear_pointer(&self->name, g_free); + g_clear_pointer(&self->description, g_free); + g_clear_pointer(&self->data, fl_value_unref); + G_OBJECT_CLASS(my_message_data_parent_class)->dispose(object); +} + +static void my_message_data_init(MyMessageData* self) {} + +static void my_message_data_class_init(MyMessageDataClass* klass) { + G_OBJECT_CLASS(klass)->dispose = my_message_data_dispose; +} + +MyMessageData* my_message_data_new(const gchar* name, const gchar* description, + MyCode code, FlValue* data) { + MyMessageData* self = + MY_MESSAGE_DATA(g_object_new(my_message_data_get_type(), nullptr)); + self->name = g_strdup(name); + self->description = g_strdup(description); + self->code = code; + self->data = g_object_ref(data); + return self; +} + +const gchar* my_message_data_get_name(MyMessageData* self) { + g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); + return self->name; +} + +const gchar* my_message_data_get_description(MyMessageData* self) { + g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); + return self->description; +} + +MyCode my_message_data_get_code(MyMessageData* self) { + g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), static_cast(0)); + return self->code; +} + +FlValue* my_message_data_get_data(MyMessageData* self) { + g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); + return self->data; +} + +static FlValue* my_message_data_to_list(MyMessageData* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, fl_value_new_string(self->name)); + fl_value_append_take(values, fl_value_new_string(self->description)); + fl_value_append_take(values, fl_value_new_int(self->code)); + fl_value_append_take(values, fl_value_ref(self->data)); + return values; +} + +static MyMessageData* my_message_data_new_from_list(FlValue* values) { + if (fl_value_get_type(values) != FL_VALUE_TYPE_LIST || + fl_value_get_type(fl_value_get_list_value(values, 0)) != + FL_VALUE_TYPE_STRING || + fl_value_get_type(fl_value_get_list_value(values, 1)) != + FL_VALUE_TYPE_STRING || + fl_value_get_type(fl_value_get_list_value(values, 2)) != + FL_VALUE_TYPE_INT || + fl_value_get_type(fl_value_get_list_value(values, 3)) != + FL_VALUE_TYPE_MAP) { + return nullptr; + } + + return my_message_data_new( + fl_value_get_string(fl_value_get_list_value(values, 0)), + fl_value_get_string(fl_value_get_list_value(values, 1)), + static_cast(fl_value_get_int(fl_value_get_list_value(values, 2))), + fl_value_get_list_value(values, 3)); +} + +G_DECLARE_FINAL_TYPE(MyExampleHostApiCodec, my_example_host_api_codec, MY, + EXAMPLE_HOST_API_CODEC, FlStandardMessageCodec) + +struct _MyExampleHostApiCodec { + FlStandardMessageCodec parent_instance; +}; + +G_DEFINE_TYPE(MyExampleHostApiCodec, my_example_host_api_codec, + fl_standard_message_codec_get_type()) + +static gboolean write_my_message_data(FlStandardMessageCodec* codec, + GByteArray* buffer, MyMessageData* value, + GError** error) { + uint8_t type = 128; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = my_message_data_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean my_example_host_api_write_value(FlStandardMessageCodec* codec, + GByteArray* buffer, + FlValue* value, + GError** error) { + if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { + switch (fl_value_get_custom_type(value)) { + case 128: + return write_my_message_data( + codec, buffer, + MY_MESSAGE_DATA(fl_value_get_custom_value_object(value)), error); + } + } + + return FL_STANDARD_MESSAGE_CODEC_CLASS(my_example_host_api_codec_parent_class) + ->write_value(codec, buffer, value, error); +} + +static FlValue* read_my_message_data(FlStandardMessageCodec* codec, + GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(MyMessageData) value = my_message_data_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(128, G_OBJECT(value)); +} + +static FlValue* my_example_host_api_read_value_of_type( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, + GError** error) { + switch (type) { + case 128: + return read_my_message_data(codec, buffer, offset, error); + default: + return FL_STANDARD_MESSAGE_CODEC_CLASS( + my_example_host_api_codec_parent_class) + ->read_value_of_type(codec, buffer, offset, type, error); + } +} + +static void my_example_host_api_codec_init(MyExampleHostApiCodec* self) {} + +static void my_example_host_api_codec_class_init( + MyExampleHostApiCodecClass* klass) { + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = + my_example_host_api_write_value; + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = + my_example_host_api_read_value_of_type; +} + +static MyExampleHostApiCodec* my_example_host_api_codec_new() { + MyExampleHostApiCodec* self = MY_EXAMPLE_HOST_API_CODEC( + g_object_new(my_example_host_api_codec_get_type(), nullptr)); + return self; +} + +struct _MyExampleHostApiGetHostLanguageResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(MyExampleHostApiGetHostLanguageResponse, + my_example_host_api_get_host_language_response, G_TYPE_OBJECT) + +static void my_example_host_api_get_host_language_response_dispose( + GObject* object) { + MyExampleHostApiGetHostLanguageResponse* self = + MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS(my_example_host_api_get_host_language_response_parent_class) + ->dispose(object); +} + +static void my_example_host_api_get_host_language_response_init( + MyExampleHostApiGetHostLanguageResponse* self) {} + +static void my_example_host_api_get_host_language_response_class_init( + MyExampleHostApiGetHostLanguageResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + my_example_host_api_get_host_language_response_dispose; +} + +MyExampleHostApiGetHostLanguageResponse* +my_example_host_api_get_host_language_response_new(const gchar* return_value) { + MyExampleHostApiGetHostLanguageResponse* self = + MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( + my_example_host_api_get_host_language_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +MyExampleHostApiGetHostLanguageResponse* +my_example_host_api_get_host_language_response_new_error(const gchar* code, + const gchar* message, + FlValue* details) { + MyExampleHostApiGetHostLanguageResponse* self = + MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( + my_example_host_api_get_host_language_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _MyExampleHostApiAddResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(MyExampleHostApiAddResponse, my_example_host_api_add_response, + G_TYPE_OBJECT) + +static void my_example_host_api_add_response_dispose(GObject* object) { + MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS(my_example_host_api_add_response_parent_class) + ->dispose(object); +} + +static void my_example_host_api_add_response_init( + MyExampleHostApiAddResponse* self) {} + +static void my_example_host_api_add_response_class_init( + MyExampleHostApiAddResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = my_example_host_api_add_response_dispose; +} + +MyExampleHostApiAddResponse* my_example_host_api_add_response_new( + int64_t return_value) { + MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE( + g_object_new(my_example_host_api_add_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +MyExampleHostApiAddResponse* my_example_host_api_add_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE( + g_object_new(my_example_host_api_add_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE(MyExampleHostApiSendMessageResponse, + my_example_host_api_send_message_response, MY, + EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE, GObject) + +struct _MyExampleHostApiSendMessageResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(MyExampleHostApiSendMessageResponse, + my_example_host_api_send_message_response, G_TYPE_OBJECT) + +static void my_example_host_api_send_message_response_dispose(GObject* object) { + MyExampleHostApiSendMessageResponse* self = + MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS(my_example_host_api_send_message_response_parent_class) + ->dispose(object); +} + +static void my_example_host_api_send_message_response_init( + MyExampleHostApiSendMessageResponse* self) {} + +static void my_example_host_api_send_message_response_class_init( + MyExampleHostApiSendMessageResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + my_example_host_api_send_message_response_dispose; +} + +static MyExampleHostApiSendMessageResponse* +my_example_host_api_send_message_response_new(gboolean return_value) { + MyExampleHostApiSendMessageResponse* self = + MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( + my_example_host_api_send_message_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_bool(return_value)); + return self; +} + +static MyExampleHostApiSendMessageResponse* +my_example_host_api_send_message_response_new_error(const gchar* code, + const gchar* message, + FlValue* details) { + MyExampleHostApiSendMessageResponse* self = + MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( + my_example_host_api_send_message_response_get_type(), nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _MyExampleHostApi { + GObject parent_instance; + + FlBinaryMessenger* messenger; + const MyExampleHostApiVTable* vtable; + gpointer user_data; + GDestroyNotify user_data_free_func; + + FlBasicMessageChannel* get_host_language_channel; + FlBasicMessageChannel* add_channel; + FlBasicMessageChannel* send_message_channel; +}; + +G_DEFINE_TYPE(MyExampleHostApi, my_example_host_api, G_TYPE_OBJECT) + +static void get_host_language_cb( + FlBasicMessageChannel* channel, FlValue* message, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + + if (self->vtable == nullptr || self->vtable->get_host_language == nullptr) { + return; + } + + if (fl_value_get_type(message) != FL_VALUE_TYPE_NULL) { + return; + } + + g_autoptr(MyExampleHostApiGetHostLanguageResponse) response = + self->vtable->get_host_language(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to ExampleHostApi.getHostLanguage"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to ExampleHostApi.getHostLanguage: %s", + error->message); + } +} + +static void add_cb(FlBasicMessageChannel* channel, FlValue* message, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + + if (self->vtable == nullptr || self->vtable->add == nullptr) { + return; + } + + if (fl_value_get_type(message) != FL_VALUE_TYPE_LIST || + fl_value_get_length(message) != 2 || + fl_value_get_type(fl_value_get_list_value(message, 0)) != + FL_VALUE_TYPE_INT || + fl_value_get_type(fl_value_get_list_value(message, 1)) != + FL_VALUE_TYPE_INT) { + return; + } + + g_autoptr(MyExampleHostApiAddResponse) response = self->vtable->add( + self, fl_value_get_int(fl_value_get_list_value(message, 0)), + fl_value_get_int(fl_value_get_list_value(message, 1)), self->user_data); + if (response == nullptr) { + g_warning("No response returned to ExampleHostApi.add"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to ExampleHostApi.add: %s", + error->message); + } +} + +static void send_message_cb( + FlBasicMessageChannel* channel, FlValue* message, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + + if (self->vtable == nullptr || self->vtable->send_message == nullptr) { + return; + } + + if (fl_value_get_type(message) != FL_VALUE_TYPE_LIST || + fl_value_get_length(message) != 1 || + fl_value_get_type(fl_value_get_list_value(message, 0)) != + FL_VALUE_TYPE_CUSTOM) { + return; + } + + self->vtable->send_message(self, + MY_MESSAGE_DATA(fl_value_get_custom_value_object( + fl_value_get_list_value(message, 0))), + response_handle, self->user_data); +} + +static void my_example_host_api_dispose(GObject* object) { + MyExampleHostApi* self = MY_EXAMPLE_HOST_API(object); + g_clear_object(&self->messenger); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + + g_clear_object(&self->get_host_language_channel); + g_clear_object(&self->add_channel); + g_clear_object(&self->send_message_channel); + G_OBJECT_CLASS(my_example_host_api_parent_class)->dispose(object); +} + +static void my_example_host_api_init(MyExampleHostApi* self) {} + +static void my_example_host_api_class_init(MyExampleHostApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = my_example_host_api_dispose; +} + +MyExampleHostApi* my_example_host_api_new(FlBinaryMessenger* messenger, + const MyExampleHostApiVTable* vtable, + gpointer user_data, + GDestroyNotify user_data_free_func) { + MyExampleHostApi* self = MY_EXAMPLE_HOST_API( + g_object_new(my_example_host_api_get_type(), nullptr)); + self->messenger = g_object_ref(messenger); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + + g_autoptr(MyExampleHostApiCodec) codec = my_example_host_api_codec_new(); + self->get_host_language_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_example_package." + "ExampleHostApi.getHostLanguage", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->get_host_language_channel, get_host_language_cb, self, nullptr); + self->add_channel = fl_basic_message_channel_new( + messenger, "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->add_channel, add_cb, self, + nullptr); + self->send_message_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->send_message_channel, + send_message_cb, self, nullptr); + + return self; +} + +void my_example_host_api_respond_send_message( + MyExampleHostApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value) { + g_autoptr(MyExampleHostApiSendMessageResponse) response = + my_example_host_api_send_message_response_new(return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->send_message_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to ExampleHostApi.sendMessage: %s", + error->message); + } +} + +void my_example_host_api_respond_error_send_message( + MyExampleHostApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(MyExampleHostApiSendMessageResponse) response = + my_example_host_api_send_message_response_new_error(code, message, + details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->send_message_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to ExampleHostApi.sendMessage: %s", + error->message); + } +} + +struct _MyMessageFlutterApi { + GObject parent_instance; + + FlBinaryMessenger* messenger; +}; + +G_DEFINE_TYPE(MyMessageFlutterApi, my_message_flutter_api, G_TYPE_OBJECT) + +static void my_message_flutter_api_dispose(GObject* object) { + MyMessageFlutterApi* self = MY_MESSAGE_FLUTTER_API(object); + g_clear_object(&self->messenger); + G_OBJECT_CLASS(my_message_flutter_api_parent_class)->dispose(object); +} + +static void my_message_flutter_api_init(MyMessageFlutterApi* self) {} + +static void my_message_flutter_api_class_init(MyMessageFlutterApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = my_message_flutter_api_dispose; +} + +MyMessageFlutterApi* my_message_flutter_api_new(FlBinaryMessenger* messenger) { + MyMessageFlutterApi* self = MY_MESSAGE_FLUTTER_API( + g_object_new(my_message_flutter_api_get_type(), nullptr)); + self->messenger = g_object_ref(messenger); + return self; +} + +void my_message_flutter_api_flutter_method_async(MyMessageFlutterApi* object, + const gchar* a_string, + GCancellable* cancellable, + GAsyncReadyCallback callback, + gpointer user_data) {} + +gboolean my_message_flutter_api_flutter_method_finish( + MyMessageFlutterApi* object, GAsyncResult* result, gchar** return_value, + GError** error) { + return TRUE; +} diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h new file mode 100644 index 000000000000..fb23de7292b6 --- /dev/null +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -0,0 +1,96 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#ifndef PIGEON_MESSAGES_G_H_ +#define PIGEON_MESSAGES_G_H_ + +#include + +G_BEGIN_DECLS + +typedef enum { MY_CODE_ONE = 0, MY_CODE_TWO = 1 } MyCode; + +G_DECLARE_FINAL_TYPE(MyMessageData, my_message_data, MY, MESSAGE_DATA, GObject) + +MyMessageData* my_message_data_new(const gchar* name, const gchar* description, + MyCode code, FlValue* data); + +const gchar* my_message_data_get_name(MyMessageData* object); + +const gchar* my_message_data_get_description(MyMessageData* object); + +MyCode my_message_data_get_code(MyMessageData* object); + +FlValue* my_message_data_get_data(MyMessageData* object); + +G_DECLARE_FINAL_TYPE(MyExampleHostApiGetHostLanguageResponse, + my_example_host_api_get_host_language_response, MY, + EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE, GObject) + +MyExampleHostApiGetHostLanguageResponse* +my_example_host_api_get_host_language_response_new(const gchar* return_value); + +MyExampleHostApiGetHostLanguageResponse* +my_example_host_api_get_host_language_response_new_error(const gchar* code, + const gchar* message, + FlValue* details); + +G_DECLARE_FINAL_TYPE(MyExampleHostApiAddResponse, + my_example_host_api_add_response, MY, + EXAMPLE_HOST_API_ADD_RESPONSE, GObject) + +MyExampleHostApiAddResponse* my_example_host_api_add_response_new( + int64_t return_value); + +MyExampleHostApiAddResponse* my_example_host_api_add_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE(MyExampleHostApi, my_example_host_api, MY, + EXAMPLE_HOST_API, GObject) + +typedef struct { + MyExampleHostApiGetHostLanguageResponse* (*get_host_language)( + MyExampleHostApi* object, gpointer user_data); + MyExampleHostApiAddResponse* (*add)(MyExampleHostApi* object, int64_t a, + int64_t b, gpointer user_data); + void (*send_message)(MyExampleHostApi* object, MyMessageData* message, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); +} MyExampleHostApiVTable; + +MyExampleHostApi* my_example_host_api_new(FlBinaryMessenger* messenger, + const MyExampleHostApiVTable* vtable, + gpointer user_data, + GDestroyNotify user_data_free_func); + +void my_example_host_api_respond_send_message( + MyExampleHostApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value); + +void my_example_host_api_respond_error_send_message( + MyExampleHostApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE(MyMessageFlutterApi, my_message_flutter_api, MY, + MESSAGE_FLUTTER_API, GObject) + +MyMessageFlutterApi* my_message_flutter_api_new(FlBinaryMessenger* messenger); + +void my_message_flutter_api_flutter_method_async(MyMessageFlutterApi* object, + const gchar* a_string, + GCancellable* cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean my_message_flutter_api_flutter_method_finish( + MyMessageFlutterApi* object, GAsyncResult* result, gchar** return_value, + GError** error); + +G_END_DECLS + +#endif // PIGEON_MESSAGES_G_H_ diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc new file mode 100644 index 000000000000..be4c1249ba39 --- /dev/null +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -0,0 +1,180 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" +#include "messages.g.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; + + MyExampleHostApi* example_host_api; + + MyMessageFlutterApi* flutter_api; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// #docregion vtable +static MyExampleHostApiGetHostLanguageResponse* handle_get_host_language( + MyExampleHostApi* object, gpointer user_data) { + return my_example_host_api_get_host_language_response_new("C++"); +} + +static MyExampleHostApiAddResponse* handle_add(MyExampleHostApi* object, + int64_t a, int64_t b, + gpointer user_data) { + if (a < 0 || b < 0) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + return my_example_host_api_add_response_new_error("code", "message", + details); + } + + return my_example_host_api_add_response_new(a + b); +} + +static void handle_send_message( + MyExampleHostApi* object, MyMessageData* message, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + MyCode code = my_message_data_get_code(message); + if (code == MY_CODE_ONE) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + my_example_host_api_respond_error_send_message(object, response_handle, + "code", "message", details); + return; + } + + my_example_host_api_respond_send_message(object, response_handle, TRUE); +} +// #enddocregion vtable + +// #docregion flutter-method-callback +static void flutter_method_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + if (!my_message_flutter_api_flutter_method_finish( + MY_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { + g_warning("Failed to call Flutter method: %s", error->message); + return; + } + + g_printerr("Got result from Flutter method: %s\n", return_value); +} +// #enddocregion flutter-method-callback + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "pigeon_example_app"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "pigeon_example_app"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + FlBinaryMessenger* messenger = + fl_engine_get_binary_messenger(fl_view_get_engine(view)); + static MyExampleHostApiVTable example_host_api_vtable = { + .get_host_language = handle_get_host_language, + .add = handle_add, + .send_message = handle_send_message}; + self->example_host_api = my_example_host_api_new( + messenger, &example_host_api_vtable, self, nullptr); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); + + // #docregion flutter-method + self->flutter_api = my_message_flutter_api_new(messenger); + my_message_flutter_api_flutter_method_async(self->flutter_api, "hello", + nullptr, flutter_method_cb, self); + // #enddocregion flutter-method +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + g_clear_object(&self->example_host_api); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); +} diff --git a/packages/pigeon/example/app/linux/my_application.h b/packages/pigeon/example/app/linux/my_application.h new file mode 100644 index 000000000000..6e9f0c3ff665 --- /dev/null +++ b/packages/pigeon/example/app/linux/my_application.h @@ -0,0 +1,22 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/packages/pigeon/example/app/pigeons/messages.dart b/packages/pigeon/example/app/pigeons/messages.dart index da66c0e8553d..9f74b6bde856 100644 --- a/packages/pigeon/example/app/pigeons/messages.dart +++ b/packages/pigeon/example/app/pigeons/messages.dart @@ -11,6 +11,9 @@ import 'package:pigeon/pigeon.dart'; cppOptions: CppOptions(namespace: 'pigeon_example'), cppHeaderOut: 'windows/runner/messages.g.h', cppSourceOut: 'windows/runner/messages.g.cpp', + linuxHeaderOut: 'linux/messages.g.h', + linuxSourceOut: 'linux/messages.g.cc', + linuxOptions: LinuxOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart index 00ce3fede820..8540fdaec151 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -13,7 +13,7 @@ import 'ast.dart'; /// The current version of pigeon. /// /// This must match the version in pubspec.yaml. -const String pigeonVersion = '17.1.1'; +const String pigeonVersion = '17.1.2'; /// Read all the content from [stdin] to a String. String readStdin() { diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart new file mode 100644 index 000000000000..b28734328d44 --- /dev/null +++ b/packages/pigeon/lib/linux_generator.dart @@ -0,0 +1,1309 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'ast.dart'; +import 'generator.dart'; +import 'generator_tools.dart'; + +/// General comment opening token. +const String _commentPrefix = '//'; + +/// Documentation comment spec. +const DocumentCommentSpecification _docCommentSpec = + DocumentCommentSpecification(_commentPrefix); + +/// Options that control how Linux code will be generated. +class LinuxOptions { + /// Creates a [LinuxOptions] object + const LinuxOptions({ + this.headerIncludePath, + this.module = 'My', + this.copyrightHeader, + this.headerOutPath, + }); + + /// The path to the header that will get placed in the source filed (example: + /// "foo.h"). + final String? headerIncludePath; + + /// The module where the generated class will live. + final String module; + + /// A copyright header that will get prepended to generated code. + final Iterable? copyrightHeader; + + /// The path to the output header file location. + final String? headerOutPath; + + /// Creates a [LinuxOptions] from a Map representation where: + /// `x = LinuxOptions.fromMap(x.toMap())`. + static LinuxOptions fromMap(Map map) { + return LinuxOptions( + headerIncludePath: map['header'] as String?, + module: map['module'] as String? ?? 'My', + copyrightHeader: map['copyrightHeader'] as Iterable?, + headerOutPath: map['linuxHeaderOut'] as String?, + ); + } + + /// Converts a [LinuxOptions] to a Map representation where: + /// `x = LinuxOptions.fromMap(x.toMap())`. + Map toMap() { + final Map result = { + if (headerIncludePath != null) 'header': headerIncludePath!, + 'module': module, + if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, + }; + return result; + } + + /// Overrides any non-null parameters from [options] into this to make a new + /// [LinuxOptions]. + LinuxOptions merge(LinuxOptions options) { + return LinuxOptions.fromMap(mergeMaps(toMap(), options.toMap())); + } +} + +/// Class that manages all Linux code generation. +class LinuxGenerator extends Generator> { + /// Constructor. + const LinuxGenerator(); + + /// Generates Linux file of type specified in [generatorOptions] + @override + void generate( + OutputFileOptions generatorOptions, + Root root, + StringSink sink, { + required String dartPackageName, + }) { + assert(generatorOptions.fileType == FileType.header || + generatorOptions.fileType == FileType.source); + if (generatorOptions.fileType == FileType.header) { + const LinuxHeaderGenerator().generate( + generatorOptions.languageOptions, + root, + sink, + dartPackageName: dartPackageName, + ); + } else if (generatorOptions.fileType == FileType.source) { + const LinuxSourceGenerator().generate( + generatorOptions.languageOptions, + root, + sink, + dartPackageName: dartPackageName, + ); + } + } +} + +/// Writes Linux header (.h) file to sink. +class LinuxHeaderGenerator extends StructuredGenerator { + /// Constructor. + const LinuxHeaderGenerator(); + + @override + void writeFilePrologue( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + if (generatorOptions.copyrightHeader != null) { + addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); + } + indent.writeln('$_commentPrefix ${getGeneratedCodeWarning()}'); + indent.writeln('$_commentPrefix $seeAlsoWarning'); + } + + @override + void writeFileImports( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + indent.newln(); + final String guardName = _getGuardName(generatorOptions.headerIncludePath); + indent.writeln('#ifndef $guardName'); + indent.writeln('#define $guardName'); + + indent.newln(); + indent.writeln('#include '); + } + + @override + void writeOpenNamespace( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + indent.newln(); + indent.writeln('G_BEGIN_DECLS'); + } + + @override + void writeEnum( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Enum anEnum, { + required String dartPackageName, + }) { + final String enumName = _getClassName(generatorOptions.module, anEnum.name); + + indent.newln(); + addDocumentationComments( + indent, anEnum.documentationComments, _docCommentSpec); + indent.addScoped('typedef enum {', '} $enumName;', () { + for (int i = 0; i < anEnum.members.length; i++) { + final EnumMember member = anEnum.members[i]; + final String itemName = + _getEnumValue(generatorOptions.module, anEnum.name, member.name); + addDocumentationComments( + indent, member.documentationComments, _docCommentSpec); + indent.writeln( + '$itemName = $i${i == anEnum.members.length - 1 ? '' : ','}'); + } + }); + } + + @override + void writeDataClass( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Class classDefinition, { + required String dartPackageName, + }) { + final String className = + _getClassName(generatorOptions.module, classDefinition.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, classDefinition.name); + + indent.newln(); + addDocumentationComments( + indent, classDefinition.documentationComments, _docCommentSpec); + _writeDeclareFinalType( + indent, generatorOptions.module, classDefinition.name); + + indent.newln(); + final List constructorArgs = []; + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String type = _getType(generatorOptions.module, field.type); + constructorArgs.add('$type $fieldName'); + } + indent.writeln( + "$className* ${methodPrefix}_new(${constructorArgs.join(', ')});"); + + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String returnType = _getType(generatorOptions.module, field.type); + + indent.newln(); + addDocumentationComments( + indent, field.documentationComments, _docCommentSpec); + indent.writeln( + '$returnType ${methodPrefix}_get_$fieldName($className* object);'); + } + } + + @override + void writeFlutterApi( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Api api, { + required String dartPackageName, + }) { + final String className = _getClassName(generatorOptions.module, api.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, api.name); + + indent.newln(); + addDocumentationComments( + indent, api.documentationComments, _docCommentSpec); + _writeDeclareFinalType(indent, generatorOptions.module, api.name); + + indent.newln(); + indent.writeln( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger);'); + + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + + final List asyncArgs = ['$className* object']; + for (final Parameter param in method.parameters) { + final String paramName = _snakeCaseFromCamelCase(param.name); + final String paramType = _getType(generatorOptions.module, param.type); + asyncArgs.add('$paramType $paramName'); + } + asyncArgs.addAll([ + 'GCancellable* cancellable', + 'GAsyncReadyCallback callback', + 'gpointer user_data' + ]); + indent.newln(); + addDocumentationComments( + indent, method.documentationComments, _docCommentSpec); + indent.writeln( + "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); + + final List finishArgs = [ + '$className* object', + 'GAsyncResult* result' + ]; + final String returnType = + _getType(generatorOptions.module, method.returnType, isOutput: true); + if (returnType != 'void') { + finishArgs.add('$returnType* return_value'); + } + finishArgs.add('GError** error'); + indent.newln(); + indent.writeln( + "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); + } + } + + @override + void writeHostApi( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Api api, { + required String dartPackageName, + }) { + final String className = _getClassName(generatorOptions.module, api.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, api.name); + final String vtableName = '${className}VTable'; + + for (final Method method + in api.methods.where((Method method) => !method.isAsynchronous)) { + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = + _getClassName(generatorOptions.module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(generatorOptions.module, responseName); + + indent.newln(); + _writeDeclareFinalType(indent, generatorOptions.module, responseName); + + final String returnType = + _getType(generatorOptions.module, method.returnType); + indent.newln(); + indent.writeln( + '$responseClassName* ${responseMethodPrefix}_new($returnType return_value);'); + + indent.newln(); + indent.writeln( + '$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details);'); + } + + indent.newln(); + _writeDeclareFinalType(indent, generatorOptions.module, api.name); + + indent.newln(); + indent.addScoped('typedef struct {', '} $vtableName;', () { + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = + _getClassName(generatorOptions.module, responseName); + + final List methodArgs = ['$className* object']; + for (final Parameter param in method.parameters) { + final String paramName = _snakeCaseFromCamelCase(param.name); + final String paramType = + _getType(generatorOptions.module, param.type); + methodArgs.add('$paramType $paramName'); + } + final String returnType; + if (method.isAsynchronous) { + methodArgs + .add('FlBasicMessageChannelResponseHandle* response_handle'); + returnType = 'void'; + } else { + returnType = '$responseClassName*'; + } + methodArgs.add('gpointer user_data'); + indent.writeln("$returnType (*$methodName)(${methodArgs.join(', ')});"); + } + }); + + indent.newln(); + indent.writeln( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + + for (final Method method + in api.methods.where((Method method) => method.isAsynchronous)) { + final String methodName = _snakeCaseFromCamelCase(method.name); + final String returnType = + _getType(generatorOptions.module, method.returnType); + + indent.newln(); + final List respondArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + '$returnType return_value' + ]; + indent.writeln( + "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); + + indent.newln(); + final List respondErrorArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + 'const gchar* code', + 'const gchar* message', + 'FlValue* details' + ]; + indent.writeln( + "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')});"); + } + } + + @override + void writeCloseNamespace( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + indent.newln(); + indent.writeln('G_END_DECLS'); + + indent.newln(); + final String guardName = _getGuardName(generatorOptions.headerIncludePath); + indent.writeln('#endif // $guardName'); + } +} + +/// Writes Linux source (.cc) file to sink. +class LinuxSourceGenerator extends StructuredGenerator { + /// Constructor. + const LinuxSourceGenerator(); + + @override + void writeFilePrologue( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + if (generatorOptions.copyrightHeader != null) { + addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); + } + indent.writeln('$_commentPrefix ${getGeneratedCodeWarning()}'); + indent.writeln('$_commentPrefix $seeAlsoWarning'); + } + + @override + void writeFileImports( + LinuxOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + indent.newln(); + indent.writeln('#include "${generatorOptions.headerIncludePath}"'); + } + + @override + void writeDataClass( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Class classDefinition, { + required String dartPackageName, + }) { + final String snakeModule = _snakeCaseFromCamelCase(generatorOptions.module); + final String className = + _getClassName(generatorOptions.module, classDefinition.name); + final String snakeClassName = _snakeCaseFromCamelCase(classDefinition.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, classDefinition.name); + final String testMacro = '${snakeModule}_IS_$snakeClassName'.toUpperCase(); + + indent.newln(); + _writeObjectStruct(indent, generatorOptions.module, classDefinition.name, + () { + indent.newln(); + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldType = + _getType(generatorOptions.module, field.type, isOutput: true); + indent.writeln('$fieldType $fieldName;'); + } + }); + + indent.newln(); + _writeDefineType(indent, generatorOptions.module, classDefinition.name); + + indent.newln(); + _writeDispose(indent, generatorOptions.module, classDefinition.name, () { + bool haveSelf = false; + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String? clear = _getClearFunction(field.type, 'self->$fieldName'); + if (clear != null) { + if (!haveSelf) { + _writeCastSelf(indent, generatorOptions.module, + classDefinition.name, 'object'); + haveSelf = true; + } + indent.writeln('$clear;'); + } + } + }); + + indent.newln(); + _writeInit(indent, generatorOptions.module, classDefinition.name, () {}); + + indent.newln(); + _writeClassInit( + indent, generatorOptions.module, classDefinition.name, () {}); + + final List constructorArgs = []; + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String type = _getType(generatorOptions.module, field.type); + constructorArgs.add('$type $fieldName'); + } + indent.newln(); + indent.addScoped( + "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', + () { + _writeObjectNew(indent, generatorOptions.module, classDefinition.name); + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String value = _referenceValue(field.type, fieldName); + + indent.writeln('self->$fieldName = $value;'); + } + indent.writeln('return self;'); + }); + + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String returnType = _getType(generatorOptions.module, field.type); + + indent.newln(); + indent.addScoped( + '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', + () { + indent.writeln( + 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(generatorOptions.module, field.type)});'); + indent.writeln('return self->$fieldName;'); + }); + } + + indent.newln(); + indent.addScoped( + 'static FlValue* ${methodPrefix}_to_list($className* self) {', '}', () { + indent.writeln('FlValue* values = fl_value_new_list();'); + for (final NamedType field in classDefinition.fields) { + final String fieldName = _snakeCaseFromCamelCase(field.name); + indent.writeln( + 'fl_value_append_take(values, ${_makeFlValue(generatorOptions.module, field.type, 'self->$fieldName')});'); + } + indent.writeln('return values;'); + }); + + indent.newln(); + indent.addScoped( + 'static $className* ${methodPrefix}_new_from_list(FlValue* values) {', + '}', () { + final List checks = [ + 'fl_value_get_type(values) != FL_VALUE_TYPE_LIST' + ]; + for (int i = 0; i < classDefinition.fields.length; i++) { + final NamedType field = classDefinition.fields[i]; + checks.add( + 'fl_value_get_type(fl_value_get_list_value(values, $i)) != ${_getFlValueType(field.type)}'); + } + indent.addScoped("if (${checks.join(' || ')}) {", '}', () { + indent.writeln('return nullptr;'); + }); + indent.newln(); + final List args = []; + for (int i = 0; i < classDefinition.fields.length; i++) { + final NamedType field = classDefinition.fields[i]; + args.add(_fromFlValue(generatorOptions.module, field.type, + 'fl_value_get_list_value(values, $i)')); + } + indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); + }); + } + + @override + void writeFlutterApi( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Api api, { + required String dartPackageName, + }) { + final String className = _getClassName(generatorOptions.module, api.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, api.name); + + indent.newln(); + _writeObjectStruct(indent, generatorOptions.module, api.name, () { + indent.writeln('FlBinaryMessenger* messenger;'); + }); + + indent.newln(); + _writeDefineType(indent, generatorOptions.module, api.name); + + indent.newln(); + _writeDispose(indent, generatorOptions.module, api.name, () { + _writeCastSelf(indent, generatorOptions.module, api.name, 'object'); + indent.writeln('g_clear_object(&self->messenger);'); + }); + + indent.newln(); + _writeInit(indent, generatorOptions.module, api.name, () {}); + + indent.newln(); + _writeClassInit(indent, generatorOptions.module, api.name, () {}); + + indent.newln(); + indent.addScoped( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', + () { + _writeObjectNew(indent, generatorOptions.module, api.name); + indent.writeln('self->messenger = g_object_ref(messenger);'); + indent.writeln('return self;'); + }); + + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + + final List asyncArgs = ['$className* object']; + for (final Parameter param in method.parameters) { + final String paramName = _snakeCaseFromCamelCase(param.name); + final String paramType = _getType(generatorOptions.module, param.type); + asyncArgs.add('$paramType $paramName'); + } + asyncArgs.addAll([ + 'GCancellable* cancellable', + 'GAsyncReadyCallback callback', + 'gpointer user_data' + ]); + indent.newln(); + indent.addScoped( + "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')}) {", + '}', + () {}); + + final List finishArgs = [ + '$className* object', + 'GAsyncResult* result' + ]; + final String returnType = + _getType(generatorOptions.module, method.returnType, isOutput: true); + if (returnType != 'void') { + finishArgs.add('$returnType* return_value'); + } + finishArgs.add('GError** error'); + indent.newln(); + indent.addScoped( + "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", + '}', () { + indent.writeln('return TRUE;'); + }); + } + } + + @override + void writeHostApi( + LinuxOptions generatorOptions, + Root root, + Indent indent, + Api api, { + required String dartPackageName, + }) { + final String className = _getClassName(generatorOptions.module, api.name); + + final String methodPrefix = + _getMethodPrefix(generatorOptions.module, api.name); + final String vtableName = '${className}VTable'; + + final String codecName = '${api.name}Codec'; + final String codecClassName = + _getClassName(generatorOptions.module, codecName); + final String codecMethodPrefix = '${methodPrefix}_codec'; + + indent.newln(); + _writeDeclareFinalType(indent, generatorOptions.module, codecName, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeObjectStruct(indent, generatorOptions.module, codecName, () {}, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeDefineType(indent, generatorOptions.module, codecName, + parentType: 'fl_standard_message_codec_get_type()'); + + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = + _getClassName(generatorOptions.module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.newln(); + indent.addScoped( + 'static gboolean write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', + '}', () { + indent.writeln('uint8_t type = ${customClass.enumeration};'); + indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); + indent.writeln( + 'g_autoptr(FlValue) values = ${snakeCustomClassName}_to_list(value);'); + indent.writeln( + 'return fl_standard_message_codec_write_value(codec, buffer, values, error);'); + }); + } + + indent.newln(); + indent.addScoped( + 'static gboolean ${methodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', + '}', () { + indent.addScoped( + 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { + indent.addScoped('switch (fl_value_get_custom_type(value)) {', '}', () { + for (final EnumeratedClass customClass + in getCodecClasses(api, root)) { + indent.writeln('case ${customClass.enumeration}:'); + indent.nest(1, () { + final String customClassName = + _getClassName(generatorOptions.module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + final String castMacro = + _getClassCastMacro(generatorOptions.module, customClass.name); + indent.writeln( + 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); + }); + } + }); + }); + + indent.newln(); + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->write_value(codec, buffer, value, error);'); + }); + + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = + _getClassName(generatorOptions.module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.newln(); + indent.addScoped( + 'static FlValue* read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', + '}', () { + indent.writeln( + 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); + indent.addScoped('if (values == nullptr) {', '}', () { + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'g_autoptr($customClassName) value = ${snakeCustomClassName}_new_from_list(values);'); + indent.addScoped('if (value == nullptr) {', '}', () { + indent.writeln( + 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'return fl_value_new_custom_object_take(${customClass.enumeration}, G_OBJECT(value));'); + }); + } + + indent.newln(); + indent.addScoped( + 'static FlValue* ${methodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', + '}', () { + indent.addScoped('switch (type) {', '}', () { + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = + _getClassName(generatorOptions.module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.writeln('case ${customClass.enumeration}:'); + indent.nest(1, () { + indent.writeln( + 'return read_$snakeCustomClassName(codec, buffer, offset, error);'); + }); + } + + indent.writeln('default:'); + indent.nest(1, () { + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); + }); + }); + }); + + indent.newln(); + _writeInit(indent, generatorOptions.module, codecName, () {}); + + indent.newln(); + _writeClassInit(indent, generatorOptions.module, codecName, () { + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = ${methodPrefix}_read_value_of_type;'); + }, hasDispose: false); + + indent.newln(); + indent.addScoped( + 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { + _writeObjectNew(indent, generatorOptions.module, codecName); + indent.writeln('return self;'); + }); + + for (final Method method in api.methods) { + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = + _getClassName(generatorOptions.module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(generatorOptions.module, responseName); + + if (method.isAsynchronous) { + indent.newln(); + _writeDeclareFinalType(indent, generatorOptions.module, responseName); + } + + indent.newln(); + _writeObjectStruct(indent, generatorOptions.module, responseName, () { + indent.writeln('FlValue* value;'); + }); + + indent.newln(); + _writeDefineType(indent, generatorOptions.module, responseName); + + indent.newln(); + _writeDispose(indent, generatorOptions.module, responseName, () { + _writeCastSelf(indent, generatorOptions.module, responseName, 'object'); + indent.writeln('g_clear_pointer(&self->value, fl_value_unref);'); + }); + + indent.newln(); + _writeInit(indent, generatorOptions.module, responseName, () {}); + + indent.newln(); + _writeClassInit(indent, generatorOptions.module, responseName, () {}); + + final String returnType = + _getType(generatorOptions.module, method.returnType); + indent.newln(); + indent.addScoped( + "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", + '}', () { + _writeObjectNew(indent, generatorOptions.module, responseName); + indent.writeln('self->value = fl_value_new_list();'); + indent.writeln( + "fl_value_append_take(self->value, ${_makeFlValue(generatorOptions.module, method.returnType, 'return_value')});"); + indent.writeln('return self;'); + }); + + indent.newln(); + indent.addScoped( + '${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details) {', + '}', () { + _writeObjectNew(indent, generatorOptions.module, responseName); + indent.writeln('self->value = fl_value_new_list();'); + indent.writeln( + 'fl_value_append_take(self->value, fl_value_new_string(code));'); + indent.writeln( + 'fl_value_append_take(self->value, fl_value_new_string(message));'); + indent.writeln('fl_value_append(self->value, details);'); + indent.writeln('return self;'); + }); + } + + indent.newln(); + _writeObjectStruct(indent, generatorOptions.module, api.name, () { + indent.writeln('FlBinaryMessenger* messenger;'); + indent.writeln('const ${className}VTable* vtable;'); + indent.writeln('gpointer user_data;'); + indent.writeln('GDestroyNotify user_data_free_func;'); + + indent.newln(); + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + indent.writeln('FlBasicMessageChannel* ${methodName}_channel;'); + } + }); + + indent.newln(); + _writeDefineType(indent, generatorOptions.module, api.name); + + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = + _getClassName(generatorOptions.module, responseName); + + indent.newln(); + indent.addScoped( + 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', + '}', () { + _writeCastSelf(indent, generatorOptions.module, api.name, 'user_data'); + + indent.newln(); + indent.addScoped( + 'if (self->vtable == nullptr || self->vtable->$methodName == nullptr) {', + '}', () { + indent.writeln('return;'); + }); + + final List checks = []; + final List methodArgs = []; + if (method.parameters.isEmpty) { + checks.add('fl_value_get_type(message) != FL_VALUE_TYPE_NULL'); + } else { + checks.add('fl_value_get_type(message) != FL_VALUE_TYPE_LIST'); + checks.add( + 'fl_value_get_length(message) != ${method.parameters.length}'); + for (int i = 0; i < method.parameters.length; i++) { + final Parameter param = method.parameters[i]; + checks.add( + 'fl_value_get_type(fl_value_get_list_value(message, $i)) != ${_getFlValueType(param.type)}'); + methodArgs.add(_fromFlValue(generatorOptions.module, param.type, + 'fl_value_get_list_value(message, $i)')); + } + } + + indent.newln(); + indent.addScoped("if (${checks.join(' || ')}) {", '}', () { + indent.writeln('return;'); + }); + + indent.newln(); + if (method.isAsynchronous) { + final List vfuncArgs = ['self']; + vfuncArgs.addAll(methodArgs); + vfuncArgs.addAll(['response_handle', 'self->user_data']); + indent.writeln("self->vtable->$methodName(${vfuncArgs.join(', ')});"); + } else { + final List vfuncArgs = ['self']; + vfuncArgs.addAll(methodArgs); + vfuncArgs.add('self->user_data'); + indent.writeln( + "g_autoptr($responseClassName) response = self->vtable->$methodName(${vfuncArgs.join(', ')});"); + indent.addScoped('if (response == nullptr) {', '}', () { + indent.writeln( + 'g_warning("No response returned to ${api.name}.${method.name}");'); + indent.writeln('return;'); + }); + + indent.newln(); + indent.writeln('g_autoptr(GError) error = NULL;'); + indent.addScoped( + 'if (!fl_basic_message_channel_respond(channel, response_handle, response->value, &error)) {', + '}', () { + indent.writeln( + 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + }); + } + }); + } + + indent.newln(); + _writeDispose(indent, generatorOptions.module, api.name, () { + _writeCastSelf(indent, generatorOptions.module, api.name, 'object'); + indent.writeln('g_clear_object(&self->messenger);'); + indent.addScoped('if (self->user_data != nullptr) {', '}', () { + indent.writeln('self->user_data_free_func(self->user_data);'); + }); + indent.writeln('self->user_data = nullptr;'); + + indent.newln(); + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + indent.writeln('g_clear_object(&self->${methodName}_channel);'); + } + }); + + indent.newln(); + _writeInit(indent, generatorOptions.module, api.name, () {}); + + indent.newln(); + _writeClassInit(indent, generatorOptions.module, api.name, () {}); + + indent.newln(); + indent.addScoped( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', + '}', () { + _writeObjectNew(indent, generatorOptions.module, api.name); + indent.writeln('self->messenger = g_object_ref(messenger);'); + indent.writeln('self->vtable = vtable;'); + indent.writeln('self->user_data = user_data;'); + indent.writeln('self->user_data_free_func = user_data_free_func;'); + + indent.newln(); + indent.writeln( + 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); + for (final Method method in api.methods) { + final String methodName = _snakeCaseFromCamelCase(method.name); + final String channelName = + makeChannelName(api, method, dartPackageName); + indent.writeln( + 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, "$channelName", FL_MESSAGE_CODEC(codec));'); + indent.writeln( + 'fl_basic_message_channel_set_message_handler(self->${methodName}_channel, ${methodName}_cb, self, nullptr);'); + } + + indent.newln(); + indent.writeln('return self;'); + }); + + for (final Method method + in api.methods.where((Method method) => method.isAsynchronous)) { + final String returnType = + _getType(generatorOptions.module, method.returnType); + final String methodName = _snakeCaseFromCamelCase(method.name); + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = + _getClassName(generatorOptions.module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(generatorOptions.module, responseName); + + indent.newln(); + final List respondArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + '$returnType return_value' + ]; + indent.addScoped( + "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')}) {", + '}', () { + indent.writeln( + 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(return_value);'); + indent.writeln('g_autoptr(GError) error = nullptr;'); + indent.addScoped( + 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', + '}', () { + indent.writeln( + 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + }); + }); + + indent.newln(); + final List respondErrorArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + 'const gchar* code', + 'const gchar* message', + 'FlValue* details' + ]; + indent.addScoped( + "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')}) {", + '}', () { + indent.writeln( + 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new_error(code, message, details);'); + indent.writeln('g_autoptr(GError) error = nullptr;'); + indent.addScoped( + 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', + '}', () { + indent.writeln( + 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + }); + }); + } + } +} + +// Returns the header guard defintion for [headerFileName]. +String _getGuardName(String? headerFileName) { + const String prefix = 'PIGEON_'; + if (headerFileName != null) { + return '$prefix${headerFileName.replaceAll('.', '_').toUpperCase()}_'; + } else { + return '${prefix}H_'; + } +} + +// Writes the GObject macro to generate a new type. +void _writeDeclareFinalType(Indent indent, String module, String name, + {String parentClassName = 'GObject'}) { + final String upperModule = module.toUpperCase(); + final String className = _getClassName(module, name); + final String snakeClassName = _snakeCaseFromCamelCase(name); + final String upperSnakeClassName = snakeClassName.toUpperCase(); + final String methodPrefix = _getMethodPrefix(module, name); + + indent.writeln( + 'G_DECLARE_FINAL_TYPE($className, $methodPrefix, $upperModule, $upperSnakeClassName, $parentClassName)'); +} + +// Writes the GObject macro to define a new type. +void _writeDefineType(Indent indent, String module, String name, + {String parentType = 'G_TYPE_OBJECT'}) { + final String className = _getClassName(module, name); + final String methodPrefix = _getMethodPrefix(module, name); + + indent.writeln('G_DEFINE_TYPE($className, $methodPrefix, $parentType)'); +} + +// Writes the struct for a GObject. +void _writeObjectStruct( + Indent indent, String module, String name, Function func, + {String parentClassName = 'GObject'}) { + final String className = _getClassName(module, name); + + indent.addScoped('struct _$className {', '};', () { + indent.writeln('$parentClassName parent_instance;'); + indent.newln(); + + func(); // ignore: avoid_dynamic_calls + }); +} + +// Writes the dispose method for a GObject. +void _writeDispose(Indent indent, String module, String name, Function func) { + final String methodPrefix = _getMethodPrefix(module, name); + + indent.addScoped( + 'static void ${methodPrefix}_dispose(GObject *object) {', '}', () { + func(); // ignore: avoid_dynamic_calls + indent.writeln( + 'G_OBJECT_CLASS(${methodPrefix}_parent_class)->dispose(object);'); + }); +} + +// Writes the init function for a GObject. +void _writeInit(Indent indent, String module, String name, Function func) { + final String className = _getClassName(module, name); + final String methodPrefix = _getMethodPrefix(module, name); + + indent.addScoped('static void ${methodPrefix}_init($className* self) {', '}', + () { + func(); // ignore: avoid_dynamic_calls + }); +} + +// Writes the class init function for a GObject. +void _writeClassInit(Indent indent, String module, String name, Function func, + {bool hasDispose = true}) { + final String className = _getClassName(module, name); + final String methodPrefix = _getMethodPrefix(module, name); + + indent.addScoped( + 'static void ${methodPrefix}_class_init(${className}Class* klass) {', '}', + () { + if (hasDispose) { + indent + .writeln('G_OBJECT_CLASS(klass)->dispose = ${methodPrefix}_dispose;'); + } + func(); // ignore: avoid_dynamic_calls + }); +} + +// Writes the constructor for a GObject. +void _writeObjectNew(Indent indent, String module, String name) { + final String className = _getClassName(module, name); + final String methodPrefix = _getMethodPrefix(module, name); + final String castMacro = _getClassCastMacro(module, name); + + indent.writeln( + '$className* self = $castMacro(g_object_new(${methodPrefix}_get_type(), nullptr));'); +} + +// Writes the cast used at the top of GObject methods. +void _writeCastSelf( + Indent indent, String module, String name, String variableName) { + final String className = _getClassName(module, name); + final String castMacro = _getClassCastMacro(module, name); + indent.writeln('$className* self = $castMacro($variableName);'); +} + +// Converts a string from CamelCase to snake_case. +String _snakeCaseFromCamelCase(String camelCase) { + return camelCase.replaceAllMapped(RegExp(r'[A-Z]'), + (Match m) => '${m.start == 0 ? '' : '_'}${m[0]!.toLowerCase()}'); +} + +// Returns the GObject class name for [name]. +String _getClassName(String module, String name) { + return '$module$name'; +} + +// Returns the GObject macro to cast a GObject to a class of [name]. +String _getClassCastMacro(String module, String name) { + final String className = _getClassName(module, name); + final String snakeClassName = _snakeCaseFromCamelCase(className); + return snakeClassName.toUpperCase(); +} + +// Returns the prefix used for methods in class [name]. +String _getMethodPrefix(String module, String name) { + final String className = _getClassName(module, name); + return _snakeCaseFromCamelCase(className); +} + +// Returns an enumeration value in C++ form. +String _getEnumValue(String module, String enumName, String memberName) { + final String snakeEnumName = _snakeCaseFromCamelCase(enumName); + final String snakeMemberName = _snakeCaseFromCamelCase(memberName); + return '${module}_${snakeEnumName}_$snakeMemberName'.toUpperCase(); +} + +// Returns code for storing a value of [type]. +String _getType(String module, TypeDeclaration type, {bool isOutput = false}) { + if (type.isClass) { + return '${_getClassName(module, type.baseName)}*'; + } else if (type.isEnum) { + return _getClassName(module, type.baseName); + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return 'FlValue*'; + } else if (type.baseName == 'void') { + return 'void'; + } else if (type.baseName == 'bool') { + return 'gboolean'; + } else if (type.baseName == 'int') { + return 'int64_t'; + } else if (type.baseName == 'double') { + return 'double'; + } else if (type.baseName == 'String') { + return isOutput ? 'gchar*' : 'const gchar*'; + } else { + throw Exception('Unknown type ${type.baseName}'); + } +} + +// Returns code to clear a value stored in [variableName], or null if no function required. +String? _getClearFunction(TypeDeclaration type, String variableName) { + if (type.isClass) { + return 'g_clear_object(&$variableName)'; + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return 'g_clear_pointer(&$variableName, fl_value_unref)'; + } else if (type.baseName == 'String') { + return 'g_clear_pointer(&$variableName, g_free)'; + } else { + return null; + } +} + +// Returns code for the default value for [type]. +String _getDefaultValue(String module, TypeDeclaration type) { + if (type.isClass) { + return 'nullptr'; + } else if (type.isEnum) { + final String enumName = _getClassName(module, type.baseName); + return 'static_cast<$enumName>(0)'; + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return 'nullptr'; + } else if (type.baseName == 'void') { + return ''; + } else if (type.baseName == 'bool') { + return 'FALSE'; + } else if (type.baseName == 'int') { + return '0'; + } else if (type.baseName == 'double') { + return '0.0'; + } else if (type.baseName == 'String') { + return 'nullptr'; + } else { + throw Exception('Unknown type ${type.baseName}'); + } +} + +// Returns code to copy the native data type stored in [variableName]. +String _referenceValue(TypeDeclaration type, String variableName) { + if (type.isClass || type.baseName == 'List' || type.baseName == 'Map') { + return 'g_object_ref($variableName)'; + } else if (type.baseName == 'String') { + return 'g_strdup($variableName)'; + } else { + return variableName; + } +} + +// Returns code to convert the native data type stored in [variableName] to a FlValue. +String _makeFlValue(String module, TypeDeclaration type, String variableName) { + if (type.isClass) { + return 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; + } else if (type.isEnum) { + return 'fl_value_new_int($variableName)'; + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return 'fl_value_ref($variableName)'; + } else if (type.baseName == 'void') { + return 'fl_value_new_null()'; + } else if (type.baseName == 'bool') { + return 'fl_value_new_bool($variableName)'; + } else if (type.baseName == 'int') { + return 'fl_value_new_int($variableName)'; + } else if (type.baseName == 'double') { + return 'fl_value_new_double($variableName)'; + } else if (type.baseName == 'String') { + return 'fl_value_new_string($variableName)'; + } else { + throw Exception('Unknown type ${type.baseName}'); + } +} + +// Returns code to convert the FlValue stored in [variableName] to a native data type. +String _fromFlValue(String module, TypeDeclaration type, String variableName) { + if (type.isClass) { + final String castMacro = _getClassCastMacro(module, type.baseName); + return '$castMacro(fl_value_get_custom_value_object($variableName))'; + } else if (type.isEnum) { + final String enumName = _getClassName(module, type.baseName); + return 'static_cast<$enumName>(fl_value_get_int($variableName))'; + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return variableName; + } else if (type.baseName == 'bool') { + return 'fl_value_get_bool($variableName)'; + } else if (type.baseName == 'int') { + return 'fl_value_get_int($variableName)'; + } else if (type.baseName == 'double') { + return 'fl_value_get_double($variableName)'; + } else if (type.baseName == 'String') { + return 'fl_value_get_string($variableName)'; + } else { + throw Exception('Unknown type ${type.baseName}'); + } +} + +// Returns the FlValueType enumeration for the native data [type]. +String _getFlValueType(TypeDeclaration type) { + if (type.isClass) { + return 'FL_VALUE_TYPE_CUSTOM'; + } else if (type.isEnum) { + return 'FL_VALUE_TYPE_INT'; + } else if (type.baseName == 'List') { + return 'FL_VALUE_TYPE_LIST'; + } else if (type.baseName == 'Map') { + return 'FL_VALUE_TYPE_MAP'; + } else if (type.baseName == 'bool') { + return 'FL_VALUE_TYPE_BOOL'; + } else if (type.baseName == 'int') { + return 'FL_VALUE_TYPE_INT'; + } else if (type.baseName == 'double') { + return 'FL_VALUE_TYPE_DOUBLE'; + } else if (type.baseName == 'String') { + return 'FL_VALUE_TYPE_STRING'; + } else { + throw Exception('Unknown type ${type.baseName}'); + } +} + +// Returns the name of a GObject class used to send responses to [methodName]. +String _getResponseName(String name, String methodName) { + final String upperMethodName = + methodName[0].toUpperCase() + methodName.substring(1); + return '$name${upperMethodName}Response'; +} diff --git a/packages/pigeon/lib/pigeon.dart b/packages/pigeon/lib/pigeon.dart index a2c6026e3117..936f0d2aeac4 100644 --- a/packages/pigeon/lib/pigeon.dart +++ b/packages/pigeon/lib/pigeon.dart @@ -8,6 +8,7 @@ export 'cpp_generator.dart' show CppOptions; export 'dart_generator.dart' show DartOptions; export 'java_generator.dart' show JavaOptions; export 'kotlin_generator.dart' show KotlinOptions; +export 'linux_generator.dart' show LinuxOptions; export 'objc_generator.dart' show ObjcOptions; // TODO(bparrishMines): Remove hide once implementation of the api is finished // for Dart and one host language. diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart index 8d6fc961c2ec..3ca8a4f556a1 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -32,6 +32,7 @@ import 'generator_tools.dart'; import 'generator_tools.dart' as generator_tools; import 'java_generator.dart'; import 'kotlin_generator.dart'; +import 'linux_generator.dart'; import 'objc_generator.dart'; import 'swift_generator.dart'; @@ -247,6 +248,9 @@ class PigeonOptions { this.cppHeaderOut, this.cppSourceOut, this.cppOptions, + this.linuxHeaderOut, + this.linuxSourceOut, + this.linuxOptions, this.dartOptions, this.copyrightHeader, this.oneLanguage, @@ -301,6 +305,15 @@ class PigeonOptions { /// Options that control how C++ will be generated. final CppOptions? cppOptions; + /// Path to the ".h" Linux file that will be generated. + final String? linuxHeaderOut; + + /// Path to the ".cc" Linux file that will be generated. + final String? linuxSourceOut; + + /// Options that control how C++ will be generated. + final LinuxOptions? linuxOptions; + /// Options that control how Dart will be generated. final DartOptions? dartOptions; @@ -351,6 +364,11 @@ class PigeonOptions { cppOptions: map.containsKey('cppOptions') ? CppOptions.fromMap(map['cppOptions']! as Map) : null, + linuxHeaderOut: map['linuxHeaderOut'] as String?, + linuxSourceOut: map['linuxSourceOut'] as String?, + linuxOptions: map.containsKey('linuxOptions') + ? LinuxOptions.fromMap(map['linuxOptions']! as Map) + : null, dartOptions: map.containsKey('dartOptions') ? DartOptions.fromMap(map['dartOptions']! as Map) : null, @@ -382,6 +400,9 @@ class PigeonOptions { if (cppHeaderOut != null) 'cppHeaderOut': cppHeaderOut!, if (cppSourceOut != null) 'cppSourceOut': cppSourceOut!, if (cppOptions != null) 'cppOptions': cppOptions!.toMap(), + if (linuxHeaderOut != null) 'linuxHeaderOut': linuxHeaderOut!, + if (linuxSourceOut != null) 'linuxSourceOut': linuxSourceOut!, + if (linuxOptions != null) 'linuxOptions': linuxOptions!.toMap(), if (dartOptions != null) 'dartOptions': dartOptions!.toMap(), if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (astOut != null) 'astOut': astOut!, @@ -761,6 +782,53 @@ class CppGeneratorAdapter implements GeneratorAdapter { List validate(PigeonOptions options, Root root) => []; } +/// A [GeneratorAdapter] that generates Linux source code. +class LinuxGeneratorAdapter implements GeneratorAdapter { + /// Constructor for [LinuxGeneratorAdapter]. + LinuxGeneratorAdapter( + {this.fileTypeList = const [FileType.header, FileType.source]}); + + @override + List fileTypeList; + + @override + void generate( + StringSink sink, PigeonOptions options, Root root, FileType fileType) { + final LinuxOptions linuxOptions = + options.linuxOptions ?? const LinuxOptions(); + final LinuxOptions linuxOptionsWithHeader = linuxOptions.merge(LinuxOptions( + copyrightHeader: options.copyrightHeader != null + ? _lineReader( + path.posix.join(options.basePath ?? '', options.copyrightHeader)) + : null, + )); + final OutputFileOptions outputFileOptions = + OutputFileOptions( + fileType: fileType, languageOptions: linuxOptionsWithHeader); + const LinuxGenerator generator = LinuxGenerator(); + generator.generate( + outputFileOptions, + root, + sink, + dartPackageName: options.getPackageName(), + ); + } + + @override + IOSink? shouldGenerate(PigeonOptions options, FileType fileType) { + if (fileType == FileType.source) { + return _openSink(options.linuxSourceOut, + basePath: options.basePath ?? ''); + } else { + return _openSink(options.linuxHeaderOut, + basePath: options.basePath ?? ''); + } + } + + @override + List validate(PigeonOptions options, Root root) => []; +} + /// A [GeneratorAdapter] that generates Kotlin source code. class KotlinGeneratorAdapter implements GeneratorAdapter { /// Constructor for [KotlinGeneratorAdapter]. @@ -2073,6 +2141,18 @@ ${_argParser.usage}'''; ) ..addOption('cpp_namespace', help: 'The namespace that generated C++ code will be in.') + ..addOption( + 'linux_header_out', + help: 'Path to generated Linux header file (.h).', + aliases: const ['experimental_linux_header_out'], + ) + ..addOption( + 'linux_source_out', + help: 'Path to generated Linux classes file (.cc).', + aliases: const ['experimental_linux_source_out'], + ) + ..addOption('linux_module', + help: 'The module that generated Linux code will be in.') ..addOption('objc_header_out', help: 'Path to generated Objective-C header file (.h).') ..addOption('objc_prefix', @@ -2127,6 +2207,11 @@ ${_argParser.usage}'''; cppOptions: CppOptions( namespace: results['cpp_namespace'] as String?, ), + linuxHeaderOut: results['linux_header_out'] as String?, + linuxSourceOut: results['linux_source_out'] as String?, + linuxOptions: LinuxOptions( + module: results['linux_module'] as String? ?? 'My', + ), copyrightHeader: results['copyright_header'] as String?, oneLanguage: results['one_language'] as bool?, astOut: results['ast_out'] as String?, @@ -2183,6 +2268,7 @@ ${_argParser.usage}'''; SwiftGeneratorAdapter(), KotlinGeneratorAdapter(), CppGeneratorAdapter(), + LinuxGeneratorAdapter(), DartTestGeneratorAdapter(), ObjcGeneratorAdapter(), AstGeneratorAdapter(), @@ -2251,6 +2337,13 @@ ${_argParser.usage}'''; headerIncludePath: path.basename(options.cppHeaderOut!))))); } + if (options.linuxHeaderOut != null) { + options = options.merge(PigeonOptions( + linuxOptions: (options.linuxOptions ?? const LinuxOptions()).merge( + LinuxOptions( + headerIncludePath: path.basename(options.linuxHeaderOut!))))); + } + for (final GeneratorAdapter adapter in safeGeneratorAdapters) { for (final FileType fileType in adapter.fileTypeList) { final IOSink? sink = adapter.shouldGenerate(options, fileType); diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index c6b29262ff35..a0cbdbd1f82a 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. repository: https://github.com/flutter/packages/tree/main/packages/pigeon issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22 -version: 17.1.1 # This must match the version in lib/generator_tools.dart +version: 17.1.2 # This must match the version in lib/generator_tools.dart environment: sdk: ^3.1.0 diff --git a/packages/pigeon/test/linux_generator_test.dart b/packages/pigeon/test/linux_generator_test.dart new file mode 100644 index 000000000000..e18db12dad95 --- /dev/null +++ b/packages/pigeon/test/linux_generator_test.dart @@ -0,0 +1,748 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:pigeon/ast.dart'; +import 'package:pigeon/generator_tools.dart'; +import 'package:pigeon/linux_generator.dart'; +import 'package:test/test.dart'; + +const String DEFAULT_PACKAGE_NAME = 'test_package'; + +final Class emptyClass = Class(name: 'className', fields: [ + NamedType( + name: 'namedTypeName', + type: const TypeDeclaration(baseName: 'baseName', isNullable: false), + ) +]); + +void main() { + test('gen one api', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + parameters: [ + Parameter( + type: TypeDeclaration( + baseName: 'Input', + isNullable: false, + associatedClass: emptyClass, + ), + name: 'input') + ], + location: ApiLocation.host, + returnType: TypeDeclaration( + baseName: 'Output', + isNullable: false, + associatedClass: emptyClass, + ), + ) + ]) + ], classes: [ + Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'input') + ]), + Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'output') + ]) + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate(generatorOptions, root, sink, + dartPackageName: DEFAULT_PACKAGE_NAME); + final String code = sink.toString(); + expect( + code, + contains( + 'G_DECLARE_FINAL_TYPE(MyInput, my_input, MY, INPUT, GObject)')); + expect( + code, + contains( + 'G_DECLARE_FINAL_TYPE(MyOutput, my_output, MY, OUTPUT, GObject)')); + expect(code, + contains('G_DECLARE_FINAL_TYPE(MyApi, my_api, MY, API, GObject)')); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(), + ); + generator.generate(generatorOptions, root, sink, + dartPackageName: DEFAULT_PACKAGE_NAME); + final String code = sink.toString(); + expect(code, contains('static void my_input_init(MyInput* self) {')); + expect(code, contains('static void my_output_init(MyOutput* self) {')); + expect(code, contains('static void my_api_init(MyApi* self) {')); + } + }); + + test('naming follows style', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + parameters: [ + Parameter( + type: TypeDeclaration( + baseName: 'Input', + isNullable: false, + associatedClass: emptyClass, + ), + name: 'someInput') + ], + location: ApiLocation.host, + returnType: TypeDeclaration( + baseName: 'Output', + isNullable: false, + associatedClass: emptyClass, + ), + ) + ]) + ], classes: [ + Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'inputField') + ]), + Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'outputField') + ]) + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate(generatorOptions, root, sink, + dartPackageName: DEFAULT_PACKAGE_NAME); + final String code = sink.toString(); + expect( + code, + contains( + ' MyApiDoSomethingResponse* (*do_something)(MyApi* object, MyInput* some_input, gpointer user_data);')); + expect(code, + contains('gboolean my_input_get_input_field(MyInput* object);')); + expect(code, + contains('gboolean my_output_get_output_field(MyOutput* object);')); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(), + ); + generator.generate(generatorOptions, root, sink, + dartPackageName: DEFAULT_PACKAGE_NAME); + final String code = sink.toString(); + expect( + code, contains('gboolean my_input_get_input_field(MyInput* self) {')); + expect(code, + contains('gboolean my_output_get_output_field(MyOutput* self) {')); + } + }); + + test('Spaces before {', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [ + Parameter( + type: TypeDeclaration( + baseName: 'Input', + isNullable: false, + associatedClass: emptyClass, + ), + name: 'input') + ], + returnType: TypeDeclaration( + baseName: 'Output', + isNullable: false, + associatedClass: emptyClass, + ), + ) + ]) + ], classes: [ + Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'input') + ]), + Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'output') + ]) + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect(code, isNot(contains('){'))); + expect(code, isNot(contains('const{'))); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect(code, isNot(contains('){'))); + expect(code, isNot(contains('const{'))); + } + }); + + test('include blocks follow style', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [ + Parameter( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'input') + ], + returnType: const TypeDeclaration(baseName: 'int', isNullable: false), + ) + ]) + ], classes: [], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect(code, contains(''' +#include +''')); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(headerIncludePath: 'a_header.h'), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect(code, contains(''' +#include "a_header.h" +''')); + } + }); + + test('data classes handle non-nullable fields', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [ + Parameter( + type: TypeDeclaration( + baseName: 'Input', + isNullable: false, + associatedClass: emptyClass, + ), + name: 'someInput') + ], + returnType: const TypeDeclaration.voidDeclaration(), + ) + ]) + ], classes: [ + Class(name: 'Nested', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'nestedValue'), + ]), + Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'nonNullableBool'), + NamedType( + type: const TypeDeclaration( + baseName: 'int', + isNullable: false, + ), + name: 'nonNullableInt'), + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: false, + ), + name: 'nonNullableString'), + NamedType( + type: TypeDeclaration( + baseName: 'Nested', + isNullable: false, + associatedClass: emptyClass, + ), + name: 'nonNullableNested'), + ]), + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + + expect(code, contains('MyNested* my_nested_new(gboolean nested_value);')); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + + expect( + code, contains('MyNested* my_nested_new(gboolean nested_value) {')); + } + }); + + test('host non-nullable return types map correctly', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'returnBool', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + ), + Method( + name: 'returnInt', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration( + baseName: 'int', + isNullable: false, + ), + ), + Method( + name: 'returnString', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration( + baseName: 'String', + isNullable: false, + ), + ), + Method( + name: 'returnList', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration( + baseName: 'List', + typeArguments: [ + TypeDeclaration( + baseName: 'String', + isNullable: true, + ) + ], + isNullable: false, + ), + ), + Method( + name: 'returnMap', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration( + baseName: 'Map', + typeArguments: [ + TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + TypeDeclaration( + baseName: 'String', + isNullable: true, + ) + ], + isNullable: false, + ), + ), + Method( + name: 'returnDataClass', + location: ApiLocation.host, + parameters: [], + returnType: TypeDeclaration( + baseName: 'ReturnData', + isNullable: false, + associatedClass: emptyClass, + ), + ), + ]) + ], classes: [ + Class(name: 'ReturnData', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'aValue'), + ]), + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect( + code, + contains( + ' MyApiReturnBoolResponse* (*return_bool)(MyApi* object, gpointer user_data);')); + expect( + code, + contains( + ' MyApiReturnIntResponse* (*return_int)(MyApi* object, gpointer user_data);')); + expect( + code, + contains( + ' MyApiReturnStringResponse* (*return_string)(MyApi* object, gpointer user_data);')); + expect( + code, + contains( + ' MyApiReturnListResponse* (*return_list)(MyApi* object, gpointer user_data);')); + expect( + code, + contains( + ' MyApiReturnMapResponse* (*return_map)(MyApi* object, gpointer user_data);')); + expect( + code, + contains( + ' MyApiReturnDataClassResponse* (*return_data_class)(MyApi* object, gpointer user_data);')); + } + }); + + test('host non-nullable arguments map correctly', () { + final Root root = Root(apis: [ + AstHostApi(name: 'Api', methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [ + Parameter( + name: 'aBool', + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + )), + Parameter( + name: 'anInt', + type: const TypeDeclaration( + baseName: 'int', + isNullable: false, + )), + Parameter( + name: 'aString', + type: const TypeDeclaration( + baseName: 'String', + isNullable: false, + )), + Parameter( + name: 'aList', + type: TypeDeclaration( + baseName: 'List', + typeArguments: [ + TypeDeclaration( + baseName: 'Object', + isNullable: true, + associatedClass: emptyClass, + ) + ], + isNullable: false, + )), + Parameter( + name: 'aMap', + type: TypeDeclaration( + baseName: 'Map', + typeArguments: [ + const TypeDeclaration(baseName: 'String', isNullable: true), + TypeDeclaration( + baseName: 'Object', + isNullable: true, + associatedClass: emptyClass, + ), + ], + isNullable: false, + )), + Parameter( + name: 'anObject', + type: TypeDeclaration( + baseName: 'ParameterObject', + isNullable: false, + associatedClass: emptyClass, + )), + Parameter( + name: 'aGenericObject', + type: TypeDeclaration( + baseName: 'Object', + isNullable: false, + associatedClass: emptyClass, + )), + ], + returnType: const TypeDeclaration.voidDeclaration(), + ), + ]) + ], classes: [ + Class(name: 'ParameterObject', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'aValue'), + ]), + ], enums: []); + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect( + code, + contains( + ' MyApiDoSomethingResponse* (*do_something)(MyApi* object, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, MyParameterObject* an_object, MyObject* a_generic_object, gpointer user_data);')); + } + { + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.source, + languageOptions: const LinuxOptions(), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + expect( + code, + contains( + ' g_autoptr(MyApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(fl_value_get_list_value(message, 0)), fl_value_get_int(fl_value_get_list_value(message, 1)), fl_value_get_string(fl_value_get_list_value(message, 2)), fl_value_get_list_value(message, 3), fl_value_get_list_value(message, 4), MY_PARAMETER_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 5))), MY_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 6))), self->user_data);')); + } + }); + + test('transfers documentation comments', () { + final List comments = [ + ' api comment', + ' api method comment', + ' class comment', + ' class field comment', + ' enum comment', + ' enum member comment', + ]; + int count = 0; + + final List unspacedComments = ['////////']; + int unspacedCount = 0; + + final Root root = Root( + apis: [ + AstFlutterApi( + name: 'Api', + documentationComments: [comments[count++]], + methods: [ + Method( + name: 'method', + location: ApiLocation.flutter, + returnType: const TypeDeclaration.voidDeclaration(), + documentationComments: [comments[count++]], + parameters: [ + Parameter( + name: 'field', + type: const TypeDeclaration( + baseName: 'int', + isNullable: true, + ), + ), + ], + ) + ], + ) + ], + classes: [ + Class( + name: 'class', + documentationComments: [comments[count++]], + fields: [ + NamedType( + documentationComments: [comments[count++]], + type: const TypeDeclaration( + baseName: 'Map', + isNullable: true, + typeArguments: [ + TypeDeclaration(baseName: 'String', isNullable: true), + TypeDeclaration(baseName: 'int', isNullable: true), + ]), + name: 'field1'), + ], + ), + ], + enums: [ + Enum( + name: 'enum', + documentationComments: [ + comments[count++], + unspacedComments[unspacedCount++] + ], + members: [ + EnumMember( + name: 'one', + documentationComments: [comments[count++]], + ), + EnumMember(name: 'two'), + ], + ), + ], + ); + final StringBuffer sink = StringBuffer(); + const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( + fileType: FileType.header, + languageOptions: const LinuxOptions(headerIncludePath: 'foo'), + ); + generator.generate( + generatorOptions, + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final String code = sink.toString(); + for (final String comment in comments) { + expect(code, contains('//$comment')); + } + expect(code, contains('// ///')); + }); +} diff --git a/packages/pigeon/tool/run_tests.dart b/packages/pigeon/tool/run_tests.dart index ffcbe78887b0..ca90c5d9dcd4 100644 --- a/packages/pigeon/tool/run_tests.dart +++ b/packages/pigeon/tool/run_tests.dart @@ -69,6 +69,7 @@ Future _validateGeneratedFiles( GeneratorLanguage.dart, GeneratorLanguage.java, GeneratorLanguage.kotlin, + GeneratorLanguage.linux, GeneratorLanguage.objc, }; } else if (Platform.isMacOS) { @@ -142,6 +143,7 @@ Set _extensionsForLanguage(GeneratorLanguage language) { GeneratorLanguage.dart => {'dart'}, GeneratorLanguage.java => {'java'}, GeneratorLanguage.kotlin => {'kt'}, + GeneratorLanguage.linux => {'linux'}, GeneratorLanguage.swift => {'swift'}, GeneratorLanguage.objc => {'h', 'm', 'mm'}, }; diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index 68bcc10d6163..a504e7461b21 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -15,6 +15,7 @@ enum GeneratorLanguage { dart, java, kotlin, + linux, objc, swift, } @@ -191,6 +192,8 @@ Future runPigeon({ String? cppNamespace, String? dartOut, String? dartTestOut, + String? linuxHeaderOut, + String? linuxSourceOut, String? javaOut, String? javaPackage, String? objcHeaderOut, @@ -222,6 +225,9 @@ Future runPigeon({ cppHeaderOut: cppHeaderOut, cppSourceOut: cppSourceOut, cppOptions: CppOptions(namespace: cppNamespace), + linuxHeaderOut: linuxHeaderOut, + linuxSourceOut: linuxSourceOut, + linuxOptions: const LinuxOptions(), javaOut: javaOut, javaOptions: JavaOptions(package: javaPackage), kotlinOut: kotlinOut, @@ -254,6 +260,7 @@ Future formatAllFiles({ GeneratorLanguage.dart, GeneratorLanguage.java, GeneratorLanguage.kotlin, + GeneratorLanguage.linux, GeneratorLanguage.objc, GeneratorLanguage.swift, }, @@ -267,6 +274,7 @@ Future formatAllFiles({ 'format', '--packages=pigeon', if (languages.contains(GeneratorLanguage.cpp) || + languages.contains(GeneratorLanguage.linux) || languages.contains(GeneratorLanguage.objc)) '--clang-format' else From a6fd0b431f728cf9bbcd520b710ac8779370d5d7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 20 Mar 2024 14:39:38 +1300 Subject: [PATCH 002/127] Bump minor version as new feature --- packages/pigeon/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 1172764bedff..95f45ed699af 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,4 +1,4 @@ -## 17.1.2 +## 17.2.0 * Add Linux support From c019fd75784348a3d06045f9326e556e23c0ee6a Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 20 Mar 2024 14:39:52 +1300 Subject: [PATCH 003/127] Fix grammar --- packages/pigeon/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 95f45ed699af..b82e185fe9fa 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,6 +1,6 @@ ## 17.2.0 -* Add Linux support +* Adds Linux support ## 17.1.1 From a07914f725a180fb8c2424621a234937ebe714cc Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 20 Mar 2024 15:37:17 +1300 Subject: [PATCH 004/127] Factor methods out of writeHostApi --- packages/pigeon/lib/linux_generator.dart | 122 +++++++++++++---------- 1 file changed, 72 insertions(+), 50 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index b28734328d44..26f40b9fc57e 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -279,49 +279,67 @@ class LinuxHeaderGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = _getClassName(generatorOptions.module, api.name); - final String methodPrefix = _getMethodPrefix(generatorOptions.module, api.name); - final String vtableName = '${className}VTable'; + final String vtableName = _getVTableName(generatorOptions.module, api.name); for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { - final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = - _getClassName(generatorOptions.module, responseName); - final String responseMethodPrefix = - _getMethodPrefix(generatorOptions.module, responseName); + _writeApiRespondClass(indent, generatorOptions.module, api, method); + } - indent.newln(); - _writeDeclareFinalType(indent, generatorOptions.module, responseName); + indent.newln(); + _writeDeclareFinalType(indent, generatorOptions.module, api.name); - final String returnType = - _getType(generatorOptions.module, method.returnType); - indent.newln(); - indent.writeln( - '$responseClassName* ${responseMethodPrefix}_new($returnType return_value);'); + indent.newln(); + _writeApiVTable(indent, generatorOptions.module, api); - indent.newln(); - indent.writeln( - '$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details);'); + indent.newln(); + indent.writeln( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + + for (final Method method + in api.methods.where((Method method) => method.isAsynchronous)) { + _writeApiRespondFunctionPrototype( + indent, generatorOptions.module, api, method); } + } + + // Write the API response classes. + void _writeApiRespondClass( + Indent indent, String module, Api api, Method method) { + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = _getClassName(module, responseName); + final String responseMethodPrefix = _getMethodPrefix(module, responseName); indent.newln(); - _writeDeclareFinalType(indent, generatorOptions.module, api.name); + _writeDeclareFinalType(indent, module, responseName); + + final String returnType = _getType(module, method.returnType); + indent.newln(); + indent.writeln( + '$responseClassName* ${responseMethodPrefix}_new($returnType return_value);'); indent.newln(); + indent.writeln( + '$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details);'); + } + + // Write the vtable for an API. + void _writeApiVTable(Indent indent, String module, Api api) { + final String className = _getClassName(module, api.name); + final String vtableName = _getVTableName(module, api.name); + indent.addScoped('typedef struct {', '} $vtableName;', () { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = - _getClassName(generatorOptions.module, responseName); + final String responseClassName = _getClassName(module, responseName); final List methodArgs = ['$className* object']; for (final Parameter param in method.parameters) { final String paramName = _snakeCaseFromCamelCase(param.name); - final String paramType = - _getType(generatorOptions.module, param.type); + final String paramType = _getType(module, param.type); methodArgs.add('$paramType $paramName'); } final String returnType; @@ -336,37 +354,35 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.writeln("$returnType (*$methodName)(${methodArgs.join(', ')});"); } }); + } + + // Write the function prototype for an API method response. + void _writeApiRespondFunctionPrototype( + Indent indent, String module, Api api, Method method) { + final String className = _getClassName(module, api.name); + final String methodPrefix = _getMethodPrefix(module, api.name); + final String methodName = _snakeCaseFromCamelCase(method.name); + final String returnType = _getType(module, method.returnType); indent.newln(); + final List respondArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + '$returnType return_value' + ]; indent.writeln( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); - - for (final Method method - in api.methods.where((Method method) => method.isAsynchronous)) { - final String methodName = _snakeCaseFromCamelCase(method.name); - final String returnType = - _getType(generatorOptions.module, method.returnType); - - indent.newln(); - final List respondArgs = [ - '$className* self', - 'FlBasicMessageChannelResponseHandle* response_handle', - '$returnType return_value' - ]; - indent.writeln( - "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); + "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); - indent.newln(); - final List respondErrorArgs = [ - '$className* self', - 'FlBasicMessageChannelResponseHandle* response_handle', - 'const gchar* code', - 'const gchar* message', - 'FlValue* details' - ]; - indent.writeln( - "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')});"); - } + indent.newln(); + final List respondErrorArgs = [ + '$className* self', + 'FlBasicMessageChannelResponseHandle* response_handle', + 'const gchar* code', + 'const gchar* message', + 'FlValue* details' + ]; + indent.writeln( + "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')});"); } @override @@ -636,7 +652,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(generatorOptions.module, api.name); - final String vtableName = '${className}VTable'; + final String vtableName = _getVTableName(generatorOptions.module, api.name); final String codecName = '${api.name}Codec'; final String codecClassName = @@ -1141,6 +1157,12 @@ String _getClassName(String module, String name) { return '$module$name'; } +/// Return the name of the VTable structure to use for API requests. +String _getVTableName(String module, String name) { + final String className = _getClassName(module, name); + return '${className}VTable'; +} + // Returns the GObject macro to cast a GObject to a class of [name]. String _getClassCastMacro(String module, String name) { final String className = _getClassName(module, name); From 608bfd62f077dcea0788b9b304d6298470581b4a Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 20 Mar 2024 16:44:26 +1300 Subject: [PATCH 005/127] Inline arg list generation --- packages/pigeon/lib/linux_generator.dart | 87 ++++++++++-------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 26f40b9fc57e..3f92acec1e52 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -237,33 +237,28 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); - final List asyncArgs = ['$className* object']; - for (final Parameter param in method.parameters) { - final String paramName = _snakeCaseFromCamelCase(param.name); - final String paramType = _getType(generatorOptions.module, param.type); - asyncArgs.add('$paramType $paramName'); - } - asyncArgs.addAll([ + final List asyncArgs = [ + '$className* object', + for (final Parameter param in method.parameters) + '${_getType(generatorOptions.module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data' - ]); + ]; indent.newln(); addDocumentationComments( indent, method.documentationComments, _docCommentSpec); indent.writeln( "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); + final String returnType = + _getType(generatorOptions.module, method.returnType, isOutput: true); final List finishArgs = [ '$className* object', - 'GAsyncResult* result' + 'GAsyncResult* result', + if (returnType != 'void') '$returnType* return_value', + 'GError** error' ]; - final String returnType = - _getType(generatorOptions.module, method.returnType, isOutput: true); - if (returnType != 'void') { - finishArgs.add('$returnType* return_value'); - } - finishArgs.add('GError** error'); indent.newln(); indent.writeln( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); @@ -336,21 +331,16 @@ class LinuxHeaderGenerator extends StructuredGenerator { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); - final List methodArgs = ['$className* object']; - for (final Parameter param in method.parameters) { - final String paramName = _snakeCaseFromCamelCase(param.name); - final String paramType = _getType(module, param.type); - methodArgs.add('$paramType $paramName'); - } - final String returnType; - if (method.isAsynchronous) { - methodArgs - .add('FlBasicMessageChannelResponseHandle* response_handle'); - returnType = 'void'; - } else { - returnType = '$responseClassName*'; - } - methodArgs.add('gpointer user_data'); + final List methodArgs = [ + '$className* object', + for (final Parameter param in method.parameters) + '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + if (method.isAsynchronous) + 'FlBasicMessageChannelResponseHandle* response_handle', + 'gpointer user_data', + ]; + final String returnType = + method.isAsynchronous ? 'void' : '$responseClassName*'; indent.writeln("$returnType (*$methodName)(${methodArgs.join(', ')});"); } }); @@ -487,12 +477,10 @@ class LinuxSourceGenerator extends StructuredGenerator { _writeClassInit( indent, generatorOptions.module, classDefinition.name, () {}); - final List constructorArgs = []; - for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); - final String type = _getType(generatorOptions.module, field.type); - constructorArgs.add('$type $fieldName'); - } + final List constructorArgs = [ + for (final NamedType field in classDefinition.fields) + '${_getType(generatorOptions.module, field.type)} ${_snakeCaseFromCamelCase(field.name)}', + ]; indent.newln(); indent.addScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', @@ -604,33 +592,28 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); - final List asyncArgs = ['$className* object']; - for (final Parameter param in method.parameters) { - final String paramName = _snakeCaseFromCamelCase(param.name); - final String paramType = _getType(generatorOptions.module, param.type); - asyncArgs.add('$paramType $paramName'); - } - asyncArgs.addAll([ + final List asyncArgs = [ + '$className* object', + for (final Parameter param in method.parameters) + '${_getType(generatorOptions.module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', - 'gpointer user_data' - ]); + 'gpointer user_data', + ]; indent.newln(); indent.addScoped( "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')}) {", '}', () {}); + final String returnType = + _getType(generatorOptions.module, method.returnType, isOutput: true); final List finishArgs = [ '$className* object', - 'GAsyncResult* result' + 'GAsyncResult* result', + if (returnType != 'void') '$returnType* return_value', + 'GError** error', ]; - final String returnType = - _getType(generatorOptions.module, method.returnType, isOutput: true); - if (returnType != 'void') { - finishArgs.add('$returnType* return_value'); - } - finishArgs.add('GError** error'); indent.newln(); indent.addScoped( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", From 3c3c89da6ed97a43cade2780fd944005db26eb8a Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 20 Mar 2024 17:01:23 +1300 Subject: [PATCH 006/127] Drop FlValue runtime checks - we generate both sides --- .../pigeon/example/app/linux/messages.g.cc | 12 ---- packages/pigeon/lib/linux_generator.dart | 61 ++----------------- 2 files changed, 5 insertions(+), 68 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 96b68a1dd675..b94eaccf841e 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -72,18 +72,6 @@ static FlValue* my_message_data_to_list(MyMessageData* self) { } static MyMessageData* my_message_data_new_from_list(FlValue* values) { - if (fl_value_get_type(values) != FL_VALUE_TYPE_LIST || - fl_value_get_type(fl_value_get_list_value(values, 0)) != - FL_VALUE_TYPE_STRING || - fl_value_get_type(fl_value_get_list_value(values, 1)) != - FL_VALUE_TYPE_STRING || - fl_value_get_type(fl_value_get_list_value(values, 2)) != - FL_VALUE_TYPE_INT || - fl_value_get_type(fl_value_get_list_value(values, 3)) != - FL_VALUE_TYPE_MAP) { - return nullptr; - } - return my_message_data_new( fl_value_get_string(fl_value_get_list_value(values, 0)), fl_value_get_string(fl_value_get_list_value(values, 1)), diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 3f92acec1e52..696dc0648f2c 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -525,18 +525,6 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped( 'static $className* ${methodPrefix}_new_from_list(FlValue* values) {', '}', () { - final List checks = [ - 'fl_value_get_type(values) != FL_VALUE_TYPE_LIST' - ]; - for (int i = 0; i < classDefinition.fields.length; i++) { - final NamedType field = classDefinition.fields[i]; - checks.add( - 'fl_value_get_type(fl_value_get_list_value(values, $i)) != ${_getFlValueType(field.type)}'); - } - indent.addScoped("if (${checks.join(' || ')}) {", '}', () { - indent.writeln('return nullptr;'); - }); - indent.newln(); final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; @@ -868,27 +856,11 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.writeln('return;'); }); - final List checks = []; - final List methodArgs = []; - if (method.parameters.isEmpty) { - checks.add('fl_value_get_type(message) != FL_VALUE_TYPE_NULL'); - } else { - checks.add('fl_value_get_type(message) != FL_VALUE_TYPE_LIST'); - checks.add( - 'fl_value_get_length(message) != ${method.parameters.length}'); - for (int i = 0; i < method.parameters.length; i++) { - final Parameter param = method.parameters[i]; - checks.add( - 'fl_value_get_type(fl_value_get_list_value(message, $i)) != ${_getFlValueType(param.type)}'); - methodArgs.add(_fromFlValue(generatorOptions.module, param.type, - 'fl_value_get_list_value(message, $i)')); - } - } - - indent.newln(); - indent.addScoped("if (${checks.join(' || ')}) {", '}', () { - indent.writeln('return;'); - }); + final List methodArgs = [ + for (int i = 0; i < method.parameters.length; i++) + _fromFlValue(generatorOptions.module, method.parameters[i].type, + 'fl_value_get_list_value(message, $i)'), + ]; indent.newln(); if (method.isAsynchronous) { @@ -1283,29 +1255,6 @@ String _fromFlValue(String module, TypeDeclaration type, String variableName) { } } -// Returns the FlValueType enumeration for the native data [type]. -String _getFlValueType(TypeDeclaration type) { - if (type.isClass) { - return 'FL_VALUE_TYPE_CUSTOM'; - } else if (type.isEnum) { - return 'FL_VALUE_TYPE_INT'; - } else if (type.baseName == 'List') { - return 'FL_VALUE_TYPE_LIST'; - } else if (type.baseName == 'Map') { - return 'FL_VALUE_TYPE_MAP'; - } else if (type.baseName == 'bool') { - return 'FL_VALUE_TYPE_BOOL'; - } else if (type.baseName == 'int') { - return 'FL_VALUE_TYPE_INT'; - } else if (type.baseName == 'double') { - return 'FL_VALUE_TYPE_DOUBLE'; - } else if (type.baseName == 'String') { - return 'FL_VALUE_TYPE_STRING'; - } else { - throw Exception('Unknown type ${type.baseName}'); - } -} - // Returns the name of a GObject class used to send responses to [methodName]. String _getResponseName(String name, String methodName) { final String upperMethodName = From 2d85897d72e85e8cdf92894099083f20352beb57 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 11:53:55 +1300 Subject: [PATCH 007/127] Explicitly set module name, moving default into the generator --- packages/pigeon/example/README.md | 2 +- .../pigeon/example/app/pigeons/messages.dart | 2 +- packages/pigeon/lib/linux_generator.dart | 217 ++++++++++-------- packages/pigeon/lib/pigeon_lib.dart | 2 +- packages/pigeon/tool/shared/generation.dart | 11 +- 5 files changed, 135 insertions(+), 99 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index e27c06551f1b..4fb3eee5af4e 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -21,7 +21,7 @@ needed for your project. cppSourceOut: 'windows/runner/messages.g.cpp', linuxHeaderOut: 'linux/messages.g.h', linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(), + linuxOptions: LinuxOptions(module: 'My'), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), diff --git a/packages/pigeon/example/app/pigeons/messages.dart b/packages/pigeon/example/app/pigeons/messages.dart index 9f74b6bde856..c6998c545411 100644 --- a/packages/pigeon/example/app/pigeons/messages.dart +++ b/packages/pigeon/example/app/pigeons/messages.dart @@ -13,7 +13,7 @@ import 'package:pigeon/pigeon.dart'; cppSourceOut: 'windows/runner/messages.g.cpp', linuxHeaderOut: 'linux/messages.g.h', linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(), + linuxOptions: LinuxOptions(module: 'My'), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 696dc0648f2c..3510ccb5cb82 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -18,7 +18,7 @@ class LinuxOptions { /// Creates a [LinuxOptions] object const LinuxOptions({ this.headerIncludePath, - this.module = 'My', + this.module, this.copyrightHeader, this.headerOutPath, }); @@ -28,7 +28,7 @@ class LinuxOptions { final String? headerIncludePath; /// The module where the generated class will live. - final String module; + final String? module; /// A copyright header that will get prepended to generated code. final Iterable? copyrightHeader; @@ -52,7 +52,7 @@ class LinuxOptions { Map toMap() { final Map result = { if (headerIncludePath != null) 'header': headerIncludePath!, - 'module': module, + if (module != null) 'module': module!, if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, }; return result; @@ -152,7 +152,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { Enum anEnum, { required String dartPackageName, }) { - final String enumName = _getClassName(generatorOptions.module, anEnum.name); + final String enumName = + _getClassName(_getModule(generatorOptions), anEnum.name); indent.newln(); addDocumentationComments( @@ -160,8 +161,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.addScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; - final String itemName = - _getEnumValue(generatorOptions.module, anEnum.name, member.name); + final String itemName = _getEnumValue( + _getModule(generatorOptions), anEnum.name, member.name); addDocumentationComments( indent, member.documentationComments, _docCommentSpec); indent.writeln( @@ -179,22 +180,22 @@ class LinuxHeaderGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = - _getClassName(generatorOptions.module, classDefinition.name); + _getClassName(_getModule(generatorOptions), classDefinition.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, classDefinition.name); + _getMethodPrefix(_getModule(generatorOptions), classDefinition.name); indent.newln(); addDocumentationComments( indent, classDefinition.documentationComments, _docCommentSpec); _writeDeclareFinalType( - indent, generatorOptions.module, classDefinition.name); + indent, _getModule(generatorOptions), classDefinition.name); indent.newln(); final List constructorArgs = []; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String type = _getType(generatorOptions.module, field.type); + final String type = _getType(_getModule(generatorOptions), field.type); constructorArgs.add('$type $fieldName'); } indent.writeln( @@ -202,7 +203,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String returnType = _getType(generatorOptions.module, field.type); + final String returnType = + _getType(_getModule(generatorOptions), field.type); indent.newln(); addDocumentationComments( @@ -220,15 +222,16 @@ class LinuxHeaderGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = _getClassName(generatorOptions.module, api.name); + final String className = + _getClassName(_getModule(generatorOptions), api.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, api.name); + _getMethodPrefix(_getModule(generatorOptions), api.name); indent.newln(); addDocumentationComments( indent, api.documentationComments, _docCommentSpec); - _writeDeclareFinalType(indent, generatorOptions.module, api.name); + _writeDeclareFinalType(indent, _getModule(generatorOptions), api.name); indent.newln(); indent.writeln( @@ -240,7 +243,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(generatorOptions.module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(_getModule(generatorOptions), param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data' @@ -251,8 +254,9 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.writeln( "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); - final String returnType = - _getType(generatorOptions.module, method.returnType, isOutput: true); + final String returnType = _getType( + _getModule(generatorOptions), method.returnType, + isOutput: true); final List finishArgs = [ '$className* object', 'GAsyncResult* result', @@ -273,21 +277,23 @@ class LinuxHeaderGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = _getClassName(generatorOptions.module, api.name); + final String className = + _getClassName(_getModule(generatorOptions), api.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, api.name); - final String vtableName = _getVTableName(generatorOptions.module, api.name); + _getMethodPrefix(_getModule(generatorOptions), api.name); + final String vtableName = + _getVTableName(_getModule(generatorOptions), api.name); for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { - _writeApiRespondClass(indent, generatorOptions.module, api, method); + _writeApiRespondClass(indent, _getModule(generatorOptions), api, method); } indent.newln(); - _writeDeclareFinalType(indent, generatorOptions.module, api.name); + _writeDeclareFinalType(indent, _getModule(generatorOptions), api.name); indent.newln(); - _writeApiVTable(indent, generatorOptions.module, api); + _writeApiVTable(indent, _getModule(generatorOptions), api); indent.newln(); indent.writeln( @@ -296,7 +302,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { _writeApiRespondFunctionPrototype( - indent, generatorOptions.module, api, method); + indent, _getModule(generatorOptions), api, method); } } @@ -429,39 +435,42 @@ class LinuxSourceGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - final String snakeModule = _snakeCaseFromCamelCase(generatorOptions.module); + final String snakeModule = + _snakeCaseFromCamelCase(_getModule(generatorOptions)); final String className = - _getClassName(generatorOptions.module, classDefinition.name); + _getClassName(_getModule(generatorOptions), classDefinition.name); final String snakeClassName = _snakeCaseFromCamelCase(classDefinition.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, classDefinition.name); + _getMethodPrefix(_getModule(generatorOptions), classDefinition.name); final String testMacro = '${snakeModule}_IS_$snakeClassName'.toUpperCase(); indent.newln(); - _writeObjectStruct(indent, generatorOptions.module, classDefinition.name, - () { + _writeObjectStruct( + indent, _getModule(generatorOptions), classDefinition.name, () { indent.newln(); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String fieldType = - _getType(generatorOptions.module, field.type, isOutput: true); + _getType(_getModule(generatorOptions), field.type, isOutput: true); indent.writeln('$fieldType $fieldName;'); } }); indent.newln(); - _writeDefineType(indent, generatorOptions.module, classDefinition.name); + _writeDefineType( + indent, _getModule(generatorOptions), classDefinition.name); indent.newln(); - _writeDispose(indent, generatorOptions.module, classDefinition.name, () { + _writeDispose(indent, _getModule(generatorOptions), classDefinition.name, + () { bool haveSelf = false; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String? clear = _getClearFunction(field.type, 'self->$fieldName'); if (clear != null) { if (!haveSelf) { - _writeCastSelf(indent, generatorOptions.module, + _writeCastSelf(indent, _getModule(generatorOptions), classDefinition.name, 'object'); haveSelf = true; } @@ -471,21 +480,23 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, generatorOptions.module, classDefinition.name, () {}); + _writeInit( + indent, _getModule(generatorOptions), classDefinition.name, () {}); indent.newln(); _writeClassInit( - indent, generatorOptions.module, classDefinition.name, () {}); + indent, _getModule(generatorOptions), classDefinition.name, () {}); final List constructorArgs = [ for (final NamedType field in classDefinition.fields) - '${_getType(generatorOptions.module, field.type)} ${_snakeCaseFromCamelCase(field.name)}', + '${_getType(_getModule(generatorOptions), field.type)} ${_snakeCaseFromCamelCase(field.name)}', ]; indent.newln(); indent.addScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', () { - _writeObjectNew(indent, generatorOptions.module, classDefinition.name); + _writeObjectNew( + indent, _getModule(generatorOptions), classDefinition.name); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String value = _referenceValue(field.type, fieldName); @@ -497,14 +508,15 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String returnType = _getType(generatorOptions.module, field.type); + final String returnType = + _getType(_getModule(generatorOptions), field.type); indent.newln(); indent.addScoped( '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', () { indent.writeln( - 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(generatorOptions.module, field.type)});'); + 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(_getModule(generatorOptions), field.type)});'); indent.writeln('return self->$fieldName;'); }); } @@ -516,7 +528,7 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); indent.writeln( - 'fl_value_append_take(values, ${_makeFlValue(generatorOptions.module, field.type, 'self->$fieldName')});'); + 'fl_value_append_take(values, ${_makeFlValue(_getModule(generatorOptions), field.type, 'self->$fieldName')});'); } indent.writeln('return values;'); }); @@ -528,7 +540,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; - args.add(_fromFlValue(generatorOptions.module, field.type, + args.add(_fromFlValue(_getModule(generatorOptions), field.type, 'fl_value_get_list_value(values, $i)')); } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); @@ -543,36 +555,37 @@ class LinuxSourceGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = _getClassName(generatorOptions.module, api.name); + final String className = + _getClassName(_getModule(generatorOptions), api.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, api.name); + _getMethodPrefix(_getModule(generatorOptions), api.name); indent.newln(); - _writeObjectStruct(indent, generatorOptions.module, api.name, () { + _writeObjectStruct(indent, _getModule(generatorOptions), api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); }); indent.newln(); - _writeDefineType(indent, generatorOptions.module, api.name); + _writeDefineType(indent, _getModule(generatorOptions), api.name); indent.newln(); - _writeDispose(indent, generatorOptions.module, api.name, () { - _writeCastSelf(indent, generatorOptions.module, api.name, 'object'); + _writeDispose(indent, _getModule(generatorOptions), api.name, () { + _writeCastSelf(indent, _getModule(generatorOptions), api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); }); indent.newln(); - _writeInit(indent, generatorOptions.module, api.name, () {}); + _writeInit(indent, _getModule(generatorOptions), api.name, () {}); indent.newln(); - _writeClassInit(indent, generatorOptions.module, api.name, () {}); + _writeClassInit(indent, _getModule(generatorOptions), api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { - _writeObjectNew(indent, generatorOptions.module, api.name); + _writeObjectNew(indent, _getModule(generatorOptions), api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('return self;'); }); @@ -583,7 +596,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(generatorOptions.module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(_getModule(generatorOptions), param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data', @@ -594,8 +607,9 @@ class LinuxSourceGenerator extends StructuredGenerator { '}', () {}); - final String returnType = - _getType(generatorOptions.module, method.returnType, isOutput: true); + final String returnType = _getType( + _getModule(generatorOptions), method.returnType, + isOutput: true); final List finishArgs = [ '$className* object', 'GAsyncResult* result', @@ -619,32 +633,34 @@ class LinuxSourceGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = _getClassName(generatorOptions.module, api.name); + final String className = + _getClassName(_getModule(generatorOptions), api.name); final String methodPrefix = - _getMethodPrefix(generatorOptions.module, api.name); - final String vtableName = _getVTableName(generatorOptions.module, api.name); + _getMethodPrefix(_getModule(generatorOptions), api.name); + final String vtableName = + _getVTableName(_getModule(generatorOptions), api.name); final String codecName = '${api.name}Codec'; final String codecClassName = - _getClassName(generatorOptions.module, codecName); + _getClassName(_getModule(generatorOptions), codecName); final String codecMethodPrefix = '${methodPrefix}_codec'; indent.newln(); - _writeDeclareFinalType(indent, generatorOptions.module, codecName, + _writeDeclareFinalType(indent, _getModule(generatorOptions), codecName, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeObjectStruct(indent, generatorOptions.module, codecName, () {}, + _writeObjectStruct(indent, _getModule(generatorOptions), codecName, () {}, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeDefineType(indent, generatorOptions.module, codecName, + _writeDefineType(indent, _getModule(generatorOptions), codecName, parentType: 'fl_standard_message_codec_get_type()'); for (final EnumeratedClass customClass in getCodecClasses(api, root)) { final String customClassName = - _getClassName(generatorOptions.module, customClass.name); + _getClassName(_getModule(generatorOptions), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -672,11 +688,11 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.writeln('case ${customClass.enumeration}:'); indent.nest(1, () { final String customClassName = - _getClassName(generatorOptions.module, customClass.name); + _getClassName(_getModule(generatorOptions), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); - final String castMacro = - _getClassCastMacro(generatorOptions.module, customClass.name); + final String castMacro = _getClassCastMacro( + _getModule(generatorOptions), customClass.name); indent.writeln( 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); }); @@ -691,7 +707,7 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { final String customClassName = - _getClassName(generatorOptions.module, customClass.name); + _getClassName(_getModule(generatorOptions), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -724,7 +740,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped('switch (type) {', '}', () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { final String customClassName = - _getClassName(generatorOptions.module, customClass.name); + _getClassName(_getModule(generatorOptions), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.writeln('case ${customClass.enumeration}:'); @@ -743,10 +759,10 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, generatorOptions.module, codecName, () {}); + _writeInit(indent, _getModule(generatorOptions), codecName, () {}); indent.newln(); - _writeClassInit(indent, generatorOptions.module, codecName, () { + _writeClassInit(indent, _getModule(generatorOptions), codecName, () { indent.writeln( 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); indent.writeln( @@ -756,52 +772,56 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); indent.addScoped( 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { - _writeObjectNew(indent, generatorOptions.module, codecName); + _writeObjectNew(indent, _getModule(generatorOptions), codecName); indent.writeln('return self;'); }); for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = - _getClassName(generatorOptions.module, responseName); + _getClassName(_getModule(generatorOptions), responseName); final String responseMethodPrefix = - _getMethodPrefix(generatorOptions.module, responseName); + _getMethodPrefix(_getModule(generatorOptions), responseName); if (method.isAsynchronous) { indent.newln(); - _writeDeclareFinalType(indent, generatorOptions.module, responseName); + _writeDeclareFinalType( + indent, _getModule(generatorOptions), responseName); } indent.newln(); - _writeObjectStruct(indent, generatorOptions.module, responseName, () { + _writeObjectStruct(indent, _getModule(generatorOptions), responseName, + () { indent.writeln('FlValue* value;'); }); indent.newln(); - _writeDefineType(indent, generatorOptions.module, responseName); + _writeDefineType(indent, _getModule(generatorOptions), responseName); indent.newln(); - _writeDispose(indent, generatorOptions.module, responseName, () { - _writeCastSelf(indent, generatorOptions.module, responseName, 'object'); + _writeDispose(indent, _getModule(generatorOptions), responseName, () { + _writeCastSelf( + indent, _getModule(generatorOptions), responseName, 'object'); indent.writeln('g_clear_pointer(&self->value, fl_value_unref);'); }); indent.newln(); - _writeInit(indent, generatorOptions.module, responseName, () {}); + _writeInit(indent, _getModule(generatorOptions), responseName, () {}); indent.newln(); - _writeClassInit(indent, generatorOptions.module, responseName, () {}); + _writeClassInit( + indent, _getModule(generatorOptions), responseName, () {}); final String returnType = - _getType(generatorOptions.module, method.returnType); + _getType(_getModule(generatorOptions), method.returnType); indent.newln(); indent.addScoped( "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", '}', () { - _writeObjectNew(indent, generatorOptions.module, responseName); + _writeObjectNew(indent, _getModule(generatorOptions), responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( - "fl_value_append_take(self->value, ${_makeFlValue(generatorOptions.module, method.returnType, 'return_value')});"); + "fl_value_append_take(self->value, ${_makeFlValue(_getModule(generatorOptions), method.returnType, 'return_value')});"); indent.writeln('return self;'); }); @@ -809,7 +829,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped( '${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details) {', '}', () { - _writeObjectNew(indent, generatorOptions.module, responseName); + _writeObjectNew(indent, _getModule(generatorOptions), responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( 'fl_value_append_take(self->value, fl_value_new_string(code));'); @@ -821,7 +841,7 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeObjectStruct(indent, generatorOptions.module, api.name, () { + _writeObjectStruct(indent, _getModule(generatorOptions), api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('const ${className}VTable* vtable;'); indent.writeln('gpointer user_data;'); @@ -835,19 +855,20 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeDefineType(indent, generatorOptions.module, api.name); + _writeDefineType(indent, _getModule(generatorOptions), api.name); for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = - _getClassName(generatorOptions.module, responseName); + _getClassName(_getModule(generatorOptions), responseName); indent.newln(); indent.addScoped( 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { - _writeCastSelf(indent, generatorOptions.module, api.name, 'user_data'); + _writeCastSelf( + indent, _getModule(generatorOptions), api.name, 'user_data'); indent.newln(); indent.addScoped( @@ -858,7 +879,9 @@ class LinuxSourceGenerator extends StructuredGenerator { final List methodArgs = [ for (int i = 0; i < method.parameters.length; i++) - _fromFlValue(generatorOptions.module, method.parameters[i].type, + _fromFlValue( + _getModule(generatorOptions), + method.parameters[i].type, 'fl_value_get_list_value(message, $i)'), ]; @@ -893,8 +916,8 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeDispose(indent, generatorOptions.module, api.name, () { - _writeCastSelf(indent, generatorOptions.module, api.name, 'object'); + _writeDispose(indent, _getModule(generatorOptions), api.name, () { + _writeCastSelf(indent, _getModule(generatorOptions), api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); indent.addScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); @@ -909,16 +932,16 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, generatorOptions.module, api.name, () {}); + _writeInit(indent, _getModule(generatorOptions), api.name, () {}); indent.newln(); - _writeClassInit(indent, generatorOptions.module, api.name, () {}); + _writeClassInit(indent, _getModule(generatorOptions), api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { - _writeObjectNew(indent, generatorOptions.module, api.name); + _writeObjectNew(indent, _getModule(generatorOptions), api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); @@ -944,13 +967,13 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { final String returnType = - _getType(generatorOptions.module, method.returnType); + _getType(_getModule(generatorOptions), method.returnType); final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = - _getClassName(generatorOptions.module, responseName); + _getClassName(_getModule(generatorOptions), responseName); final String responseMethodPrefix = - _getMethodPrefix(generatorOptions.module, responseName); + _getMethodPrefix(_getModule(generatorOptions), responseName); indent.newln(); final List respondArgs = [ @@ -997,6 +1020,10 @@ class LinuxSourceGenerator extends StructuredGenerator { } } +// Returns the module name to use. +String _getModule(LinuxOptions generatorOptions) => + generatorOptions.module ?? 'My'; + // Returns the header guard defintion for [headerFileName]. String _getGuardName(String? headerFileName) { const String prefix = 'PIGEON_'; diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart index 3ab7e733337a..da51b26b3b01 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -311,7 +311,7 @@ class PigeonOptions { /// Path to the ".cc" Linux file that will be generated. final String? linuxSourceOut; - /// Options that control how C++ will be generated. + /// Options that control how Linux source will be generated. final LinuxOptions? linuxOptions; /// Options that control how Dart will be generated. diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index bae10239718f..7b6863564e3d 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -113,6 +113,14 @@ Future generateTestPigeons({required String baseDir}) async { ? null : '$outputBase/windows/pigeon/$input.gen.cpp', cppNamespace: '${input}_pigeontest', + // Linux + linuxHeaderOut: skipLanguages.contains(GeneratorLanguage.linux) + ? null + : '$outputBase/linux/pigeon/$input.gen.h', + linuxSourceOut: skipLanguages.contains(GeneratorLanguage.linux) + ? null + : '$outputBase/linux/pigeon/$input.gen.cc', + linuxModule: 'My', suppressVersion: true, dartPackageName: 'pigeon_integration_tests', ); @@ -196,6 +204,7 @@ Future runPigeon({ String? dartTestOut, String? linuxHeaderOut, String? linuxSourceOut, + String? linuxModule, String? javaOut, String? javaPackage, String? objcHeaderOut, @@ -229,7 +238,7 @@ Future runPigeon({ cppOptions: CppOptions(namespace: cppNamespace), linuxHeaderOut: linuxHeaderOut, linuxSourceOut: linuxSourceOut, - linuxOptions: const LinuxOptions(), + linuxOptions: LinuxOptions(module: linuxModule), javaOut: javaOut, javaOptions: JavaOptions(package: javaPackage), kotlinOut: kotlinOut, From eae1cb84f892cd8e3b5fa84239d002126760a6c7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 16:21:30 +1300 Subject: [PATCH 008/127] Use package name as default module --- packages/pigeon/example/README.md | 38 +- .../pigeon/example/app/linux/messages.g.cc | 433 ++++++++++-------- .../pigeon/example/app/linux/messages.g.h | 119 +++-- .../example/app/linux/my_application.cc | 27 +- .../pigeon/example/app/pigeons/messages.dart | 2 +- packages/pigeon/lib/linux_generator.dart | 298 +++++++----- packages/pigeon/lib/pigeon_lib.dart | 2 +- .../pigeon/test/linux_generator_test.dart | 74 ++- packages/pigeon/tool/shared/generation.dart | 2 +- 9 files changed, 582 insertions(+), 413 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 4fb3eee5af4e..5c1b40722c1e 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -21,7 +21,7 @@ needed for your project. cppSourceOut: 'windows/runner/messages.g.cpp', linuxHeaderOut: 'linux/messages.g.h', linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(module: 'My'), + linuxOptions: LinuxOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), @@ -198,37 +198,37 @@ class PigeonApiImplementation : public ExampleHostApi { ``` ### Linux - + ```c++ -static MyExampleHostApiGetHostLanguageResponse* handle_get_host_language( - MyExampleHostApi* object, gpointer user_data) { - return my_example_host_api_get_host_language_response_new("C++"); +static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* handle_get_host_language( + PigeonExamplePackageExampleHostApi* object, gpointer user_data) { + return pigeon_example_package_example_host_api_get_host_language_response_new("C++"); } -static MyExampleHostApiAddResponse* handle_add(MyExampleHostApi* object, +static PigeonExamplePackageExampleHostApiAddResponse* handle_add(PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); - return my_example_host_api_add_response_new_error("code", "message", + return pigeon_example_package_example_host_api_add_response_new_error("code", "message", details); } - return my_example_host_api_add_response_new(a + b); + return pigeon_example_package_example_host_api_add_response_new(a + b); } static void handle_send_message( - MyExampleHostApi* object, MyMessageData* message, + PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - MyCode code = my_message_data_get_code(message); - if (code == MY_CODE_ONE) { + PigeonExamplePackageCode code = pigeon_example_package_message_data_get_code(message); + if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); - my_example_host_api_respond_error_send_message(object, response_handle, + pigeon_example_package_example_host_api_respond_error_send_message(object, response_handle, "code", "message", details); return; } - my_example_host_api_respond_send_message(object, response_handle, TRUE); + pigeon_example_package_example_host_api_respond_send_message(object, response_handle, TRUE); } ``` @@ -317,14 +317,14 @@ void TestPlugin::CallFlutterMethod( ### Linux - + ```c++ static void flutter_method_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!my_message_flutter_api_flutter_method_finish( - MY_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { + if (!pigeon_example_package_message_flutter_api_flutter_method_finish( + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { g_warning("Failed to call Flutter method: %s", error->message); return; } @@ -333,10 +333,10 @@ static void flutter_method_cb(GObject* object, GAsyncResult* result, } ``` - + ```c++ -self->flutter_api = my_message_flutter_api_new(messenger); -my_message_flutter_api_flutter_method_async(self->flutter_api, "hello", +self->flutter_api = pigeon_example_package_message_flutter_api_new(messenger); +pigeon_example_package_message_flutter_api_flutter_method_async(self->flutter_api, "hello", nullptr, flutter_method_cb, self); ``` diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index b94eaccf841e..c88f9e6fda78 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -6,35 +6,41 @@ #include "messages.g.h" -struct _MyMessageData { +struct _PigeonExamplePackageMessageData { GObject parent_instance; gchar* name; gchar* description; - MyCode code; + PigeonExamplePackageCode code; FlValue* data; }; -G_DEFINE_TYPE(MyMessageData, my_message_data, G_TYPE_OBJECT) +G_DEFINE_TYPE(PigeonExamplePackageMessageData, + pigeon_example_package_message_data, G_TYPE_OBJECT) -static void my_message_data_dispose(GObject* object) { - MyMessageData* self = MY_MESSAGE_DATA(object); +static void pigeon_example_package_message_data_dispose(GObject* object) { + PigeonExamplePackageMessageData* self = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA(object); g_clear_pointer(&self->name, g_free); g_clear_pointer(&self->description, g_free); g_clear_pointer(&self->data, fl_value_unref); - G_OBJECT_CLASS(my_message_data_parent_class)->dispose(object); + G_OBJECT_CLASS(pigeon_example_package_message_data_parent_class) + ->dispose(object); } -static void my_message_data_init(MyMessageData* self) {} +static void pigeon_example_package_message_data_init( + PigeonExamplePackageMessageData* self) {} -static void my_message_data_class_init(MyMessageDataClass* klass) { - G_OBJECT_CLASS(klass)->dispose = my_message_data_dispose; +static void pigeon_example_package_message_data_class_init( + PigeonExamplePackageMessageDataClass* klass) { + G_OBJECT_CLASS(klass)->dispose = pigeon_example_package_message_data_dispose; } -MyMessageData* my_message_data_new(const gchar* name, const gchar* description, - MyCode code, FlValue* data) { - MyMessageData* self = - MY_MESSAGE_DATA(g_object_new(my_message_data_get_type(), nullptr)); +PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( + const gchar* name, const gchar* description, PigeonExamplePackageCode code, + FlValue* data) { + PigeonExamplePackageMessageData* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( + g_object_new(pigeon_example_package_message_data_get_type(), nullptr)); self->name = g_strdup(name); self->description = g_strdup(description); self->code = code; @@ -42,27 +48,33 @@ MyMessageData* my_message_data_new(const gchar* name, const gchar* description, return self; } -const gchar* my_message_data_get_name(MyMessageData* self) { - g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); +const gchar* pigeon_example_package_message_data_get_name( + PigeonExamplePackageMessageData* self) { + g_return_val_if_fail(PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_DATA(self), nullptr); return self->name; } -const gchar* my_message_data_get_description(MyMessageData* self) { - g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); +const gchar* pigeon_example_package_message_data_get_description( + PigeonExamplePackageMessageData* self) { + g_return_val_if_fail(PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_DATA(self), nullptr); return self->description; } -MyCode my_message_data_get_code(MyMessageData* self) { - g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), static_cast(0)); +PigeonExamplePackageCode pigeon_example_package_message_data_get_code( + PigeonExamplePackageMessageData* self) { + g_return_val_if_fail(PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_DATA(self), + static_cast(0)); return self->code; } -FlValue* my_message_data_get_data(MyMessageData* self) { - g_return_val_if_fail(MY_IS_MESSAGE_DATA(self), nullptr); +FlValue* pigeon_example_package_message_data_get_data( + PigeonExamplePackageMessageData* self) { + g_return_val_if_fail(PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_DATA(self), nullptr); return self->data; } -static FlValue* my_message_data_to_list(MyMessageData* self) { +static FlValue* pigeon_example_package_message_data_to_list( + PigeonExamplePackageMessageData* self) { FlValue* values = fl_value_new_list(); fl_value_append_take(values, fl_value_new_string(self->name)); fl_value_append_take(values, fl_value_new_string(self->description)); @@ -71,60 +83,69 @@ static FlValue* my_message_data_to_list(MyMessageData* self) { return values; } -static MyMessageData* my_message_data_new_from_list(FlValue* values) { - return my_message_data_new( +static PigeonExamplePackageMessageData* +pigeon_example_package_message_data_new_from_list(FlValue* values) { + return pigeon_example_package_message_data_new( fl_value_get_string(fl_value_get_list_value(values, 0)), fl_value_get_string(fl_value_get_list_value(values, 1)), - static_cast(fl_value_get_int(fl_value_get_list_value(values, 2))), + static_cast( + fl_value_get_int(fl_value_get_list_value(values, 2))), fl_value_get_list_value(values, 3)); } -G_DECLARE_FINAL_TYPE(MyExampleHostApiCodec, my_example_host_api_codec, MY, - EXAMPLE_HOST_API_CODEC, FlStandardMessageCodec) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiCodec, + pigeon_example_package_example_host_api_codec, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_CODEC, + FlStandardMessageCodec) -struct _MyExampleHostApiCodec { +struct _PigeonExamplePackageExampleHostApiCodec { FlStandardMessageCodec parent_instance; }; -G_DEFINE_TYPE(MyExampleHostApiCodec, my_example_host_api_codec, +G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiCodec, + pigeon_example_package_example_host_api_codec, fl_standard_message_codec_get_type()) -static gboolean write_my_message_data(FlStandardMessageCodec* codec, - GByteArray* buffer, MyMessageData* value, - GError** error) { +static gboolean write_pigeon_example_package_message_data( + FlStandardMessageCodec* codec, GByteArray* buffer, + PigeonExamplePackageMessageData* value, GError** error) { uint8_t type = 128; g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = my_message_data_to_list(value); + g_autoptr(FlValue) values = + pigeon_example_package_message_data_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean my_example_host_api_write_value(FlStandardMessageCodec* codec, - GByteArray* buffer, - FlValue* value, - GError** error) { +static gboolean pigeon_example_package_example_host_api_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 128: - return write_my_message_data( + return write_pigeon_example_package_message_data( codec, buffer, - MY_MESSAGE_DATA(fl_value_get_custom_value_object(value)), error); + PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( + fl_value_get_custom_value_object(value)), + error); } } - return FL_STANDARD_MESSAGE_CODEC_CLASS(my_example_host_api_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS( + pigeon_example_package_example_host_api_codec_parent_class) ->write_value(codec, buffer, value, error); } -static FlValue* read_my_message_data(FlStandardMessageCodec* codec, - GBytes* buffer, size_t* offset, - GError** error) { +static FlValue* read_pigeon_example_package_message_data( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error); if (values == nullptr) { return nullptr; } - g_autoptr(MyMessageData) value = my_message_data_new_from_list(values); + g_autoptr(PigeonExamplePackageMessageData) value = + pigeon_example_package_message_data_new_from_list(values); if (value == nullptr) { g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData"); @@ -134,79 +155,92 @@ static FlValue* read_my_message_data(FlStandardMessageCodec* codec, return fl_value_new_custom_object_take(128, G_OBJECT(value)); } -static FlValue* my_example_host_api_read_value_of_type( +static FlValue* pigeon_example_package_example_host_api_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { case 128: - return read_my_message_data(codec, buffer, offset, error); + return read_pigeon_example_package_message_data(codec, buffer, offset, + error); default: return FL_STANDARD_MESSAGE_CODEC_CLASS( - my_example_host_api_codec_parent_class) + pigeon_example_package_example_host_api_codec_parent_class) ->read_value_of_type(codec, buffer, offset, type, error); } } -static void my_example_host_api_codec_init(MyExampleHostApiCodec* self) {} +static void pigeon_example_package_example_host_api_codec_init( + PigeonExamplePackageExampleHostApiCodec* self) {} -static void my_example_host_api_codec_class_init( - MyExampleHostApiCodecClass* klass) { +static void pigeon_example_package_example_host_api_codec_class_init( + PigeonExamplePackageExampleHostApiCodecClass* klass) { FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - my_example_host_api_write_value; + pigeon_example_package_example_host_api_write_value; FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - my_example_host_api_read_value_of_type; + pigeon_example_package_example_host_api_read_value_of_type; } -static MyExampleHostApiCodec* my_example_host_api_codec_new() { - MyExampleHostApiCodec* self = MY_EXAMPLE_HOST_API_CODEC( - g_object_new(my_example_host_api_codec_get_type(), nullptr)); +static PigeonExamplePackageExampleHostApiCodec* +pigeon_example_package_example_host_api_codec_new() { + PigeonExamplePackageExampleHostApiCodec* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_CODEC(g_object_new( + pigeon_example_package_example_host_api_codec_get_type(), nullptr)); return self; } -struct _MyExampleHostApiGetHostLanguageResponse { +struct _PigeonExamplePackageExampleHostApiGetHostLanguageResponse { GObject parent_instance; FlValue* value; }; -G_DEFINE_TYPE(MyExampleHostApiGetHostLanguageResponse, - my_example_host_api_get_host_language_response, G_TYPE_OBJECT) +G_DEFINE_TYPE( + PigeonExamplePackageExampleHostApiGetHostLanguageResponse, + pigeon_example_package_example_host_api_get_host_language_response, + G_TYPE_OBJECT) -static void my_example_host_api_get_host_language_response_dispose( +static void +pigeon_example_package_example_host_api_get_host_language_response_dispose( GObject* object) { - MyExampleHostApiGetHostLanguageResponse* self = - MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(object); + PigeonExamplePackageExampleHostApiGetHostLanguageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE( + object); g_clear_pointer(&self->value, fl_value_unref); - G_OBJECT_CLASS(my_example_host_api_get_host_language_response_parent_class) + G_OBJECT_CLASS( + pigeon_example_package_example_host_api_get_host_language_response_parent_class) ->dispose(object); } -static void my_example_host_api_get_host_language_response_init( - MyExampleHostApiGetHostLanguageResponse* self) {} +static void +pigeon_example_package_example_host_api_get_host_language_response_init( + PigeonExamplePackageExampleHostApiGetHostLanguageResponse* self) {} -static void my_example_host_api_get_host_language_response_class_init( - MyExampleHostApiGetHostLanguageResponseClass* klass) { +static void +pigeon_example_package_example_host_api_get_host_language_response_class_init( + PigeonExamplePackageExampleHostApiGetHostLanguageResponseClass* klass) { G_OBJECT_CLASS(klass)->dispose = - my_example_host_api_get_host_language_response_dispose; + pigeon_example_package_example_host_api_get_host_language_response_dispose; } -MyExampleHostApiGetHostLanguageResponse* -my_example_host_api_get_host_language_response_new(const gchar* return_value) { - MyExampleHostApiGetHostLanguageResponse* self = - MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( - my_example_host_api_get_host_language_response_get_type(), nullptr)); +PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +pigeon_example_package_example_host_api_get_host_language_response_new( + const gchar* return_value) { + PigeonExamplePackageExampleHostApiGetHostLanguageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_get_host_language_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(return_value)); return self; } -MyExampleHostApiGetHostLanguageResponse* -my_example_host_api_get_host_language_response_new_error(const gchar* code, - const gchar* message, - FlValue* details) { - MyExampleHostApiGetHostLanguageResponse* self = - MY_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( - my_example_host_api_get_host_language_response_get_type(), nullptr)); +PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +pigeon_example_package_example_host_api_get_host_language_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + PigeonExamplePackageExampleHostApiGetHostLanguageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_get_host_language_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); fl_value_append_take(self->value, fl_value_new_string(message)); @@ -214,43 +248,53 @@ my_example_host_api_get_host_language_response_new_error(const gchar* code, return self; } -struct _MyExampleHostApiAddResponse { +struct _PigeonExamplePackageExampleHostApiAddResponse { GObject parent_instance; FlValue* value; }; -G_DEFINE_TYPE(MyExampleHostApiAddResponse, my_example_host_api_add_response, +G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiAddResponse, + pigeon_example_package_example_host_api_add_response, G_TYPE_OBJECT) -static void my_example_host_api_add_response_dispose(GObject* object) { - MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE(object); +static void pigeon_example_package_example_host_api_add_response_dispose( + GObject* object) { + PigeonExamplePackageExampleHostApiAddResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_ADD_RESPONSE(object); g_clear_pointer(&self->value, fl_value_unref); - G_OBJECT_CLASS(my_example_host_api_add_response_parent_class) + G_OBJECT_CLASS( + pigeon_example_package_example_host_api_add_response_parent_class) ->dispose(object); } -static void my_example_host_api_add_response_init( - MyExampleHostApiAddResponse* self) {} +static void pigeon_example_package_example_host_api_add_response_init( + PigeonExamplePackageExampleHostApiAddResponse* self) {} -static void my_example_host_api_add_response_class_init( - MyExampleHostApiAddResponseClass* klass) { - G_OBJECT_CLASS(klass)->dispose = my_example_host_api_add_response_dispose; +static void pigeon_example_package_example_host_api_add_response_class_init( + PigeonExamplePackageExampleHostApiAddResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_example_host_api_add_response_dispose; } -MyExampleHostApiAddResponse* my_example_host_api_add_response_new( - int64_t return_value) { - MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE( - g_object_new(my_example_host_api_add_response_get_type(), nullptr)); +PigeonExamplePackageExampleHostApiAddResponse* +pigeon_example_package_example_host_api_add_response_new(int64_t return_value) { + PigeonExamplePackageExampleHostApiAddResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_ADD_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_add_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_int(return_value)); return self; } -MyExampleHostApiAddResponse* my_example_host_api_add_response_new_error( +PigeonExamplePackageExampleHostApiAddResponse* +pigeon_example_package_example_host_api_add_response_new_error( const gchar* code, const gchar* message, FlValue* details) { - MyExampleHostApiAddResponse* self = MY_EXAMPLE_HOST_API_ADD_RESPONSE( - g_object_new(my_example_host_api_add_response_get_type(), nullptr)); + PigeonExamplePackageExampleHostApiAddResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_ADD_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_add_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); fl_value_append_take(self->value, fl_value_new_string(message)); @@ -258,53 +302,61 @@ MyExampleHostApiAddResponse* my_example_host_api_add_response_new_error( return self; } -G_DECLARE_FINAL_TYPE(MyExampleHostApiSendMessageResponse, - my_example_host_api_send_message_response, MY, - EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE, GObject) +G_DECLARE_FINAL_TYPE( + PigeonExamplePackageExampleHostApiSendMessageResponse, + pigeon_example_package_example_host_api_send_message_response, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE, GObject) -struct _MyExampleHostApiSendMessageResponse { +struct _PigeonExamplePackageExampleHostApiSendMessageResponse { GObject parent_instance; FlValue* value; }; -G_DEFINE_TYPE(MyExampleHostApiSendMessageResponse, - my_example_host_api_send_message_response, G_TYPE_OBJECT) +G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiSendMessageResponse, + pigeon_example_package_example_host_api_send_message_response, + G_TYPE_OBJECT) -static void my_example_host_api_send_message_response_dispose(GObject* object) { - MyExampleHostApiSendMessageResponse* self = - MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(object); +static void +pigeon_example_package_example_host_api_send_message_response_dispose( + GObject* object) { + PigeonExamplePackageExampleHostApiSendMessageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(object); g_clear_pointer(&self->value, fl_value_unref); - G_OBJECT_CLASS(my_example_host_api_send_message_response_parent_class) + G_OBJECT_CLASS( + pigeon_example_package_example_host_api_send_message_response_parent_class) ->dispose(object); } -static void my_example_host_api_send_message_response_init( - MyExampleHostApiSendMessageResponse* self) {} +static void pigeon_example_package_example_host_api_send_message_response_init( + PigeonExamplePackageExampleHostApiSendMessageResponse* self) {} -static void my_example_host_api_send_message_response_class_init( - MyExampleHostApiSendMessageResponseClass* klass) { +static void +pigeon_example_package_example_host_api_send_message_response_class_init( + PigeonExamplePackageExampleHostApiSendMessageResponseClass* klass) { G_OBJECT_CLASS(klass)->dispose = - my_example_host_api_send_message_response_dispose; + pigeon_example_package_example_host_api_send_message_response_dispose; } -static MyExampleHostApiSendMessageResponse* -my_example_host_api_send_message_response_new(gboolean return_value) { - MyExampleHostApiSendMessageResponse* self = - MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( - my_example_host_api_send_message_response_get_type(), nullptr)); +static PigeonExamplePackageExampleHostApiSendMessageResponse* +pigeon_example_package_example_host_api_send_message_response_new( + gboolean return_value) { + PigeonExamplePackageExampleHostApiSendMessageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_send_message_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_bool(return_value)); return self; } -static MyExampleHostApiSendMessageResponse* -my_example_host_api_send_message_response_new_error(const gchar* code, - const gchar* message, - FlValue* details) { - MyExampleHostApiSendMessageResponse* self = - MY_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( - my_example_host_api_send_message_response_get_type(), nullptr)); +static PigeonExamplePackageExampleHostApiSendMessageResponse* +pigeon_example_package_example_host_api_send_message_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + PigeonExamplePackageExampleHostApiSendMessageResponse* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_SEND_MESSAGE_RESPONSE(g_object_new( + pigeon_example_package_example_host_api_send_message_response_get_type(), + nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); fl_value_append_take(self->value, fl_value_new_string(message)); @@ -312,11 +364,11 @@ my_example_host_api_send_message_response_new_error(const gchar* code, return self; } -struct _MyExampleHostApi { +struct _PigeonExamplePackageExampleHostApi { GObject parent_instance; FlBinaryMessenger* messenger; - const MyExampleHostApiVTable* vtable; + const PigeonExamplePackageExampleHostApiVTable* vtable; gpointer user_data; GDestroyNotify user_data_free_func; @@ -325,12 +377,14 @@ struct _MyExampleHostApi { FlBasicMessageChannel* send_message_channel; }; -G_DEFINE_TYPE(MyExampleHostApi, my_example_host_api, G_TYPE_OBJECT) +G_DEFINE_TYPE(PigeonExamplePackageExampleHostApi, + pigeon_example_package_example_host_api, G_TYPE_OBJECT) static void get_host_language_cb( FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); if (self->vtable == nullptr || self->vtable->get_host_language == nullptr) { return; @@ -340,8 +394,8 @@ static void get_host_language_cb( return; } - g_autoptr(MyExampleHostApiGetHostLanguageResponse) response = - self->vtable->get_host_language(self, self->user_data); + g_autoptr(PigeonExamplePackageExampleHostApiGetHostLanguageResponse) + response = self->vtable->get_host_language(self, self->user_data); if (response == nullptr) { g_warning("No response returned to ExampleHostApi.getHostLanguage"); return; @@ -358,7 +412,8 @@ static void get_host_language_cb( static void add_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); if (self->vtable == nullptr || self->vtable->add == nullptr) { return; @@ -373,9 +428,11 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, return; } - g_autoptr(MyExampleHostApiAddResponse) response = self->vtable->add( - self, fl_value_get_int(fl_value_get_list_value(message, 0)), - fl_value_get_int(fl_value_get_list_value(message, 1)), self->user_data); + g_autoptr(PigeonExamplePackageExampleHostApiAddResponse) response = + self->vtable->add(self, + fl_value_get_int(fl_value_get_list_value(message, 0)), + fl_value_get_int(fl_value_get_list_value(message, 1)), + self->user_data); if (response == nullptr) { g_warning("No response returned to ExampleHostApi.add"); return; @@ -392,7 +449,8 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, static void send_message_cb( FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - MyExampleHostApi* self = MY_EXAMPLE_HOST_API(user_data); + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); if (self->vtable == nullptr || self->vtable->send_message == nullptr) { return; @@ -405,14 +463,16 @@ static void send_message_cb( return; } - self->vtable->send_message(self, - MY_MESSAGE_DATA(fl_value_get_custom_value_object( - fl_value_get_list_value(message, 0))), - response_handle, self->user_data); + self->vtable->send_message( + self, + PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA(fl_value_get_custom_value_object( + fl_value_get_list_value(message, 0))), + response_handle, self->user_data); } -static void my_example_host_api_dispose(GObject* object) { - MyExampleHostApi* self = MY_EXAMPLE_HOST_API(object); +static void pigeon_example_package_example_host_api_dispose(GObject* object) { + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(object); g_clear_object(&self->messenger); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); @@ -422,27 +482,33 @@ static void my_example_host_api_dispose(GObject* object) { g_clear_object(&self->get_host_language_channel); g_clear_object(&self->add_channel); g_clear_object(&self->send_message_channel); - G_OBJECT_CLASS(my_example_host_api_parent_class)->dispose(object); + G_OBJECT_CLASS(pigeon_example_package_example_host_api_parent_class) + ->dispose(object); } -static void my_example_host_api_init(MyExampleHostApi* self) {} +static void pigeon_example_package_example_host_api_init( + PigeonExamplePackageExampleHostApi* self) {} -static void my_example_host_api_class_init(MyExampleHostApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = my_example_host_api_dispose; +static void pigeon_example_package_example_host_api_class_init( + PigeonExamplePackageExampleHostApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_example_host_api_dispose; } -MyExampleHostApi* my_example_host_api_new(FlBinaryMessenger* messenger, - const MyExampleHostApiVTable* vtable, - gpointer user_data, - GDestroyNotify user_data_free_func) { - MyExampleHostApi* self = MY_EXAMPLE_HOST_API( - g_object_new(my_example_host_api_get_type(), nullptr)); +PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( + FlBinaryMessenger* messenger, + const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( + pigeon_example_package_example_host_api_get_type(), nullptr)); self->messenger = g_object_ref(messenger); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(MyExampleHostApiCodec) codec = my_example_host_api_codec_new(); + g_autoptr(PigeonExamplePackageExampleHostApiCodec) codec = + pigeon_example_package_example_host_api_codec_new(); self->get_host_language_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_example_package." @@ -465,12 +531,13 @@ MyExampleHostApi* my_example_host_api_new(FlBinaryMessenger* messenger, return self; } -void my_example_host_api_respond_send_message( - MyExampleHostApi* self, +void pigeon_example_package_example_host_api_respond_send_message( + PigeonExamplePackageExampleHostApi* self, FlBasicMessageChannelResponseHandle* response_handle, gboolean return_value) { - g_autoptr(MyExampleHostApiSendMessageResponse) response = - my_example_host_api_send_message_response_new(return_value); + g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = + pigeon_example_package_example_host_api_send_message_response_new( + return_value); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond(self->send_message_channel, response_handle, response->value, @@ -480,13 +547,13 @@ void my_example_host_api_respond_send_message( } } -void my_example_host_api_respond_error_send_message( - MyExampleHostApi* self, +void pigeon_example_package_example_host_api_respond_error_send_message( + PigeonExamplePackageExampleHostApi* self, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { - g_autoptr(MyExampleHostApiSendMessageResponse) response = - my_example_host_api_send_message_response_new_error(code, message, - details); + g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = + pigeon_example_package_example_host_api_send_message_response_new_error( + code, message, details); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond(self->send_message_channel, response_handle, response->value, @@ -496,41 +563,49 @@ void my_example_host_api_respond_error_send_message( } } -struct _MyMessageFlutterApi { +struct _PigeonExamplePackageMessageFlutterApi { GObject parent_instance; FlBinaryMessenger* messenger; }; -G_DEFINE_TYPE(MyMessageFlutterApi, my_message_flutter_api, G_TYPE_OBJECT) +G_DEFINE_TYPE(PigeonExamplePackageMessageFlutterApi, + pigeon_example_package_message_flutter_api, G_TYPE_OBJECT) -static void my_message_flutter_api_dispose(GObject* object) { - MyMessageFlutterApi* self = MY_MESSAGE_FLUTTER_API(object); +static void pigeon_example_package_message_flutter_api_dispose( + GObject* object) { + PigeonExamplePackageMessageFlutterApi* self = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object); g_clear_object(&self->messenger); - G_OBJECT_CLASS(my_message_flutter_api_parent_class)->dispose(object); + G_OBJECT_CLASS(pigeon_example_package_message_flutter_api_parent_class) + ->dispose(object); } -static void my_message_flutter_api_init(MyMessageFlutterApi* self) {} +static void pigeon_example_package_message_flutter_api_init( + PigeonExamplePackageMessageFlutterApi* self) {} -static void my_message_flutter_api_class_init(MyMessageFlutterApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = my_message_flutter_api_dispose; +static void pigeon_example_package_message_flutter_api_class_init( + PigeonExamplePackageMessageFlutterApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_message_flutter_api_dispose; } -MyMessageFlutterApi* my_message_flutter_api_new(FlBinaryMessenger* messenger) { - MyMessageFlutterApi* self = MY_MESSAGE_FLUTTER_API( - g_object_new(my_message_flutter_api_get_type(), nullptr)); +PigeonExamplePackageMessageFlutterApi* +pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { + PigeonExamplePackageMessageFlutterApi* self = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( + pigeon_example_package_message_flutter_api_get_type(), nullptr)); self->messenger = g_object_ref(messenger); return self; } -void my_message_flutter_api_flutter_method_async(MyMessageFlutterApi* object, - const gchar* a_string, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data) {} +void pigeon_example_package_message_flutter_api_flutter_method_async( + PigeonExamplePackageMessageFlutterApi* object, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) {} -gboolean my_message_flutter_api_flutter_method_finish( - MyMessageFlutterApi* object, GAsyncResult* result, gchar** return_value, - GError** error) { +gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( + PigeonExamplePackageMessageFlutterApi* object, GAsyncResult* result, + gchar** return_value, GError** error) { return TRUE; } diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index fb23de7292b6..3ebb853c5416 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -11,85 +11,104 @@ G_BEGIN_DECLS -typedef enum { MY_CODE_ONE = 0, MY_CODE_TWO = 1 } MyCode; +typedef enum { + PIGEON_EXAMPLE_PACKAGE_CODE_ONE = 0, + PIGEON_EXAMPLE_PACKAGE_CODE_TWO = 1 +} PigeonExamplePackageCode; -G_DECLARE_FINAL_TYPE(MyMessageData, my_message_data, MY, MESSAGE_DATA, GObject) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageData, + pigeon_example_package_message_data, + PIGEON_EXAMPLE_PACKAGE, MESSAGE_DATA, GObject) -MyMessageData* my_message_data_new(const gchar* name, const gchar* description, - MyCode code, FlValue* data); +PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( + const gchar* name, const gchar* description, PigeonExamplePackageCode code, + FlValue* data); -const gchar* my_message_data_get_name(MyMessageData* object); +const gchar* pigeon_example_package_message_data_get_name( + PigeonExamplePackageMessageData* object); -const gchar* my_message_data_get_description(MyMessageData* object); +const gchar* pigeon_example_package_message_data_get_description( + PigeonExamplePackageMessageData* object); -MyCode my_message_data_get_code(MyMessageData* object); +PigeonExamplePackageCode pigeon_example_package_message_data_get_code( + PigeonExamplePackageMessageData* object); -FlValue* my_message_data_get_data(MyMessageData* object); +FlValue* pigeon_example_package_message_data_get_data( + PigeonExamplePackageMessageData* object); -G_DECLARE_FINAL_TYPE(MyExampleHostApiGetHostLanguageResponse, - my_example_host_api_get_host_language_response, MY, - EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE, GObject) +G_DECLARE_FINAL_TYPE( + PigeonExamplePackageExampleHostApiGetHostLanguageResponse, + pigeon_example_package_example_host_api_get_host_language_response, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE, + GObject) -MyExampleHostApiGetHostLanguageResponse* -my_example_host_api_get_host_language_response_new(const gchar* return_value); +PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +pigeon_example_package_example_host_api_get_host_language_response_new( + const gchar* return_value); -MyExampleHostApiGetHostLanguageResponse* -my_example_host_api_get_host_language_response_new_error(const gchar* code, - const gchar* message, - FlValue* details); +PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +pigeon_example_package_example_host_api_get_host_language_response_new_error( + const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(MyExampleHostApiAddResponse, - my_example_host_api_add_response, MY, - EXAMPLE_HOST_API_ADD_RESPONSE, GObject) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiAddResponse, + pigeon_example_package_example_host_api_add_response, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_ADD_RESPONSE, + GObject) -MyExampleHostApiAddResponse* my_example_host_api_add_response_new( - int64_t return_value); +PigeonExamplePackageExampleHostApiAddResponse* +pigeon_example_package_example_host_api_add_response_new(int64_t return_value); -MyExampleHostApiAddResponse* my_example_host_api_add_response_new_error( +PigeonExamplePackageExampleHostApiAddResponse* +pigeon_example_package_example_host_api_add_response_new_error( const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(MyExampleHostApi, my_example_host_api, MY, - EXAMPLE_HOST_API, GObject) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, + pigeon_example_package_example_host_api, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API, GObject) typedef struct { - MyExampleHostApiGetHostLanguageResponse* (*get_host_language)( - MyExampleHostApi* object, gpointer user_data); - MyExampleHostApiAddResponse* (*add)(MyExampleHostApi* object, int64_t a, - int64_t b, gpointer user_data); - void (*send_message)(MyExampleHostApi* object, MyMessageData* message, + PigeonExamplePackageExampleHostApiGetHostLanguageResponse* ( + *get_host_language)(PigeonExamplePackageExampleHostApi* object, + gpointer user_data); + PigeonExamplePackageExampleHostApiAddResponse* (*add)( + PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, + gpointer user_data); + void (*send_message)(PigeonExamplePackageExampleHostApi* object, + PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); -} MyExampleHostApiVTable; +} PigeonExamplePackageExampleHostApiVTable; -MyExampleHostApi* my_example_host_api_new(FlBinaryMessenger* messenger, - const MyExampleHostApiVTable* vtable, - gpointer user_data, - GDestroyNotify user_data_free_func); +PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( + FlBinaryMessenger* messenger, + const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func); -void my_example_host_api_respond_send_message( - MyExampleHostApi* self, +void pigeon_example_package_example_host_api_respond_send_message( + PigeonExamplePackageExampleHostApi* self, FlBasicMessageChannelResponseHandle* response_handle, gboolean return_value); -void my_example_host_api_respond_error_send_message( - MyExampleHostApi* self, +void pigeon_example_package_example_host_api_respond_error_send_message( + PigeonExamplePackageExampleHostApi* self, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(MyMessageFlutterApi, my_message_flutter_api, MY, - MESSAGE_FLUTTER_API, GObject) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageFlutterApi, + pigeon_example_package_message_flutter_api, + PIGEON_EXAMPLE_PACKAGE, MESSAGE_FLUTTER_API, GObject) -MyMessageFlutterApi* my_message_flutter_api_new(FlBinaryMessenger* messenger); +PigeonExamplePackageMessageFlutterApi* +pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger); -void my_message_flutter_api_flutter_method_async(MyMessageFlutterApi* object, - const gchar* a_string, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); +void pigeon_example_package_message_flutter_api_flutter_method_async( + PigeonExamplePackageMessageFlutterApi* object, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); -gboolean my_message_flutter_api_flutter_method_finish( - MyMessageFlutterApi* object, GAsyncResult* result, gchar** return_value, - GError** error); +gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( + PigeonExamplePackageMessageFlutterApi* object, GAsyncResult* result, + gchar** return_value, GError** error); G_END_DECLS diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index be4c1249ba39..3891d5dad61d 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -16,22 +16,23 @@ struct _MyApplication { GtkApplication parent_instance; char** dart_entrypoint_arguments; - MyExampleHostApi* example_host_api; + PigeonExamplePackageExampleHostApi* example_host_api; - MyMessageFlutterApi* flutter_api; + PigeonExamplePackageMessageFlutterApi* flutter_api; }; G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) // #docregion vtable -static MyExampleHostApiGetHostLanguageResponse* handle_get_host_language( - MyExampleHostApi* object, gpointer user_data) { +static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +handle_get_host_language(PigeonExamplePackageExampleHostApi* object, + gpointer user_data) { return my_example_host_api_get_host_language_response_new("C++"); } -static MyExampleHostApiAddResponse* handle_add(MyExampleHostApi* object, - int64_t a, int64_t b, - gpointer user_data) { +static PigeonExamplePackageExampleHostApiAddResponse* handle_add( + PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, + gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); return my_example_host_api_add_response_new_error("code", "message", @@ -42,10 +43,11 @@ static MyExampleHostApiAddResponse* handle_add(MyExampleHostApi* object, } static void handle_send_message( - MyExampleHostApi* object, MyMessageData* message, + PigeonExamplePackageExampleHostApi* object, + PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - MyCode code = my_message_data_get_code(message); - if (code == MY_CODE_ONE) { + PigeonExamplePackageCode code = my_message_data_get_code(message); + if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); my_example_host_api_respond_error_send_message(object, response_handle, "code", "message", details); @@ -62,7 +64,8 @@ static void flutter_method_cb(GObject* object, GAsyncResult* result, g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; if (!my_message_flutter_api_flutter_method_finish( - MY_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, + &return_value, &error)) { g_warning("Failed to call Flutter method: %s", error->message); return; } @@ -117,7 +120,7 @@ static void my_application_activate(GApplication* application) { FlBinaryMessenger* messenger = fl_engine_get_binary_messenger(fl_view_get_engine(view)); - static MyExampleHostApiVTable example_host_api_vtable = { + static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { .get_host_language = handle_get_host_language, .add = handle_add, .send_message = handle_send_message}; diff --git a/packages/pigeon/example/app/pigeons/messages.dart b/packages/pigeon/example/app/pigeons/messages.dart index c6998c545411..9f74b6bde856 100644 --- a/packages/pigeon/example/app/pigeons/messages.dart +++ b/packages/pigeon/example/app/pigeons/messages.dart @@ -13,7 +13,7 @@ import 'package:pigeon/pigeon.dart'; cppSourceOut: 'windows/runner/messages.g.cpp', linuxHeaderOut: 'linux/messages.g.h', linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(module: 'My'), + linuxOptions: LinuxOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 3510ccb5cb82..6e09d663b4ad 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -41,7 +41,7 @@ class LinuxOptions { static LinuxOptions fromMap(Map map) { return LinuxOptions( headerIncludePath: map['header'] as String?, - module: map['module'] as String? ?? 'My', + module: map['module'] as String?, copyrightHeader: map['copyrightHeader'] as Iterable?, headerOutPath: map['linuxHeaderOut'] as String?, ); @@ -152,8 +152,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { Enum anEnum, { required String dartPackageName, }) { - final String enumName = - _getClassName(_getModule(generatorOptions), anEnum.name); + final String enumName = _getClassName( + _getModule(generatorOptions, dartPackageName), anEnum.name); indent.newln(); addDocumentationComments( @@ -162,7 +162,9 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; final String itemName = _getEnumValue( - _getModule(generatorOptions), anEnum.name, member.name); + _getModule(generatorOptions, dartPackageName), + anEnum.name, + member.name); addDocumentationComments( indent, member.documentationComments, _docCommentSpec); indent.writeln( @@ -179,23 +181,24 @@ class LinuxHeaderGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - final String className = - _getClassName(_getModule(generatorOptions), classDefinition.name); + final String className = _getClassName( + _getModule(generatorOptions, dartPackageName), classDefinition.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), classDefinition.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), classDefinition.name); indent.newln(); addDocumentationComments( indent, classDefinition.documentationComments, _docCommentSpec); - _writeDeclareFinalType( - indent, _getModule(generatorOptions), classDefinition.name); + _writeDeclareFinalType(indent, + _getModule(generatorOptions, dartPackageName), classDefinition.name); indent.newln(); final List constructorArgs = []; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String type = _getType(_getModule(generatorOptions), field.type); + final String type = + _getType(_getModule(generatorOptions, dartPackageName), field.type); constructorArgs.add('$type $fieldName'); } indent.writeln( @@ -204,7 +207,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String returnType = - _getType(_getModule(generatorOptions), field.type); + _getType(_getModule(generatorOptions, dartPackageName), field.type); indent.newln(); addDocumentationComments( @@ -223,15 +226,16 @@ class LinuxHeaderGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = - _getClassName(_getModule(generatorOptions), api.name); + _getClassName(_getModule(generatorOptions, dartPackageName), api.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), api.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), api.name); indent.newln(); addDocumentationComments( indent, api.documentationComments, _docCommentSpec); - _writeDeclareFinalType(indent, _getModule(generatorOptions), api.name); + _writeDeclareFinalType( + indent, _getModule(generatorOptions, dartPackageName), api.name); indent.newln(); indent.writeln( @@ -243,7 +247,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(_getModule(generatorOptions), param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(_getModule(generatorOptions, dartPackageName), param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data' @@ -255,7 +259,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); final String returnType = _getType( - _getModule(generatorOptions), method.returnType, + _getModule(generatorOptions, dartPackageName), method.returnType, isOutput: true); final List finishArgs = [ '$className* object', @@ -278,22 +282,24 @@ class LinuxHeaderGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = - _getClassName(_getModule(generatorOptions), api.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), api.name); + _getClassName(_getModule(generatorOptions, dartPackageName), api.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), api.name); final String vtableName = - _getVTableName(_getModule(generatorOptions), api.name); + _getVTableName(_getModule(generatorOptions, dartPackageName), api.name); for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { - _writeApiRespondClass(indent, _getModule(generatorOptions), api, method); + _writeApiRespondClass( + indent, _getModule(generatorOptions, dartPackageName), api, method); } indent.newln(); - _writeDeclareFinalType(indent, _getModule(generatorOptions), api.name); + _writeDeclareFinalType( + indent, _getModule(generatorOptions, dartPackageName), api.name); indent.newln(); - _writeApiVTable(indent, _getModule(generatorOptions), api); + _writeApiVTable(indent, _getModule(generatorOptions, dartPackageName), api); indent.newln(); indent.writeln( @@ -302,7 +308,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { _writeApiRespondFunctionPrototype( - indent, _getModule(generatorOptions), api, method); + indent, _getModule(generatorOptions, dartPackageName), api, method); } } @@ -436,42 +442,46 @@ class LinuxSourceGenerator extends StructuredGenerator { required String dartPackageName, }) { final String snakeModule = - _snakeCaseFromCamelCase(_getModule(generatorOptions)); - final String className = - _getClassName(_getModule(generatorOptions), classDefinition.name); + _snakeCaseFromCamelCase(_getModule(generatorOptions, dartPackageName)); + final String className = _getClassName( + _getModule(generatorOptions, dartPackageName), classDefinition.name); final String snakeClassName = _snakeCaseFromCamelCase(classDefinition.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), classDefinition.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), classDefinition.name); final String testMacro = '${snakeModule}_IS_$snakeClassName'.toUpperCase(); indent.newln(); - _writeObjectStruct( - indent, _getModule(generatorOptions), classDefinition.name, () { + _writeObjectStruct(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name, () { indent.newln(); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String fieldType = - _getType(_getModule(generatorOptions), field.type, isOutput: true); + final String fieldType = _getType( + _getModule(generatorOptions, dartPackageName), field.type, + isOutput: true); indent.writeln('$fieldType $fieldName;'); } }); indent.newln(); - _writeDefineType( - indent, _getModule(generatorOptions), classDefinition.name); + _writeDefineType(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name); indent.newln(); - _writeDispose(indent, _getModule(generatorOptions), classDefinition.name, - () { + _writeDispose(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name, () { bool haveSelf = false; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String? clear = _getClearFunction(field.type, 'self->$fieldName'); if (clear != null) { if (!haveSelf) { - _writeCastSelf(indent, _getModule(generatorOptions), - classDefinition.name, 'object'); + _writeCastSelf( + indent, + _getModule(generatorOptions, dartPackageName), + classDefinition.name, + 'object'); haveSelf = true; } indent.writeln('$clear;'); @@ -480,23 +490,23 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit( - indent, _getModule(generatorOptions), classDefinition.name, () {}); + _writeInit(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name, () {}); indent.newln(); - _writeClassInit( - indent, _getModule(generatorOptions), classDefinition.name, () {}); + _writeClassInit(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name, () {}); final List constructorArgs = [ for (final NamedType field in classDefinition.fields) - '${_getType(_getModule(generatorOptions), field.type)} ${_snakeCaseFromCamelCase(field.name)}', + '${_getType(_getModule(generatorOptions, dartPackageName), field.type)} ${_snakeCaseFromCamelCase(field.name)}', ]; indent.newln(); indent.addScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', () { - _writeObjectNew( - indent, _getModule(generatorOptions), classDefinition.name); + _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), + classDefinition.name); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String value = _referenceValue(field.type, fieldName); @@ -509,14 +519,14 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String returnType = - _getType(_getModule(generatorOptions), field.type); + _getType(_getModule(generatorOptions, dartPackageName), field.type); indent.newln(); indent.addScoped( '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', () { indent.writeln( - 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(_getModule(generatorOptions), field.type)});'); + 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(_getModule(generatorOptions, dartPackageName), field.type)});'); indent.writeln('return self->$fieldName;'); }); } @@ -528,7 +538,7 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); indent.writeln( - 'fl_value_append_take(values, ${_makeFlValue(_getModule(generatorOptions), field.type, 'self->$fieldName')});'); + 'fl_value_append_take(values, ${_makeFlValue(_getModule(generatorOptions, dartPackageName), field.type, 'self->$fieldName')});'); } indent.writeln('return values;'); }); @@ -540,8 +550,8 @@ class LinuxSourceGenerator extends StructuredGenerator { final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; - args.add(_fromFlValue(_getModule(generatorOptions), field.type, - 'fl_value_get_list_value(values, $i)')); + args.add(_fromFlValue(_getModule(generatorOptions, dartPackageName), + field.type, 'fl_value_get_list_value(values, $i)')); } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); }); @@ -556,36 +566,43 @@ class LinuxSourceGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = - _getClassName(_getModule(generatorOptions), api.name); + _getClassName(_getModule(generatorOptions, dartPackageName), api.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), api.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), api.name); indent.newln(); - _writeObjectStruct(indent, _getModule(generatorOptions), api.name, () { + _writeObjectStruct( + indent, _getModule(generatorOptions, dartPackageName), api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); }); indent.newln(); - _writeDefineType(indent, _getModule(generatorOptions), api.name); + _writeDefineType( + indent, _getModule(generatorOptions, dartPackageName), api.name); indent.newln(); - _writeDispose(indent, _getModule(generatorOptions), api.name, () { - _writeCastSelf(indent, _getModule(generatorOptions), api.name, 'object'); + _writeDispose( + indent, _getModule(generatorOptions, dartPackageName), api.name, () { + _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), + api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions), api.name, () {}); + _writeInit( + indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); indent.newln(); - _writeClassInit(indent, _getModule(generatorOptions), api.name, () {}); + _writeClassInit( + indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { - _writeObjectNew(indent, _getModule(generatorOptions), api.name); + _writeObjectNew( + indent, _getModule(generatorOptions, dartPackageName), api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('return self;'); }); @@ -596,7 +613,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(_getModule(generatorOptions), param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(_getModule(generatorOptions, dartPackageName), param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data', @@ -608,7 +625,7 @@ class LinuxSourceGenerator extends StructuredGenerator { () {}); final String returnType = _getType( - _getModule(generatorOptions), method.returnType, + _getModule(generatorOptions, dartPackageName), method.returnType, isOutput: true); final List finishArgs = [ '$className* object', @@ -634,33 +651,36 @@ class LinuxSourceGenerator extends StructuredGenerator { required String dartPackageName, }) { final String className = - _getClassName(_getModule(generatorOptions), api.name); + _getClassName(_getModule(generatorOptions, dartPackageName), api.name); - final String methodPrefix = - _getMethodPrefix(_getModule(generatorOptions), api.name); + final String methodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), api.name); final String vtableName = - _getVTableName(_getModule(generatorOptions), api.name); + _getVTableName(_getModule(generatorOptions, dartPackageName), api.name); final String codecName = '${api.name}Codec'; final String codecClassName = - _getClassName(_getModule(generatorOptions), codecName); + _getClassName(_getModule(generatorOptions, dartPackageName), codecName); final String codecMethodPrefix = '${methodPrefix}_codec'; indent.newln(); - _writeDeclareFinalType(indent, _getModule(generatorOptions), codecName, + _writeDeclareFinalType( + indent, _getModule(generatorOptions, dartPackageName), codecName, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeObjectStruct(indent, _getModule(generatorOptions), codecName, () {}, + _writeObjectStruct( + indent, _getModule(generatorOptions, dartPackageName), codecName, () {}, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeDefineType(indent, _getModule(generatorOptions), codecName, + _writeDefineType( + indent, _getModule(generatorOptions, dartPackageName), codecName, parentType: 'fl_standard_message_codec_get_type()'); for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = - _getClassName(_getModule(generatorOptions), customClass.name); + final String customClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -687,12 +707,14 @@ class LinuxSourceGenerator extends StructuredGenerator { in getCodecClasses(api, root)) { indent.writeln('case ${customClass.enumeration}:'); indent.nest(1, () { - final String customClassName = - _getClassName(_getModule(generatorOptions), customClass.name); + final String customClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), + customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); final String castMacro = _getClassCastMacro( - _getModule(generatorOptions), customClass.name); + _getModule(generatorOptions, dartPackageName), + customClass.name); indent.writeln( 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); }); @@ -706,8 +728,8 @@ class LinuxSourceGenerator extends StructuredGenerator { }); for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = - _getClassName(_getModule(generatorOptions), customClass.name); + final String customClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -739,8 +761,8 @@ class LinuxSourceGenerator extends StructuredGenerator { '}', () { indent.addScoped('switch (type) {', '}', () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = - _getClassName(_getModule(generatorOptions), customClass.name); + final String customClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.writeln('case ${customClass.enumeration}:'); @@ -759,10 +781,12 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions), codecName, () {}); + _writeInit(indent, _getModule(generatorOptions, dartPackageName), codecName, + () {}); indent.newln(); - _writeClassInit(indent, _getModule(generatorOptions), codecName, () { + _writeClassInit( + indent, _getModule(generatorOptions, dartPackageName), codecName, () { indent.writeln( 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); indent.writeln( @@ -772,56 +796,63 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); indent.addScoped( 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { - _writeObjectNew(indent, _getModule(generatorOptions), codecName); + _writeObjectNew( + indent, _getModule(generatorOptions, dartPackageName), codecName); indent.writeln('return self;'); }); for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = - _getClassName(_getModule(generatorOptions), responseName); - final String responseMethodPrefix = - _getMethodPrefix(_getModule(generatorOptions), responseName); + final String responseClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), responseName); + final String responseMethodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), responseName); if (method.isAsynchronous) { indent.newln(); - _writeDeclareFinalType( - indent, _getModule(generatorOptions), responseName); + _writeDeclareFinalType(indent, + _getModule(generatorOptions, dartPackageName), responseName); } indent.newln(); - _writeObjectStruct(indent, _getModule(generatorOptions), responseName, + _writeObjectStruct( + indent, _getModule(generatorOptions, dartPackageName), responseName, () { indent.writeln('FlValue* value;'); }); indent.newln(); - _writeDefineType(indent, _getModule(generatorOptions), responseName); + _writeDefineType( + indent, _getModule(generatorOptions, dartPackageName), responseName); indent.newln(); - _writeDispose(indent, _getModule(generatorOptions), responseName, () { - _writeCastSelf( - indent, _getModule(generatorOptions), responseName, 'object'); + _writeDispose( + indent, _getModule(generatorOptions, dartPackageName), responseName, + () { + _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), + responseName, 'object'); indent.writeln('g_clear_pointer(&self->value, fl_value_unref);'); }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions), responseName, () {}); + _writeInit(indent, _getModule(generatorOptions, dartPackageName), + responseName, () {}); indent.newln(); - _writeClassInit( - indent, _getModule(generatorOptions), responseName, () {}); + _writeClassInit(indent, _getModule(generatorOptions, dartPackageName), + responseName, () {}); - final String returnType = - _getType(_getModule(generatorOptions), method.returnType); + final String returnType = _getType( + _getModule(generatorOptions, dartPackageName), method.returnType); indent.newln(); indent.addScoped( "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", '}', () { - _writeObjectNew(indent, _getModule(generatorOptions), responseName); + _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), + responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( - "fl_value_append_take(self->value, ${_makeFlValue(_getModule(generatorOptions), method.returnType, 'return_value')});"); + "fl_value_append_take(self->value, ${_makeFlValue(_getModule(generatorOptions, dartPackageName), method.returnType, 'return_value')});"); indent.writeln('return self;'); }); @@ -829,7 +860,8 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped( '${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details) {', '}', () { - _writeObjectNew(indent, _getModule(generatorOptions), responseName); + _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), + responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( 'fl_value_append_take(self->value, fl_value_new_string(code));'); @@ -841,7 +873,8 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeObjectStruct(indent, _getModule(generatorOptions), api.name, () { + _writeObjectStruct( + indent, _getModule(generatorOptions, dartPackageName), api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('const ${className}VTable* vtable;'); indent.writeln('gpointer user_data;'); @@ -855,20 +888,21 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeDefineType(indent, _getModule(generatorOptions), api.name); + _writeDefineType( + indent, _getModule(generatorOptions, dartPackageName), api.name); for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = - _getClassName(_getModule(generatorOptions), responseName); + final String responseClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), responseName); indent.newln(); indent.addScoped( 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { - _writeCastSelf( - indent, _getModule(generatorOptions), api.name, 'user_data'); + _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), + api.name, 'user_data'); indent.newln(); indent.addScoped( @@ -880,7 +914,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List methodArgs = [ for (int i = 0; i < method.parameters.length; i++) _fromFlValue( - _getModule(generatorOptions), + _getModule(generatorOptions, dartPackageName), method.parameters[i].type, 'fl_value_get_list_value(message, $i)'), ]; @@ -916,8 +950,10 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeDispose(indent, _getModule(generatorOptions), api.name, () { - _writeCastSelf(indent, _getModule(generatorOptions), api.name, 'object'); + _writeDispose( + indent, _getModule(generatorOptions, dartPackageName), api.name, () { + _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), + api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); indent.addScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); @@ -932,16 +968,19 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions), api.name, () {}); + _writeInit( + indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); indent.newln(); - _writeClassInit(indent, _getModule(generatorOptions), api.name, () {}); + _writeClassInit( + indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { - _writeObjectNew(indent, _getModule(generatorOptions), api.name); + _writeObjectNew( + indent, _getModule(generatorOptions, dartPackageName), api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); @@ -966,14 +1005,14 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { - final String returnType = - _getType(_getModule(generatorOptions), method.returnType); + final String returnType = _getType( + _getModule(generatorOptions, dartPackageName), method.returnType); final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = - _getClassName(_getModule(generatorOptions), responseName); - final String responseMethodPrefix = - _getMethodPrefix(_getModule(generatorOptions), responseName); + final String responseClassName = _getClassName( + _getModule(generatorOptions, dartPackageName), responseName); + final String responseMethodPrefix = _getMethodPrefix( + _getModule(generatorOptions, dartPackageName), responseName); indent.newln(); final List respondArgs = [ @@ -1021,8 +1060,9 @@ class LinuxSourceGenerator extends StructuredGenerator { } // Returns the module name to use. -String _getModule(LinuxOptions generatorOptions) => - generatorOptions.module ?? 'My'; +String _getModule(LinuxOptions generatorOptions, String dartPackageName) { + return generatorOptions.module ?? _camelCaseFromSnakeCase(dartPackageName); +} // Returns the header guard defintion for [headerFileName]. String _getGuardName(String? headerFileName) { @@ -1037,7 +1077,7 @@ String _getGuardName(String? headerFileName) { // Writes the GObject macro to generate a new type. void _writeDeclareFinalType(Indent indent, String module, String name, {String parentClassName = 'GObject'}) { - final String upperModule = module.toUpperCase(); + final String upperModule = _snakeCaseFromCamelCase(module).toUpperCase(); final String className = _getClassName(module, name); final String snakeClassName = _snakeCaseFromCamelCase(name); final String upperSnakeClassName = snakeClassName.toUpperCase(); @@ -1134,6 +1174,14 @@ String _snakeCaseFromCamelCase(String camelCase) { (Match m) => '${m.start == 0 ? '' : '_'}${m[0]!.toLowerCase()}'); } +// Converts a string from snake_case to CamelCase +String _camelCaseFromSnakeCase(String snakeCase) { + return snakeCase + .split('_') + .map((String v) => v[0].toUpperCase() + v.substring(1)) + .join(); +} + // Returns the GObject class name for [name]. String _getClassName(String module, String name) { return '$module$name'; diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart index da51b26b3b01..3180897901d0 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -2210,7 +2210,7 @@ ${_argParser.usage}'''; linuxHeaderOut: results['linux_header_out'] as String?, linuxSourceOut: results['linux_source_out'] as String?, linuxOptions: LinuxOptions( - module: results['linux_module'] as String? ?? 'My', + module: results['linux_module'] as String?, ), copyrightHeader: results['copyright_header'] as String?, oneLanguage: results['one_language'] as bool?, diff --git a/packages/pigeon/test/linux_generator_test.dart b/packages/pigeon/test/linux_generator_test.dart index e18db12dad95..11b57622479e 100644 --- a/packages/pigeon/test/linux_generator_test.dart +++ b/packages/pigeon/test/linux_generator_test.dart @@ -71,13 +71,15 @@ void main() { expect( code, contains( - 'G_DECLARE_FINAL_TYPE(MyInput, my_input, MY, INPUT, GObject)')); + 'G_DECLARE_FINAL_TYPE(TestPackageInput, test_package_input, TEST_PACKAGE, INPUT, GObject)')); expect( code, contains( - 'G_DECLARE_FINAL_TYPE(MyOutput, my_output, MY, OUTPUT, GObject)')); - expect(code, - contains('G_DECLARE_FINAL_TYPE(MyApi, my_api, MY, API, GObject)')); + 'G_DECLARE_FINAL_TYPE(TestPackageOutput, test_package_output, TEST_PACKAGE, OUTPUT, GObject)')); + expect( + code, + contains( + 'G_DECLARE_FINAL_TYPE(TestPackageApi, test_package_api, TEST_PACKAGE, API, GObject)')); } { final StringBuffer sink = StringBuffer(); @@ -90,9 +92,18 @@ void main() { generator.generate(generatorOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); final String code = sink.toString(); - expect(code, contains('static void my_input_init(MyInput* self) {')); - expect(code, contains('static void my_output_init(MyOutput* self) {')); - expect(code, contains('static void my_api_init(MyApi* self) {')); + expect( + code, + contains( + 'static void test_package_input_init(TestPackageInput* self) {')); + expect( + code, + contains( + 'static void test_package_output_init(TestPackageOutput* self) {')); + expect( + code, + contains( + 'static void test_package_api_init(TestPackageApi* self) {')); } }); @@ -150,11 +161,15 @@ void main() { expect( code, contains( - ' MyApiDoSomethingResponse* (*do_something)(MyApi* object, MyInput* some_input, gpointer user_data);')); - expect(code, - contains('gboolean my_input_get_input_field(MyInput* object);')); - expect(code, - contains('gboolean my_output_get_output_field(MyOutput* object);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* object, TestPackageInput* some_input, gpointer user_data);')); + expect( + code, + contains( + 'gboolean test_package_input_get_input_field(TestPackageInput* object);')); + expect( + code, + contains( + 'gboolean test_package_output_get_output_field(TestPackageOutput* object);')); } { final StringBuffer sink = StringBuffer(); @@ -168,9 +183,13 @@ void main() { dartPackageName: DEFAULT_PACKAGE_NAME); final String code = sink.toString(); expect( - code, contains('gboolean my_input_get_input_field(MyInput* self) {')); - expect(code, - contains('gboolean my_output_get_output_field(MyOutput* self) {')); + code, + contains( + 'gboolean test_package_input_get_input_field(TestPackageInput* self) {')); + expect( + code, + contains( + 'gboolean test_package_output_get_output_field(TestPackageOutput* self) {')); } }); @@ -381,7 +400,10 @@ void main() { ); final String code = sink.toString(); - expect(code, contains('MyNested* my_nested_new(gboolean nested_value);')); + expect( + code, + contains( + 'TestPackageNested* test_package_nested_new(gboolean nested_value);')); } { final StringBuffer sink = StringBuffer(); @@ -400,7 +422,9 @@ void main() { final String code = sink.toString(); expect( - code, contains('MyNested* my_nested_new(gboolean nested_value) {')); + code, + contains( + 'TestPackageNested* test_package_nested_new(gboolean nested_value) {')); } }); @@ -507,27 +531,27 @@ void main() { expect( code, contains( - ' MyApiReturnBoolResponse* (*return_bool)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* object, gpointer user_data);')); expect( code, contains( - ' MyApiReturnIntResponse* (*return_int)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* object, gpointer user_data);')); expect( code, contains( - ' MyApiReturnStringResponse* (*return_string)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* object, gpointer user_data);')); expect( code, contains( - ' MyApiReturnListResponse* (*return_list)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* object, gpointer user_data);')); expect( code, contains( - ' MyApiReturnMapResponse* (*return_map)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* object, gpointer user_data);')); expect( code, contains( - ' MyApiReturnDataClassResponse* (*return_data_class)(MyApi* object, gpointer user_data);')); + ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* object, gpointer user_data);')); } }); @@ -629,7 +653,7 @@ void main() { expect( code, contains( - ' MyApiDoSomethingResponse* (*do_something)(MyApi* object, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, MyParameterObject* an_object, MyObject* a_generic_object, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* object, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); } { final StringBuffer sink = StringBuffer(); @@ -649,7 +673,7 @@ void main() { expect( code, contains( - ' g_autoptr(MyApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(fl_value_get_list_value(message, 0)), fl_value_get_int(fl_value_get_list_value(message, 1)), fl_value_get_string(fl_value_get_list_value(message, 2)), fl_value_get_list_value(message, 3), fl_value_get_list_value(message, 4), MY_PARAMETER_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 5))), MY_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 6))), self->user_data);')); + ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(fl_value_get_list_value(message, 0)), fl_value_get_int(fl_value_get_list_value(message, 1)), fl_value_get_string(fl_value_get_list_value(message, 2)), fl_value_get_list_value(message, 3), fl_value_get_list_value(message, 4), TEST_PACKAGE_PARAMETER_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 5))), TEST_PACKAGE_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 6))), self->user_data);')); } }); diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index 7b6863564e3d..ff943e93e01e 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -120,7 +120,7 @@ Future generateTestPigeons({required String baseDir}) async { linuxSourceOut: skipLanguages.contains(GeneratorLanguage.linux) ? null : '$outputBase/linux/pigeon/$input.gen.cc', - linuxModule: 'My', + linuxModule: '${pascalCaseName}PigeonTest', suppressVersion: true, dartPackageName: 'pigeon_integration_tests', ); From 2779a61c020a2d50e4c4f8e9893eecc5ffa9ff15 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 16:22:47 +1300 Subject: [PATCH 009/127] Fix style of generated code --- packages/pigeon/lib/linux_generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 6e09d663b4ad..2fc7f3e7b0a0 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -1115,7 +1115,7 @@ void _writeDispose(Indent indent, String module, String name, Function func) { final String methodPrefix = _getMethodPrefix(module, name); indent.addScoped( - 'static void ${methodPrefix}_dispose(GObject *object) {', '}', () { + 'static void ${methodPrefix}_dispose(GObject* object) {', '}', () { func(); // ignore: avoid_dynamic_calls indent.writeln( 'G_OBJECT_CLASS(${methodPrefix}_parent_class)->dispose(object);'); From 361867d5bc1981d079c16cd89d95ae673477a64d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 16:26:11 +1300 Subject: [PATCH 010/127] Remove need to lint ignore comment --- packages/pigeon/lib/linux_generator.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 2fc7f3e7b0a0..ca985877d3b4 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -1098,7 +1098,7 @@ void _writeDefineType(Indent indent, String module, String name, // Writes the struct for a GObject. void _writeObjectStruct( - Indent indent, String module, String name, Function func, + Indent indent, String module, String name, void Function() func, {String parentClassName = 'GObject'}) { final String className = _getClassName(module, name); @@ -1106,35 +1106,38 @@ void _writeObjectStruct( indent.writeln('$parentClassName parent_instance;'); indent.newln(); - func(); // ignore: avoid_dynamic_calls + func(); }); } // Writes the dispose method for a GObject. -void _writeDispose(Indent indent, String module, String name, Function func) { +void _writeDispose( + Indent indent, String module, String name, void Function() func) { final String methodPrefix = _getMethodPrefix(module, name); indent.addScoped( 'static void ${methodPrefix}_dispose(GObject* object) {', '}', () { - func(); // ignore: avoid_dynamic_calls + func(); indent.writeln( 'G_OBJECT_CLASS(${methodPrefix}_parent_class)->dispose(object);'); }); } // Writes the init function for a GObject. -void _writeInit(Indent indent, String module, String name, Function func) { +void _writeInit( + Indent indent, String module, String name, void Function() func) { final String className = _getClassName(module, name); final String methodPrefix = _getMethodPrefix(module, name); indent.addScoped('static void ${methodPrefix}_init($className* self) {', '}', () { - func(); // ignore: avoid_dynamic_calls + func(); }); } // Writes the class init function for a GObject. -void _writeClassInit(Indent indent, String module, String name, Function func, +void _writeClassInit( + Indent indent, String module, String name, void Function() func, {bool hasDispose = true}) { final String className = _getClassName(module, name); final String methodPrefix = _getMethodPrefix(module, name); @@ -1146,7 +1149,7 @@ void _writeClassInit(Indent indent, String module, String name, Function func, indent .writeln('G_OBJECT_CLASS(klass)->dispose = ${methodPrefix}_dispose;'); } - func(); // ignore: avoid_dynamic_calls + func(); }); } From 57cad20d932946054bb820bdfa714207ac0d4316 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 16:30:47 +1300 Subject: [PATCH 011/127] Call _getModule less --- packages/pigeon/lib/linux_generator.dart | 282 ++++++++--------------- 1 file changed, 102 insertions(+), 180 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index ca985877d3b4..666317c51235 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -152,8 +152,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { Enum anEnum, { required String dartPackageName, }) { - final String enumName = _getClassName( - _getModule(generatorOptions, dartPackageName), anEnum.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String enumName = _getClassName(module, anEnum.name); indent.newln(); addDocumentationComments( @@ -161,10 +161,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.addScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; - final String itemName = _getEnumValue( - _getModule(generatorOptions, dartPackageName), - anEnum.name, - member.name); + final String itemName = _getEnumValue(module, anEnum.name, member.name); addDocumentationComments( indent, member.documentationComments, _docCommentSpec); indent.writeln( @@ -181,24 +178,21 @@ class LinuxHeaderGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - final String className = _getClassName( - _getModule(generatorOptions, dartPackageName), classDefinition.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String className = _getClassName(module, classDefinition.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), classDefinition.name); + final String methodPrefix = _getMethodPrefix(module, classDefinition.name); indent.newln(); addDocumentationComments( indent, classDefinition.documentationComments, _docCommentSpec); - _writeDeclareFinalType(indent, - _getModule(generatorOptions, dartPackageName), classDefinition.name); + _writeDeclareFinalType(indent, module, classDefinition.name); indent.newln(); final List constructorArgs = []; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String type = - _getType(_getModule(generatorOptions, dartPackageName), field.type); + final String type = _getType(module, field.type); constructorArgs.add('$type $fieldName'); } indent.writeln( @@ -206,8 +200,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String returnType = - _getType(_getModule(generatorOptions, dartPackageName), field.type); + final String returnType = _getType(module, field.type); indent.newln(); addDocumentationComments( @@ -225,17 +218,15 @@ class LinuxHeaderGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = - _getClassName(_getModule(generatorOptions, dartPackageName), api.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String className = _getClassName(module, api.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), api.name); + final String methodPrefix = _getMethodPrefix(module, api.name); indent.newln(); addDocumentationComments( indent, api.documentationComments, _docCommentSpec); - _writeDeclareFinalType( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeDeclareFinalType(indent, module, api.name); indent.newln(); indent.writeln( @@ -247,7 +238,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(_getModule(generatorOptions, dartPackageName), param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data' @@ -258,9 +249,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.writeln( "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); - final String returnType = _getType( - _getModule(generatorOptions, dartPackageName), method.returnType, - isOutput: true); + final String returnType = + _getType(module, method.returnType, isOutput: true); final List finishArgs = [ '$className* object', 'GAsyncResult* result', @@ -281,25 +271,21 @@ class LinuxHeaderGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = - _getClassName(_getModule(generatorOptions, dartPackageName), api.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), api.name); - final String vtableName = - _getVTableName(_getModule(generatorOptions, dartPackageName), api.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String className = _getClassName(module, api.name); + final String methodPrefix = _getMethodPrefix(module, api.name); + final String vtableName = _getVTableName(module, api.name); for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { - _writeApiRespondClass( - indent, _getModule(generatorOptions, dartPackageName), api, method); + _writeApiRespondClass(indent, module, api, method); } indent.newln(); - _writeDeclareFinalType( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeDeclareFinalType(indent, module, api.name); indent.newln(); - _writeApiVTable(indent, _getModule(generatorOptions, dartPackageName), api); + _writeApiVTable(indent, module, api); indent.newln(); indent.writeln( @@ -307,8 +293,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { - _writeApiRespondFunctionPrototype( - indent, _getModule(generatorOptions, dartPackageName), api, method); + _writeApiRespondFunctionPrototype(indent, module, api, method); } } @@ -441,47 +426,36 @@ class LinuxSourceGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - final String snakeModule = - _snakeCaseFromCamelCase(_getModule(generatorOptions, dartPackageName)); - final String className = _getClassName( - _getModule(generatorOptions, dartPackageName), classDefinition.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String snakeModule = _snakeCaseFromCamelCase(module); + final String className = _getClassName(module, classDefinition.name); final String snakeClassName = _snakeCaseFromCamelCase(classDefinition.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), classDefinition.name); + final String methodPrefix = _getMethodPrefix(module, classDefinition.name); final String testMacro = '${snakeModule}_IS_$snakeClassName'.toUpperCase(); indent.newln(); - _writeObjectStruct(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name, () { + _writeObjectStruct(indent, module, classDefinition.name, () { indent.newln(); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String fieldType = _getType( - _getModule(generatorOptions, dartPackageName), field.type, - isOutput: true); + final String fieldType = _getType(module, field.type, isOutput: true); indent.writeln('$fieldType $fieldName;'); } }); indent.newln(); - _writeDefineType(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name); + _writeDefineType(indent, module, classDefinition.name); indent.newln(); - _writeDispose(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name, () { + _writeDispose(indent, module, classDefinition.name, () { bool haveSelf = false; for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String? clear = _getClearFunction(field.type, 'self->$fieldName'); if (clear != null) { if (!haveSelf) { - _writeCastSelf( - indent, - _getModule(generatorOptions, dartPackageName), - classDefinition.name, - 'object'); + _writeCastSelf(indent, module, classDefinition.name, 'object'); haveSelf = true; } indent.writeln('$clear;'); @@ -490,23 +464,20 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name, () {}); + _writeInit(indent, module, classDefinition.name, () {}); indent.newln(); - _writeClassInit(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name, () {}); + _writeClassInit(indent, module, classDefinition.name, () {}); final List constructorArgs = [ for (final NamedType field in classDefinition.fields) - '${_getType(_getModule(generatorOptions, dartPackageName), field.type)} ${_snakeCaseFromCamelCase(field.name)}', + '${_getType(module, field.type)} ${_snakeCaseFromCamelCase(field.name)}', ]; indent.newln(); indent.addScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', () { - _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), - classDefinition.name); + _writeObjectNew(indent, module, classDefinition.name); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); final String value = _referenceValue(field.type, fieldName); @@ -518,15 +489,14 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String returnType = - _getType(_getModule(generatorOptions, dartPackageName), field.type); + final String returnType = _getType(module, field.type); indent.newln(); indent.addScoped( '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', () { indent.writeln( - 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(_getModule(generatorOptions, dartPackageName), field.type)});'); + 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(module, field.type)});'); indent.writeln('return self->$fieldName;'); }); } @@ -538,7 +508,7 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); indent.writeln( - 'fl_value_append_take(values, ${_makeFlValue(_getModule(generatorOptions, dartPackageName), field.type, 'self->$fieldName')});'); + 'fl_value_append_take(values, ${_makeFlValue(module, field.type, 'self->$fieldName')});'); } indent.writeln('return values;'); }); @@ -550,8 +520,8 @@ class LinuxSourceGenerator extends StructuredGenerator { final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; - args.add(_fromFlValue(_getModule(generatorOptions, dartPackageName), - field.type, 'fl_value_get_list_value(values, $i)')); + args.add(_fromFlValue( + module, field.type, 'fl_value_get_list_value(values, $i)')); } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); }); @@ -565,44 +535,36 @@ class LinuxSourceGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = - _getClassName(_getModule(generatorOptions, dartPackageName), api.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String className = _getClassName(module, api.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), api.name); + final String methodPrefix = _getMethodPrefix(module, api.name); indent.newln(); - _writeObjectStruct( - indent, _getModule(generatorOptions, dartPackageName), api.name, () { + _writeObjectStruct(indent, module, api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); }); indent.newln(); - _writeDefineType( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeDefineType(indent, module, api.name); indent.newln(); - _writeDispose( - indent, _getModule(generatorOptions, dartPackageName), api.name, () { - _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), - api.name, 'object'); + _writeDispose(indent, module, api.name, () { + _writeCastSelf(indent, module, api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); }); indent.newln(); - _writeInit( - indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); + _writeInit(indent, module, api.name, () {}); indent.newln(); - _writeClassInit( - indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); + _writeClassInit(indent, module, api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { - _writeObjectNew( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeObjectNew(indent, module, api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('return self;'); }); @@ -613,7 +575,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List asyncArgs = [ '$className* object', for (final Parameter param in method.parameters) - '${_getType(_getModule(generatorOptions, dartPackageName), param.type)} ${_snakeCaseFromCamelCase(param.name)}', + '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data', @@ -624,9 +586,8 @@ class LinuxSourceGenerator extends StructuredGenerator { '}', () {}); - final String returnType = _getType( - _getModule(generatorOptions, dartPackageName), method.returnType, - isOutput: true); + final String returnType = + _getType(module, method.returnType, isOutput: true); final List finishArgs = [ '$className* object', 'GAsyncResult* result', @@ -650,37 +611,30 @@ class LinuxSourceGenerator extends StructuredGenerator { Api api, { required String dartPackageName, }) { - final String className = - _getClassName(_getModule(generatorOptions, dartPackageName), api.name); + final String module = _getModule(generatorOptions, dartPackageName); + final String className = _getClassName(module, api.name); - final String methodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), api.name); - final String vtableName = - _getVTableName(_getModule(generatorOptions, dartPackageName), api.name); + final String methodPrefix = _getMethodPrefix(module, api.name); + final String vtableName = _getVTableName(module, api.name); final String codecName = '${api.name}Codec'; - final String codecClassName = - _getClassName(_getModule(generatorOptions, dartPackageName), codecName); + final String codecClassName = _getClassName(module, codecName); final String codecMethodPrefix = '${methodPrefix}_codec'; indent.newln(); - _writeDeclareFinalType( - indent, _getModule(generatorOptions, dartPackageName), codecName, + _writeDeclareFinalType(indent, module, codecName, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeObjectStruct( - indent, _getModule(generatorOptions, dartPackageName), codecName, () {}, + _writeObjectStruct(indent, module, codecName, () {}, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeDefineType( - indent, _getModule(generatorOptions, dartPackageName), codecName, + _writeDefineType(indent, module, codecName, parentType: 'fl_standard_message_codec_get_type()'); for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), customClass.name); + final String customClassName = _getClassName(module, customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -707,14 +661,12 @@ class LinuxSourceGenerator extends StructuredGenerator { in getCodecClasses(api, root)) { indent.writeln('case ${customClass.enumeration}:'); indent.nest(1, () { - final String customClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), - customClass.name); + final String customClassName = + _getClassName(module, customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); - final String castMacro = _getClassCastMacro( - _getModule(generatorOptions, dartPackageName), - customClass.name); + final String castMacro = + _getClassCastMacro(module, customClass.name); indent.writeln( 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); }); @@ -728,8 +680,7 @@ class LinuxSourceGenerator extends StructuredGenerator { }); for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), customClass.name); + final String customClassName = _getClassName(module, customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); @@ -761,8 +712,8 @@ class LinuxSourceGenerator extends StructuredGenerator { '}', () { indent.addScoped('switch (type) {', '}', () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), customClass.name); + final String customClassName = + _getClassName(module, customClass.name); final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.writeln('case ${customClass.enumeration}:'); @@ -781,12 +732,10 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions, dartPackageName), codecName, - () {}); + _writeInit(indent, module, codecName, () {}); indent.newln(); - _writeClassInit( - indent, _getModule(generatorOptions, dartPackageName), codecName, () { + _writeClassInit(indent, module, codecName, () { indent.writeln( 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); indent.writeln( @@ -796,63 +745,50 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); indent.addScoped( 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { - _writeObjectNew( - indent, _getModule(generatorOptions, dartPackageName), codecName); + _writeObjectNew(indent, module, codecName); indent.writeln('return self;'); }); for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), responseName); - final String responseMethodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), responseName); + final String responseClassName = _getClassName(module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(module, responseName); if (method.isAsynchronous) { indent.newln(); - _writeDeclareFinalType(indent, - _getModule(generatorOptions, dartPackageName), responseName); + _writeDeclareFinalType(indent, module, responseName); } indent.newln(); - _writeObjectStruct( - indent, _getModule(generatorOptions, dartPackageName), responseName, - () { + _writeObjectStruct(indent, module, responseName, () { indent.writeln('FlValue* value;'); }); indent.newln(); - _writeDefineType( - indent, _getModule(generatorOptions, dartPackageName), responseName); + _writeDefineType(indent, module, responseName); indent.newln(); - _writeDispose( - indent, _getModule(generatorOptions, dartPackageName), responseName, - () { - _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), - responseName, 'object'); + _writeDispose(indent, module, responseName, () { + _writeCastSelf(indent, module, responseName, 'object'); indent.writeln('g_clear_pointer(&self->value, fl_value_unref);'); }); indent.newln(); - _writeInit(indent, _getModule(generatorOptions, dartPackageName), - responseName, () {}); + _writeInit(indent, module, responseName, () {}); indent.newln(); - _writeClassInit(indent, _getModule(generatorOptions, dartPackageName), - responseName, () {}); + _writeClassInit(indent, module, responseName, () {}); - final String returnType = _getType( - _getModule(generatorOptions, dartPackageName), method.returnType); + final String returnType = _getType(module, method.returnType); indent.newln(); indent.addScoped( "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", '}', () { - _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), - responseName); + _writeObjectNew(indent, module, responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( - "fl_value_append_take(self->value, ${_makeFlValue(_getModule(generatorOptions, dartPackageName), method.returnType, 'return_value')});"); + "fl_value_append_take(self->value, ${_makeFlValue(module, method.returnType, 'return_value')});"); indent.writeln('return self;'); }); @@ -860,8 +796,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped( '${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details) {', '}', () { - _writeObjectNew(indent, _getModule(generatorOptions, dartPackageName), - responseName); + _writeObjectNew(indent, module, responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( 'fl_value_append_take(self->value, fl_value_new_string(code));'); @@ -873,8 +808,7 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeObjectStruct( - indent, _getModule(generatorOptions, dartPackageName), api.name, () { + _writeObjectStruct(indent, module, api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('const ${className}VTable* vtable;'); indent.writeln('gpointer user_data;'); @@ -888,21 +822,18 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeDefineType( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeDefineType(indent, module, api.name); for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), responseName); + final String responseClassName = _getClassName(module, responseName); indent.newln(); indent.addScoped( 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { - _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), - api.name, 'user_data'); + _writeCastSelf(indent, module, api.name, 'user_data'); indent.newln(); indent.addScoped( @@ -913,9 +844,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final List methodArgs = [ for (int i = 0; i < method.parameters.length; i++) - _fromFlValue( - _getModule(generatorOptions, dartPackageName), - method.parameters[i].type, + _fromFlValue(module, method.parameters[i].type, 'fl_value_get_list_value(message, $i)'), ]; @@ -950,10 +879,8 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeDispose( - indent, _getModule(generatorOptions, dartPackageName), api.name, () { - _writeCastSelf(indent, _getModule(generatorOptions, dartPackageName), - api.name, 'object'); + _writeDispose(indent, module, api.name, () { + _writeCastSelf(indent, module, api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); indent.addScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); @@ -968,19 +895,16 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - _writeInit( - indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); + _writeInit(indent, module, api.name, () {}); indent.newln(); - _writeClassInit( - indent, _getModule(generatorOptions, dartPackageName), api.name, () {}); + _writeClassInit(indent, module, api.name, () {}); indent.newln(); indent.addScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { - _writeObjectNew( - indent, _getModule(generatorOptions, dartPackageName), api.name); + _writeObjectNew(indent, module, api.name); indent.writeln('self->messenger = g_object_ref(messenger);'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); @@ -1005,14 +929,12 @@ class LinuxSourceGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { - final String returnType = _getType( - _getModule(generatorOptions, dartPackageName), method.returnType); + final String returnType = _getType(module, method.returnType); final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); - final String responseClassName = _getClassName( - _getModule(generatorOptions, dartPackageName), responseName); - final String responseMethodPrefix = _getMethodPrefix( - _getModule(generatorOptions, dartPackageName), responseName); + final String responseClassName = _getClassName(module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(module, responseName); indent.newln(); final List respondArgs = [ From c80d864651daa297d1a4769b6807c09260306c61 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 21 Mar 2024 16:42:09 +1300 Subject: [PATCH 012/127] Use self for instance name --- .../pigeon/example/app/linux/messages.g.cc | 4 ++-- .../pigeon/example/app/linux/messages.g.h | 20 +++++++++---------- packages/pigeon/lib/linux_generator.dart | 12 +++++------ .../pigeon/test/linux_generator_test.dart | 20 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index c88f9e6fda78..6bad3144b789 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -600,12 +600,12 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { } void pigeon_example_package_message_flutter_api_flutter_method_async( - PigeonExamplePackageMessageFlutterApi* object, const gchar* a_string, + PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) {} gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( - PigeonExamplePackageMessageFlutterApi* object, GAsyncResult* result, + PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, gchar** return_value, GError** error) { return TRUE; } diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 3ebb853c5416..2c14d8e3ea81 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -22,19 +22,19 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageData, PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( const gchar* name, const gchar* description, PigeonExamplePackageCode code, - FlValue* data); + FlValue* self); const gchar* pigeon_example_package_message_data_get_name( - PigeonExamplePackageMessageData* object); + PigeonExamplePackageMessageData* self); const gchar* pigeon_example_package_message_data_get_description( - PigeonExamplePackageMessageData* object); + PigeonExamplePackageMessageData* self); PigeonExamplePackageCode pigeon_example_package_message_data_get_code( - PigeonExamplePackageMessageData* object); + PigeonExamplePackageMessageData* self); FlValue* pigeon_example_package_message_data_get_data( - PigeonExamplePackageMessageData* object); + PigeonExamplePackageMessageData* self); G_DECLARE_FINAL_TYPE( PigeonExamplePackageExampleHostApiGetHostLanguageResponse, @@ -68,12 +68,12 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, typedef struct { PigeonExamplePackageExampleHostApiGetHostLanguageResponse* ( - *get_host_language)(PigeonExamplePackageExampleHostApi* object, + *get_host_language)(PigeonExamplePackageExampleHostApi* self, gpointer user_data); PigeonExamplePackageExampleHostApiAddResponse* (*add)( - PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, + PigeonExamplePackageExampleHostApi* self, int64_t a, int64_t b, gpointer user_data); - void (*send_message)(PigeonExamplePackageExampleHostApi* object, + void (*send_message)(PigeonExamplePackageExampleHostApi* self, PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); @@ -102,12 +102,12 @@ PigeonExamplePackageMessageFlutterApi* pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger); void pigeon_example_package_message_flutter_api_flutter_method_async( - PigeonExamplePackageMessageFlutterApi* object, const gchar* a_string, + PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( - PigeonExamplePackageMessageFlutterApi* object, GAsyncResult* result, + PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, gchar** return_value, GError** error); G_END_DECLS diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 666317c51235..83cdada86aa5 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -206,7 +206,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { addDocumentationComments( indent, field.documentationComments, _docCommentSpec); indent.writeln( - '$returnType ${methodPrefix}_get_$fieldName($className* object);'); + '$returnType ${methodPrefix}_get_$fieldName($className* self);'); } } @@ -236,7 +236,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final String methodName = _snakeCaseFromCamelCase(method.name); final List asyncArgs = [ - '$className* object', + '$className* self', for (final Parameter param in method.parameters) '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', @@ -252,7 +252,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType, isOutput: true); final List finishArgs = [ - '$className* object', + '$className* self', 'GAsyncResult* result', if (returnType != 'void') '$returnType* return_value', 'GError** error' @@ -329,7 +329,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final String responseClassName = _getClassName(module, responseName); final List methodArgs = [ - '$className* object', + '$className* self', for (final Parameter param in method.parameters) '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', if (method.isAsynchronous) @@ -573,7 +573,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String methodName = _snakeCaseFromCamelCase(method.name); final List asyncArgs = [ - '$className* object', + '$className* self', for (final Parameter param in method.parameters) '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', 'GCancellable* cancellable', @@ -589,7 +589,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType, isOutput: true); final List finishArgs = [ - '$className* object', + '$className* self', 'GAsyncResult* result', if (returnType != 'void') '$returnType* return_value', 'GError** error', diff --git a/packages/pigeon/test/linux_generator_test.dart b/packages/pigeon/test/linux_generator_test.dart index 11b57622479e..e7ab5c0e629d 100644 --- a/packages/pigeon/test/linux_generator_test.dart +++ b/packages/pigeon/test/linux_generator_test.dart @@ -161,15 +161,15 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* object, TestPackageInput* some_input, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* self, TestPackageInput* some_input, gpointer user_data);')); expect( code, contains( - 'gboolean test_package_input_get_input_field(TestPackageInput* object);')); + 'gboolean test_package_input_get_input_field(TestPackageInput* self);')); expect( code, contains( - 'gboolean test_package_output_get_output_field(TestPackageOutput* object);')); + 'gboolean test_package_output_get_output_field(TestPackageOutput* self);')); } { final StringBuffer sink = StringBuffer(); @@ -531,27 +531,27 @@ void main() { expect( code, contains( - ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* self, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* self, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* self, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* self, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* self, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* object, gpointer user_data);')); + ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* self, gpointer user_data);')); } }); @@ -653,7 +653,7 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* object, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* self, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); } { final StringBuffer sink = StringBuffer(); From c55e3aaf9928457801c1b8c244d9b4c3d256db03 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 11:01:37 +1300 Subject: [PATCH 013/127] no longer generating checks --- .../pigeon/example/app/linux/messages.g.cc | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 6bad3144b789..6d8870125319 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -390,10 +390,6 @@ static void get_host_language_cb( return; } - if (fl_value_get_type(message) != FL_VALUE_TYPE_NULL) { - return; - } - g_autoptr(PigeonExamplePackageExampleHostApiGetHostLanguageResponse) response = self->vtable->get_host_language(self, self->user_data); if (response == nullptr) { @@ -419,15 +415,6 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, return; } - if (fl_value_get_type(message) != FL_VALUE_TYPE_LIST || - fl_value_get_length(message) != 2 || - fl_value_get_type(fl_value_get_list_value(message, 0)) != - FL_VALUE_TYPE_INT || - fl_value_get_type(fl_value_get_list_value(message, 1)) != - FL_VALUE_TYPE_INT) { - return; - } - g_autoptr(PigeonExamplePackageExampleHostApiAddResponse) response = self->vtable->add(self, fl_value_get_int(fl_value_get_list_value(message, 0)), @@ -456,13 +443,6 @@ static void send_message_cb( return; } - if (fl_value_get_type(message) != FL_VALUE_TYPE_LIST || - fl_value_get_length(message) != 1 || - fl_value_get_type(fl_value_get_list_value(message, 0)) != - FL_VALUE_TYPE_CUSTOM) { - return; - } - self->vtable->send_message( self, PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA(fl_value_get_custom_value_object( From 2224622ae636a7847edfe8f22b9b36a0fac583c9 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 11:13:52 +1300 Subject: [PATCH 014/127] Fix enum generated code --- packages/pigeon/lib/linux_generator.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 83cdada86aa5..6e812e409061 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -161,7 +161,8 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.addScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; - final String itemName = _getEnumValue(module, anEnum.name, member.name); + final String itemName = + _getEnumValue(dartPackageName, anEnum.name, member.name); addDocumentationComments( indent, member.documentationComments, _docCommentSpec); indent.writeln( From 32a75d12c68033d353d423178595704b281cceee Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 10:57:22 +1300 Subject: [PATCH 015/127] Generate missing Flutter API implementation --- .../pigeon/example/app/linux/messages.g.cc | 28 +++++++++-- .../pigeon/example/app/linux/messages.g.h | 4 +- packages/pigeon/lib/linux_generator.dart | 47 ++++++++++++++++--- 3 files changed, 65 insertions(+), 14 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 6d8870125319..65099fffd20c 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -546,7 +546,7 @@ void pigeon_example_package_example_host_api_respond_error_send_message( struct _PigeonExamplePackageMessageFlutterApi { GObject parent_instance; - FlBinaryMessenger* messenger; + FlMethodChannel* channel; }; G_DEFINE_TYPE(PigeonExamplePackageMessageFlutterApi, @@ -556,7 +556,7 @@ static void pigeon_example_package_message_flutter_api_dispose( GObject* object) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object); - g_clear_object(&self->messenger); + g_clear_object(&self->channel); G_OBJECT_CLASS(pigeon_example_package_message_flutter_api_parent_class) ->dispose(object); } @@ -575,17 +575,35 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); - self->messenger = g_object_ref(messenger); + self->channel = fl_method_channel_new(messenger, "MessageFlutterApi", codec); return self; } -void pigeon_example_package_message_flutter_api_flutter_method_async( +void pigeon_example_package_message_flutter_api_flutter_method( PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, - gpointer user_data) {} + gpointer user_data) { + g_autoptr(FlValue) args = + fl_value_new_array_take(fl_value_new_string(a_string), nullptr); + fl_method_channel_invoke_method(self->channel, "flutterMethod", args, + cancellable, callback, user_data); +} gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, gchar** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_strdup(fl_value_get_string(r)); + return TRUE; } diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 2c14d8e3ea81..879a3d6a4ffa 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -22,7 +22,7 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageData, PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( const gchar* name, const gchar* description, PigeonExamplePackageCode code, - FlValue* self); + FlValue* data); const gchar* pigeon_example_package_message_data_get_name( PigeonExamplePackageMessageData* self); @@ -101,7 +101,7 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageFlutterApi, PigeonExamplePackageMessageFlutterApi* pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger); -void pigeon_example_package_message_flutter_api_flutter_method_async( +void pigeon_example_package_message_flutter_api_flutter_method( PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 6e812e409061..91330ed6bba8 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -248,7 +248,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { addDocumentationComments( indent, method.documentationComments, _docCommentSpec); indent.writeln( - "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')});"); + "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')});"); final String returnType = _getType(module, method.returnType, isOutput: true); @@ -543,7 +543,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); _writeObjectStruct(indent, module, api.name, () { - indent.writeln('FlBinaryMessenger* messenger;'); + indent.writeln('FlMethodChannel* channel;'); }); indent.newln(); @@ -552,7 +552,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); - indent.writeln('g_clear_object(&self->messenger);'); + indent.writeln('g_clear_object(&self->channel);'); }); indent.newln(); @@ -566,7 +566,8 @@ class LinuxSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { _writeObjectNew(indent, module, api.name); - indent.writeln('self->messenger = g_object_ref(messenger);'); + indent.writeln( + 'self->channel = fl_method_channel_new(messenger, "${api.name}", codec);'); indent.writeln('return self;'); }); @@ -583,9 +584,19 @@ class LinuxSourceGenerator extends StructuredGenerator { ]; indent.newln(); indent.addScoped( - "void ${methodPrefix}_${methodName}_async(${asyncArgs.join(', ')}) {", - '}', - () {}); + "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')}) {", '}', + () { + final List valueArgs = [ + for (final Parameter param in method.parameters) + _makeFlValue( + module, param.type, _snakeCaseFromCamelCase(param.name)), + 'nullptr' + ]; + indent.writeln( + 'g_autoptr(FlValue) args = fl_value_new_array_take(${valueArgs.join(', ')});'); + indent.writeln( + 'fl_method_channel_invoke_method(self->channel, "${method.name}", args, cancellable, callback, user_data);'); + }); final String returnType = _getType(module, method.returnType, isOutput: true); @@ -599,6 +610,28 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.addScoped( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", '}', () { + indent.writeln( + 'g_autoptr(FlMethodResponse) response = fl_method_channel_invoke_method_finish(self->channel, result, error);'); + indent.addScoped('if (response == nullptr) {', '}', () { + indent.writeln('return FALSE;'); + }); + + indent.newln(); + indent.writeln( + 'g_autoptr(FlValue) r = fl_method_response_get_result(response, error);'); + indent.addScoped('if (r == nullptr) {', '}', () { + indent.writeln('return FALSE;'); + }); + + if (returnType != 'void') { + indent.newln(); + final String returnValue = + _fromFlValue(module, method.returnType, 'r'); + indent.writeln( + '*return_value = ${_referenceValue(method.returnType, returnValue)};'); + } + + indent.newln(); indent.writeln('return TRUE;'); }); } From 68dc918663782d8254cd82ca110d46df25822eb9 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 11:21:14 +1300 Subject: [PATCH 016/127] Change from Indent.addScoped to Indent.writeScoped --- packages/pigeon/lib/linux_generator.dart | 77 ++++++++++++------------ 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 91330ed6bba8..b3714944fc2d 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -158,7 +158,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { indent.newln(); addDocumentationComments( indent, anEnum.documentationComments, _docCommentSpec); - indent.addScoped('typedef enum {', '} $enumName;', () { + indent.writeScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; final String itemName = @@ -323,7 +323,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { final String className = _getClassName(module, api.name); final String vtableName = _getVTableName(module, api.name); - indent.addScoped('typedef struct {', '} $vtableName;', () { + indent.writeScoped('typedef struct {', '} $vtableName;', () { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String responseName = _getResponseName(api.name, method.name); @@ -475,7 +475,7 @@ class LinuxSourceGenerator extends StructuredGenerator { '${_getType(module, field.type)} ${_snakeCaseFromCamelCase(field.name)}', ]; indent.newln(); - indent.addScoped( + indent.writeScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', () { _writeObjectNew(indent, module, classDefinition.name); @@ -493,7 +493,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, field.type); indent.newln(); - indent.addScoped( + indent.writeScoped( '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', () { indent.writeln( @@ -503,7 +503,7 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - indent.addScoped( + indent.writeScoped( 'static FlValue* ${methodPrefix}_to_list($className* self) {', '}', () { indent.writeln('FlValue* values = fl_value_new_list();'); for (final NamedType field in classDefinition.fields) { @@ -515,7 +515,7 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - indent.addScoped( + indent.writeScoped( 'static $className* ${methodPrefix}_new_from_list(FlValue* values) {', '}', () { final List args = []; @@ -562,7 +562,7 @@ class LinuxSourceGenerator extends StructuredGenerator { _writeClassInit(indent, module, api.name, () {}); indent.newln(); - indent.addScoped( + indent.writeScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { _writeObjectNew(indent, module, api.name); @@ -583,7 +583,7 @@ class LinuxSourceGenerator extends StructuredGenerator { 'gpointer user_data', ]; indent.newln(); - indent.addScoped( + indent.writeScoped( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')}) {", '}', () { final List valueArgs = [ @@ -607,19 +607,19 @@ class LinuxSourceGenerator extends StructuredGenerator { 'GError** error', ]; indent.newln(); - indent.addScoped( + indent.writeScoped( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", '}', () { indent.writeln( 'g_autoptr(FlMethodResponse) response = fl_method_channel_invoke_method_finish(self->channel, result, error);'); - indent.addScoped('if (response == nullptr) {', '}', () { + indent.writeScoped('if (response == nullptr) {', '}', () { indent.writeln('return FALSE;'); }); indent.newln(); indent.writeln( 'g_autoptr(FlValue) r = fl_method_response_get_result(response, error);'); - indent.addScoped('if (r == nullptr) {', '}', () { + indent.writeScoped('if (r == nullptr) {', '}', () { indent.writeln('return FALSE;'); }); @@ -672,7 +672,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); - indent.addScoped( + indent.writeScoped( 'static gboolean write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', '}', () { indent.writeln('uint8_t type = ${customClass.enumeration};'); @@ -685,12 +685,13 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - indent.addScoped( + indent.writeScoped( 'static gboolean ${methodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', '}', () { - indent.addScoped( + indent.writeScoped( 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { - indent.addScoped('switch (fl_value_get_custom_type(value)) {', '}', () { + indent.writeScoped('switch (fl_value_get_custom_type(value)) {', '}', + () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { indent.writeln('case ${customClass.enumeration}:'); @@ -718,18 +719,18 @@ class LinuxSourceGenerator extends StructuredGenerator { final String snakeCustomClassName = _snakeCaseFromCamelCase(customClassName); indent.newln(); - indent.addScoped( + indent.writeScoped( 'static FlValue* read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', '}', () { indent.writeln( 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); - indent.addScoped('if (values == nullptr) {', '}', () { + indent.writeScoped('if (values == nullptr) {', '}', () { indent.writeln('return nullptr;'); }); indent.newln(); indent.writeln( 'g_autoptr($customClassName) value = ${snakeCustomClassName}_new_from_list(values);'); - indent.addScoped('if (value == nullptr) {', '}', () { + indent.writeScoped('if (value == nullptr) {', '}', () { indent.writeln( 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); indent.writeln('return nullptr;'); @@ -741,10 +742,10 @@ class LinuxSourceGenerator extends StructuredGenerator { } indent.newln(); - indent.addScoped( + indent.writeScoped( 'static FlValue* ${methodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', '}', () { - indent.addScoped('switch (type) {', '}', () { + indent.writeScoped('switch (type) {', '}', () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { final String customClassName = _getClassName(module, customClass.name); @@ -777,7 +778,7 @@ class LinuxSourceGenerator extends StructuredGenerator { }, hasDispose: false); indent.newln(); - indent.addScoped( + indent.writeScoped( 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { _writeObjectNew(indent, module, codecName); indent.writeln('return self;'); @@ -816,7 +817,7 @@ class LinuxSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); - indent.addScoped( + indent.writeScoped( "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", '}', () { _writeObjectNew(indent, module, responseName); @@ -827,7 +828,7 @@ class LinuxSourceGenerator extends StructuredGenerator { }); indent.newln(); - indent.addScoped( + indent.writeScoped( '${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details) {', '}', () { _writeObjectNew(indent, module, responseName); @@ -864,13 +865,13 @@ class LinuxSourceGenerator extends StructuredGenerator { final String responseClassName = _getClassName(module, responseName); indent.newln(); - indent.addScoped( + indent.writeScoped( 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { _writeCastSelf(indent, module, api.name, 'user_data'); indent.newln(); - indent.addScoped( + indent.writeScoped( 'if (self->vtable == nullptr || self->vtable->$methodName == nullptr) {', '}', () { indent.writeln('return;'); @@ -894,7 +895,7 @@ class LinuxSourceGenerator extends StructuredGenerator { vfuncArgs.add('self->user_data'); indent.writeln( "g_autoptr($responseClassName) response = self->vtable->$methodName(${vfuncArgs.join(', ')});"); - indent.addScoped('if (response == nullptr) {', '}', () { + indent.writeScoped('if (response == nullptr) {', '}', () { indent.writeln( 'g_warning("No response returned to ${api.name}.${method.name}");'); indent.writeln('return;'); @@ -902,7 +903,7 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeln('g_autoptr(GError) error = NULL;'); - indent.addScoped( + indent.writeScoped( 'if (!fl_basic_message_channel_respond(channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( @@ -916,7 +917,7 @@ class LinuxSourceGenerator extends StructuredGenerator { _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); - indent.addScoped('if (self->user_data != nullptr) {', '}', () { + indent.writeScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); }); indent.writeln('self->user_data = nullptr;'); @@ -935,7 +936,7 @@ class LinuxSourceGenerator extends StructuredGenerator { _writeClassInit(indent, module, api.name, () {}); indent.newln(); - indent.addScoped( + indent.writeScoped( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { _writeObjectNew(indent, module, api.name); @@ -976,13 +977,13 @@ class LinuxSourceGenerator extends StructuredGenerator { 'FlBasicMessageChannelResponseHandle* response_handle', '$returnType return_value' ]; - indent.addScoped( + indent.writeScoped( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')}) {", '}', () { indent.writeln( 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(return_value);'); indent.writeln('g_autoptr(GError) error = nullptr;'); - indent.addScoped( + indent.writeScoped( 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( @@ -998,13 +999,13 @@ class LinuxSourceGenerator extends StructuredGenerator { 'const gchar* message', 'FlValue* details' ]; - indent.addScoped( + indent.writeScoped( "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')}) {", '}', () { indent.writeln( 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new_error(code, message, details);'); indent.writeln('g_autoptr(GError) error = nullptr;'); - indent.addScoped( + indent.writeScoped( 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( @@ -1058,7 +1059,7 @@ void _writeObjectStruct( {String parentClassName = 'GObject'}) { final String className = _getClassName(module, name); - indent.addScoped('struct _$className {', '};', () { + indent.writeScoped('struct _$className {', '};', () { indent.writeln('$parentClassName parent_instance;'); indent.newln(); @@ -1071,7 +1072,7 @@ void _writeDispose( Indent indent, String module, String name, void Function() func) { final String methodPrefix = _getMethodPrefix(module, name); - indent.addScoped( + indent.writeScoped( 'static void ${methodPrefix}_dispose(GObject* object) {', '}', () { func(); indent.writeln( @@ -1085,8 +1086,8 @@ void _writeInit( final String className = _getClassName(module, name); final String methodPrefix = _getMethodPrefix(module, name); - indent.addScoped('static void ${methodPrefix}_init($className* self) {', '}', - () { + indent.writeScoped( + 'static void ${methodPrefix}_init($className* self) {', '}', () { func(); }); } @@ -1098,7 +1099,7 @@ void _writeClassInit( final String className = _getClassName(module, name); final String methodPrefix = _getMethodPrefix(module, name); - indent.addScoped( + indent.writeScoped( 'static void ${methodPrefix}_class_init(${className}Class* klass) {', '}', () { if (hasDispose) { From d93af346caf147285bc65077317b3785e35a0ad7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 11:34:07 +1300 Subject: [PATCH 017/127] Fix example compiling --- .../pigeon/example/app/linux/messages.g.cc | 8 +++-- .../example/app/linux/my_application.cc | 29 ++++++++++--------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 65099fffd20c..bbf89e375dcb 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -575,7 +575,9 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); - self->channel = fl_method_channel_new(messenger, "MessageFlutterApi", codec); + g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); + self->channel = fl_method_channel_new(messenger, "MessageFlutterApi", + FL_METHOD_CODEC(codec)); return self; } @@ -583,8 +585,8 @@ void pigeon_example_package_message_flutter_api_flutter_method( PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { - g_autoptr(FlValue) args = - fl_value_new_array_take(fl_value_new_string(a_string), nullptr); + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_string(a_string)); fl_method_channel_invoke_method(self->channel, "flutterMethod", args, cancellable, callback, user_data); } diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index 3891d5dad61d..da6828c2ab89 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -27,7 +27,8 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* handle_get_host_language(PigeonExamplePackageExampleHostApi* object, gpointer user_data) { - return my_example_host_api_get_host_language_response_new("C++"); + return pigeon_example_package_example_host_api_get_host_language_response_new( + "C++"); } static PigeonExamplePackageExampleHostApiAddResponse* handle_add( @@ -35,26 +36,28 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); - return my_example_host_api_add_response_new_error("code", "message", - details); + return pigeon_example_package_example_host_api_add_response_new_error( + "code", "message", details); } - return my_example_host_api_add_response_new(a + b); + return pigeon_example_package_example_host_api_add_response_new(a + b); } static void handle_send_message( PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - PigeonExamplePackageCode code = my_message_data_get_code(message); + PigeonExamplePackageCode code = + pigeon_example_package_message_data_get_code(message); if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); - my_example_host_api_respond_error_send_message(object, response_handle, - "code", "message", details); + pigeon_example_package_example_host_api_respond_error_send_message( + object, response_handle, "code", "message", details); return; } - my_example_host_api_respond_send_message(object, response_handle, TRUE); + pigeon_example_package_example_host_api_respond_send_message( + object, response_handle, TRUE); } // #enddocregion vtable @@ -63,7 +66,7 @@ static void flutter_method_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!my_message_flutter_api_flutter_method_finish( + if (!pigeon_example_package_message_flutter_api_flutter_method_finish( PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { g_warning("Failed to call Flutter method: %s", error->message); @@ -124,7 +127,7 @@ static void my_application_activate(GApplication* application) { .get_host_language = handle_get_host_language, .add = handle_add, .send_message = handle_send_message}; - self->example_host_api = my_example_host_api_new( + self->example_host_api = pigeon_example_package_example_host_api_new( messenger, &example_host_api_vtable, self, nullptr); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); @@ -132,9 +135,9 @@ static void my_application_activate(GApplication* application) { gtk_widget_grab_focus(GTK_WIDGET(view)); // #docregion flutter-method - self->flutter_api = my_message_flutter_api_new(messenger); - my_message_flutter_api_flutter_method_async(self->flutter_api, "hello", - nullptr, flutter_method_cb, self); + self->flutter_api = pigeon_example_package_message_flutter_api_new(messenger); + pigeon_example_package_message_flutter_api_flutter_method( + self->flutter_api, "hello", nullptr, flutter_method_cb, self); // #enddocregion flutter-method } From 5c83c03e280c5db1e3080cd83708ee7c16e77a32 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 11:37:42 +1300 Subject: [PATCH 018/127] Fix method call code --- packages/pigeon/lib/linux_generator.dart | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index b3714944fc2d..0755e81f2b5c 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -566,8 +566,9 @@ class LinuxSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { _writeObjectNew(indent, module, api.name); + indent.writeln('g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();'); indent.writeln( - 'self->channel = fl_method_channel_new(messenger, "${api.name}", codec);'); + 'self->channel = fl_method_channel_new(messenger, "${api.name}", FL_METHOD_CODEC(codec));'); indent.writeln('return self;'); }); @@ -586,14 +587,10 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.writeScoped( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')}) {", '}', () { - final List valueArgs = [ - for (final Parameter param in method.parameters) - _makeFlValue( - module, param.type, _snakeCaseFromCamelCase(param.name)), - 'nullptr' - ]; - indent.writeln( - 'g_autoptr(FlValue) args = fl_value_new_array_take(${valueArgs.join(', ')});'); + indent.writeln('g_autoptr(FlValue) args = fl_value_new_list();'); + for (final Parameter param in method.parameters) { + indent.writeln('fl_value_append_take(args, ${_makeFlValue(module, param.type, _snakeCaseFromCamelCase(param.name))});'); + } indent.writeln( 'fl_method_channel_invoke_method(self->channel, "${method.name}", args, cancellable, callback, user_data);'); }); From c79a035d7a32e5a9a6c60dc07aa392494c929729 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 16:26:31 +1300 Subject: [PATCH 019/127] Generate codecs for Flutter APIs --- packages/pigeon/lib/linux_generator.dart | 298 +++++++++++++---------- 1 file changed, 164 insertions(+), 134 deletions(-) diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/linux_generator.dart index 0755e81f2b5c..67e0fbf67060 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/linux_generator.dart @@ -538,8 +538,14 @@ class LinuxSourceGenerator extends StructuredGenerator { }) { final String module = _getModule(generatorOptions, dartPackageName); final String className = _getClassName(module, api.name); - final String methodPrefix = _getMethodPrefix(module, api.name); + final String codecName = '${api.name}Codec'; + final String codecClassName = _getClassName(module, codecName); + final String codecMethodPrefix = '${methodPrefix}_codec'; + + if (getCodecClasses(api, root).isNotEmpty) { + _writeCodec(generatorOptions, root, indent, api, dartPackageName); + } indent.newln(); _writeObjectStruct(indent, module, api.name, () { @@ -566,7 +572,15 @@ class LinuxSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { _writeObjectNew(indent, module, api.name); - indent.writeln('g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();'); + if (getCodecClasses(api, root).isNotEmpty) { + indent.writeln( + 'g_autoptr($codecClassName) message_codec = ${codecMethodPrefix}_new();'); + indent.writeln( + 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec(FL_STANDARD_MESSAGE_CODEC(message_codec));'); + } else { + indent.writeln( + 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();'); + } indent.writeln( 'self->channel = fl_method_channel_new(messenger, "${api.name}", FL_METHOD_CODEC(codec));'); indent.writeln('return self;'); @@ -588,9 +602,10 @@ class LinuxSourceGenerator extends StructuredGenerator { "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')}) {", '}', () { indent.writeln('g_autoptr(FlValue) args = fl_value_new_list();'); - for (final Parameter param in method.parameters) { - indent.writeln('fl_value_append_take(args, ${_makeFlValue(module, param.type, _snakeCaseFromCamelCase(param.name))});'); - } + for (final Parameter param in method.parameters) { + indent.writeln( + 'fl_value_append_take(args, ${_makeFlValue(module, param.type, _snakeCaseFromCamelCase(param.name))});'); + } indent.writeln( 'fl_method_channel_invoke_method(self->channel, "${method.name}", args, cancellable, callback, user_data);'); }); @@ -652,135 +667,10 @@ class LinuxSourceGenerator extends StructuredGenerator { final String codecClassName = _getClassName(module, codecName); final String codecMethodPrefix = '${methodPrefix}_codec'; - indent.newln(); - _writeDeclareFinalType(indent, module, codecName, - parentClassName: 'FlStandardMessageCodec'); - - indent.newln(); - _writeObjectStruct(indent, module, codecName, () {}, - parentClassName: 'FlStandardMessageCodec'); - - indent.newln(); - _writeDefineType(indent, module, codecName, - parentType: 'fl_standard_message_codec_get_type()'); - - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.newln(); - indent.writeScoped( - 'static gboolean write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', - '}', () { - indent.writeln('uint8_t type = ${customClass.enumeration};'); - indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); - indent.writeln( - 'g_autoptr(FlValue) values = ${snakeCustomClassName}_to_list(value);'); - indent.writeln( - 'return fl_standard_message_codec_write_value(codec, buffer, values, error);'); - }); + if (getCodecClasses(api, root).isNotEmpty) { + _writeCodec(generatorOptions, root, indent, api, dartPackageName); } - indent.newln(); - indent.writeScoped( - 'static gboolean ${methodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', - '}', () { - indent.writeScoped( - 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { - indent.writeScoped('switch (fl_value_get_custom_type(value)) {', '}', - () { - for (final EnumeratedClass customClass - in getCodecClasses(api, root)) { - indent.writeln('case ${customClass.enumeration}:'); - indent.nest(1, () { - final String customClassName = - _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - final String castMacro = - _getClassCastMacro(module, customClass.name); - indent.writeln( - 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); - }); - } - }); - }); - - indent.newln(); - indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->write_value(codec, buffer, value, error);'); - }); - - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.newln(); - indent.writeScoped( - 'static FlValue* read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', - '}', () { - indent.writeln( - 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); - indent.writeScoped('if (values == nullptr) {', '}', () { - indent.writeln('return nullptr;'); - }); - indent.newln(); - indent.writeln( - 'g_autoptr($customClassName) value = ${snakeCustomClassName}_new_from_list(values);'); - indent.writeScoped('if (value == nullptr) {', '}', () { - indent.writeln( - 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); - indent.writeln('return nullptr;'); - }); - indent.newln(); - indent.writeln( - 'return fl_value_new_custom_object_take(${customClass.enumeration}, G_OBJECT(value));'); - }); - } - - indent.newln(); - indent.writeScoped( - 'static FlValue* ${methodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', - '}', () { - indent.writeScoped('switch (type) {', '}', () { - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = - _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.writeln('case ${customClass.enumeration}:'); - indent.nest(1, () { - indent.writeln( - 'return read_$snakeCustomClassName(codec, buffer, offset, error);'); - }); - } - - indent.writeln('default:'); - indent.nest(1, () { - indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); - }); - }); - }); - - indent.newln(); - _writeInit(indent, module, codecName, () {}); - - indent.newln(); - _writeClassInit(indent, module, codecName, () { - indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); - indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = ${methodPrefix}_read_value_of_type;'); - }, hasDispose: false); - - indent.newln(); - indent.writeScoped( - 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { - _writeObjectNew(indent, module, codecName); - indent.writeln('return self;'); - }); - for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -943,8 +833,13 @@ class LinuxSourceGenerator extends StructuredGenerator { indent.writeln('self->user_data_free_func = user_data_free_func;'); indent.newln(); - indent.writeln( - 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); + if (getCodecClasses(api, root).isNotEmpty) { + indent.writeln( + 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); + } else { + indent.writeln( + 'g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new();'); + } for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); final String channelName = @@ -1013,6 +908,141 @@ class LinuxSourceGenerator extends StructuredGenerator { } } +void _writeCodec(LinuxOptions generatorOptions, Root root, Indent indent, + Api api, String dartPackageName) { + final String module = _getModule(generatorOptions, dartPackageName); + final String codecName = '${api.name}Codec'; + final String codecClassName = _getClassName(module, codecName); + final String methodPrefix = _getMethodPrefix(module, api.name); + final String codecMethodPrefix = '${methodPrefix}_codec'; + + indent.newln(); + _writeDeclareFinalType(indent, module, codecName, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeObjectStruct(indent, module, codecName, () {}, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeDefineType(indent, module, codecName, + parentType: 'fl_standard_message_codec_get_type()'); + + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = _getClassName(module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.newln(); + indent.writeScoped( + 'static gboolean write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', + '}', () { + indent.writeln('uint8_t type = ${customClass.enumeration};'); + indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); + indent.writeln( + 'g_autoptr(FlValue) values = ${snakeCustomClassName}_to_list(value);'); + indent.writeln( + 'return fl_standard_message_codec_write_value(codec, buffer, values, error);'); + }); + } + + indent.newln(); + indent.writeScoped( + 'static gboolean ${methodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', + '}', () { + indent.writeScoped( + 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { + indent.writeScoped('switch (fl_value_get_custom_type(value)) {', '}', () { + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + indent.writeln('case ${customClass.enumeration}:'); + indent.nest(1, () { + final String customClassName = + _getClassName(module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + final String castMacro = + _getClassCastMacro(module, customClass.name); + indent.writeln( + 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); + }); + } + }); + }); + + indent.newln(); + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->write_value(codec, buffer, value, error);'); + }); + + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = _getClassName(module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.newln(); + indent.writeScoped( + 'static FlValue* read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', + '}', () { + indent.writeln( + 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); + indent.writeScoped('if (values == nullptr) {', '}', () { + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'g_autoptr($customClassName) value = ${snakeCustomClassName}_new_from_list(values);'); + indent.writeScoped('if (value == nullptr) {', '}', () { + indent.writeln( + 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'return fl_value_new_custom_object_take(${customClass.enumeration}, G_OBJECT(value));'); + }); + } + + indent.newln(); + indent.writeScoped( + 'static FlValue* ${methodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', + '}', () { + indent.writeScoped('switch (type) {', '}', () { + for (final EnumeratedClass customClass in getCodecClasses(api, root)) { + final String customClassName = _getClassName(module, customClass.name); + final String snakeCustomClassName = + _snakeCaseFromCamelCase(customClassName); + indent.writeln('case ${customClass.enumeration}:'); + indent.nest(1, () { + indent.writeln( + 'return read_$snakeCustomClassName(codec, buffer, offset, error);'); + }); + } + + indent.writeln('default:'); + indent.nest(1, () { + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); + }); + }); + }); + + indent.newln(); + _writeInit(indent, module, codecName, () {}); + + indent.newln(); + _writeClassInit(indent, module, codecName, () { + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = ${methodPrefix}_read_value_of_type;'); + }, hasDispose: false); + + indent.newln(); + indent.writeScoped( + 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { + _writeObjectNew(indent, module, codecName); + indent.writeln('return self;'); + }); +} + // Returns the module name to use. String _getModule(LinuxOptions generatorOptions, String dartPackageName) { return generatorOptions.module ?? _camelCaseFromSnakeCase(dartPackageName); From cedb8fae4a0cd85dc73a8a9b79b64a50c5b8953e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 22 Mar 2024 16:37:24 +1300 Subject: [PATCH 020/127] Fix example snippets --- packages/pigeon/example/README.md | 44 ++++++++++++++++++------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 5c1b40722c1e..1df12b7f2608 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -198,37 +198,42 @@ class PigeonApiImplementation : public ExampleHostApi { ``` ### Linux - + ```c++ -static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* handle_get_host_language( - PigeonExamplePackageExampleHostApi* object, gpointer user_data) { - return pigeon_example_package_example_host_api_get_host_language_response_new("C++"); +static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* +handle_get_host_language(PigeonExamplePackageExampleHostApi* object, + gpointer user_data) { + return pigeon_example_package_example_host_api_get_host_language_response_new( + "C++"); } -static PigeonExamplePackageExampleHostApiAddResponse* handle_add(PigeonExamplePackageExampleHostApi* object, - int64_t a, int64_t b, - gpointer user_data) { +static PigeonExamplePackageExampleHostApiAddResponse* handle_add( + PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, + gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); - return pigeon_example_package_example_host_api_add_response_new_error("code", "message", - details); + return pigeon_example_package_example_host_api_add_response_new_error( + "code", "message", details); } return pigeon_example_package_example_host_api_add_response_new(a + b); } static void handle_send_message( - PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, + PigeonExamplePackageExampleHostApi* object, + PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - PigeonExamplePackageCode code = pigeon_example_package_message_data_get_code(message); + PigeonExamplePackageCode code = + pigeon_example_package_message_data_get_code(message); if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); - pigeon_example_package_example_host_api_respond_error_send_message(object, response_handle, - "code", "message", details); + pigeon_example_package_example_host_api_respond_error_send_message( + object, response_handle, "code", "message", details); return; } - pigeon_example_package_example_host_api_respond_send_message(object, response_handle, TRUE); + pigeon_example_package_example_host_api_respond_send_message( + object, response_handle, TRUE); } ``` @@ -317,14 +322,15 @@ void TestPlugin::CallFlutterMethod( ### Linux - + ```c++ static void flutter_method_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; if (!pigeon_example_package_message_flutter_api_flutter_method_finish( - PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, &return_value, &error)) { + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, + &return_value, &error)) { g_warning("Failed to call Flutter method: %s", error->message); return; } @@ -333,11 +339,11 @@ static void flutter_method_cb(GObject* object, GAsyncResult* result, } ``` - + ```c++ self->flutter_api = pigeon_example_package_message_flutter_api_new(messenger); -pigeon_example_package_message_flutter_api_flutter_method_async(self->flutter_api, "hello", - nullptr, flutter_method_cb, self); +pigeon_example_package_message_flutter_api_flutter_method( + self->flutter_api, "hello", nullptr, flutter_method_cb, self); ``` ## Swift / Kotlin Plugin Example From 7cd8e5cdfbee95144a9dc7b5aa70d87ba7314f9b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 10 Apr 2024 14:33:01 +1200 Subject: [PATCH 021/127] Rename Linux to GObject --- packages/pigeon/CHANGELOG.md | 2 +- packages/pigeon/README.md | 4 +- packages/pigeon/example/README.md | 10 +- .../pigeon/example/app/pigeons/messages.dart | 6 +- ..._generator.dart => gobject_generator.dart} | 84 ++++++------- packages/pigeon/lib/pigeon.dart | 2 +- packages/pigeon/lib/pigeon_lib.dart | 94 +++++++-------- ..._test.dart => gobject_generator_test.dart} | 114 +++++++++--------- packages/pigeon/tool/run_tests.dart | 4 +- packages/pigeon/tool/shared/generation.dart | 24 ++-- 10 files changed, 172 insertions(+), 172 deletions(-) rename packages/pigeon/lib/{linux_generator.dart => gobject_generator.dart} (95%) rename packages/pigeon/test/{linux_generator_test.dart => gobject_generator_test.dart} (87%) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 8c011ce1a75c..884256cf1e3d 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,6 +1,6 @@ ## 18.1.0 -* Adds Linux support +* Adds GObject (Linux) support ## 18.0.0 diff --git a/packages/pigeon/README.md b/packages/pigeon/README.md index 115a21e3b646..73f02c27e2f3 100644 --- a/packages/pigeon/README.md +++ b/packages/pigeon/README.md @@ -17,7 +17,7 @@ Currently pigeon supports generating: * Kotlin and Java code for Android * Swift and Objective-C code for iOS and macOS * C++ code for Windows -* C++ code for Linux +* GObject code for Linux ### Supported Datatypes @@ -140,7 +140,7 @@ to the api to allow for multiple instances to be created and operate in parallel ### Flutter calling into Linux steps -1) Add the generated C++ code to your `./linux` directory for compilation, and +1) Add the generated GObject code to your `./linux` directory for compilation, and to your `linux/CMakeLists.txt` file. 1) Implement the generated protocol for handling the calls on Linux, set it up as the vtable for the API object. diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 940cb9840cd6..a774c2e2387c 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -19,9 +19,9 @@ needed for your project. cppOptions: CppOptions(namespace: 'pigeon_example'), cppHeaderOut: 'windows/runner/messages.g.h', cppSourceOut: 'windows/runner/messages.g.cpp', - linuxHeaderOut: 'linux/messages.g.h', - linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(), + gobjectHeaderOut: 'gobject/messages.g.h', + gobjectSourceOut: 'gobject/messages.g.cc', + gobjectOptions: GObjectOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), @@ -197,7 +197,7 @@ class PigeonApiImplementation : public ExampleHostApi { }; ``` -### Linux +### GObject ```c++ static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* @@ -320,7 +320,7 @@ void TestPlugin::CallFlutterMethod( } ``` -### Linux +### GObject ```c++ diff --git a/packages/pigeon/example/app/pigeons/messages.dart b/packages/pigeon/example/app/pigeons/messages.dart index 9f74b6bde856..8c18cc87e81d 100644 --- a/packages/pigeon/example/app/pigeons/messages.dart +++ b/packages/pigeon/example/app/pigeons/messages.dart @@ -11,9 +11,9 @@ import 'package:pigeon/pigeon.dart'; cppOptions: CppOptions(namespace: 'pigeon_example'), cppHeaderOut: 'windows/runner/messages.g.h', cppSourceOut: 'windows/runner/messages.g.cpp', - linuxHeaderOut: 'linux/messages.g.h', - linuxSourceOut: 'linux/messages.g.cc', - linuxOptions: LinuxOptions(), + gobjectHeaderOut: 'linux/messages.g.h', + gobjectSourceOut: 'linux/messages.g.cc', + gobjectOptions: GObjectOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', kotlinOptions: KotlinOptions(), diff --git a/packages/pigeon/lib/linux_generator.dart b/packages/pigeon/lib/gobject_generator.dart similarity index 95% rename from packages/pigeon/lib/linux_generator.dart rename to packages/pigeon/lib/gobject_generator.dart index 67e0fbf67060..2820186756e2 100644 --- a/packages/pigeon/lib/linux_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -13,10 +13,10 @@ const String _commentPrefix = '//'; const DocumentCommentSpecification _docCommentSpec = DocumentCommentSpecification(_commentPrefix); -/// Options that control how Linux code will be generated. -class LinuxOptions { - /// Creates a [LinuxOptions] object - const LinuxOptions({ +/// Options that control how GObject code will be generated. +class GObjectOptions { + /// Creates a [GObjectOptions] object + const GObjectOptions({ this.headerIncludePath, this.module, this.copyrightHeader, @@ -36,19 +36,19 @@ class LinuxOptions { /// The path to the output header file location. final String? headerOutPath; - /// Creates a [LinuxOptions] from a Map representation where: - /// `x = LinuxOptions.fromMap(x.toMap())`. - static LinuxOptions fromMap(Map map) { - return LinuxOptions( + /// Creates a [GObjectOptions] from a Map representation where: + /// `x = GObjectOptions.fromMap(x.toMap())`. + static GObjectOptions fromMap(Map map) { + return GObjectOptions( headerIncludePath: map['header'] as String?, module: map['module'] as String?, copyrightHeader: map['copyrightHeader'] as Iterable?, - headerOutPath: map['linuxHeaderOut'] as String?, + headerOutPath: map['gobjectHeaderOut'] as String?, ); } - /// Converts a [LinuxOptions] to a Map representation where: - /// `x = LinuxOptions.fromMap(x.toMap())`. + /// Converts a [GObjectOptions] to a Map representation where: + /// `x = GObjectOptions.fromMap(x.toMap())`. Map toMap() { final Map result = { if (headerIncludePath != null) 'header': headerIncludePath!, @@ -59,21 +59,21 @@ class LinuxOptions { } /// Overrides any non-null parameters from [options] into this to make a new - /// [LinuxOptions]. - LinuxOptions merge(LinuxOptions options) { - return LinuxOptions.fromMap(mergeMaps(toMap(), options.toMap())); + /// [GObjectOptions]. + GObjectOptions merge(GObjectOptions options) { + return GObjectOptions.fromMap(mergeMaps(toMap(), options.toMap())); } } -/// Class that manages all Linux code generation. -class LinuxGenerator extends Generator> { +/// Class that manages all GObject code generation. +class GObjectGenerator extends Generator> { /// Constructor. - const LinuxGenerator(); + const GObjectGenerator(); - /// Generates Linux file of type specified in [generatorOptions] + /// Generates GObject file of type specified in [generatorOptions] @override void generate( - OutputFileOptions generatorOptions, + OutputFileOptions generatorOptions, Root root, StringSink sink, { required String dartPackageName, @@ -81,14 +81,14 @@ class LinuxGenerator extends Generator> { assert(generatorOptions.fileType == FileType.header || generatorOptions.fileType == FileType.source); if (generatorOptions.fileType == FileType.header) { - const LinuxHeaderGenerator().generate( + const GObjectHeaderGenerator().generate( generatorOptions.languageOptions, root, sink, dartPackageName: dartPackageName, ); } else if (generatorOptions.fileType == FileType.source) { - const LinuxSourceGenerator().generate( + const GObjectSourceGenerator().generate( generatorOptions.languageOptions, root, sink, @@ -98,14 +98,14 @@ class LinuxGenerator extends Generator> { } } -/// Writes Linux header (.h) file to sink. -class LinuxHeaderGenerator extends StructuredGenerator { +/// Writes GObject header (.h) file to sink. +class GObjectHeaderGenerator extends StructuredGenerator { /// Constructor. - const LinuxHeaderGenerator(); + const GObjectHeaderGenerator(); @override void writeFilePrologue( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -119,7 +119,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeFileImports( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -135,7 +135,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeOpenNamespace( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -146,7 +146,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeEnum( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Enum anEnum, { @@ -173,7 +173,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeDataClass( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Class classDefinition, { @@ -213,7 +213,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeFlutterApi( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Api api, { @@ -266,7 +266,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeHostApi( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Api api, { @@ -375,7 +375,7 @@ class LinuxHeaderGenerator extends StructuredGenerator { @override void writeCloseNamespace( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -389,14 +389,14 @@ class LinuxHeaderGenerator extends StructuredGenerator { } } -/// Writes Linux source (.cc) file to sink. -class LinuxSourceGenerator extends StructuredGenerator { +/// Writes GObject source (.cc) file to sink. +class GObjectSourceGenerator extends StructuredGenerator { /// Constructor. - const LinuxSourceGenerator(); + const GObjectSourceGenerator(); @override void writeFilePrologue( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -410,7 +410,7 @@ class LinuxSourceGenerator extends StructuredGenerator { @override void writeFileImports( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, { required String dartPackageName, @@ -421,7 +421,7 @@ class LinuxSourceGenerator extends StructuredGenerator { @override void writeDataClass( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Class classDefinition, { @@ -530,7 +530,7 @@ class LinuxSourceGenerator extends StructuredGenerator { @override void writeFlutterApi( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Api api, { @@ -651,7 +651,7 @@ class LinuxSourceGenerator extends StructuredGenerator { @override void writeHostApi( - LinuxOptions generatorOptions, + GObjectOptions generatorOptions, Root root, Indent indent, Api api, { @@ -908,7 +908,7 @@ class LinuxSourceGenerator extends StructuredGenerator { } } -void _writeCodec(LinuxOptions generatorOptions, Root root, Indent indent, +void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, Api api, String dartPackageName) { final String module = _getModule(generatorOptions, dartPackageName); final String codecName = '${api.name}Codec'; @@ -1044,7 +1044,7 @@ void _writeCodec(LinuxOptions generatorOptions, Root root, Indent indent, } // Returns the module name to use. -String _getModule(LinuxOptions generatorOptions, String dartPackageName) { +String _getModule(GObjectOptions generatorOptions, String dartPackageName) { return generatorOptions.module ?? _camelCaseFromSnakeCase(dartPackageName); } diff --git a/packages/pigeon/lib/pigeon.dart b/packages/pigeon/lib/pigeon.dart index 35b2a261bf2a..4bc96ca1026a 100644 --- a/packages/pigeon/lib/pigeon.dart +++ b/packages/pigeon/lib/pigeon.dart @@ -8,7 +8,7 @@ export 'cpp_generator.dart' show CppOptions; export 'dart_generator.dart' show DartOptions; export 'java_generator.dart' show JavaOptions; export 'kotlin_generator.dart' show KotlinOptions; -export 'linux_generator.dart' show LinuxOptions; +export 'gobject_generator.dart' show GObjectOptions; export 'objc_generator.dart' show ObjcOptions; export 'pigeon_lib.dart'; export 'swift_generator.dart' show SwiftOptions; diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart index 6aceba465302..f3b8f0ee27db 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -30,9 +30,9 @@ import 'cpp_generator.dart'; import 'dart_generator.dart'; import 'generator_tools.dart'; import 'generator_tools.dart' as generator_tools; +import 'gobject_generator.dart'; import 'java_generator.dart'; import 'kotlin_generator.dart'; -import 'linux_generator.dart'; import 'objc_generator.dart'; import 'swift_generator.dart'; @@ -254,9 +254,9 @@ class PigeonOptions { this.cppHeaderOut, this.cppSourceOut, this.cppOptions, - this.linuxHeaderOut, - this.linuxSourceOut, - this.linuxOptions, + this.gobjectHeaderOut, + this.gobjectSourceOut, + this.gobjectOptions, this.dartOptions, this.copyrightHeader, this.oneLanguage, @@ -311,14 +311,14 @@ class PigeonOptions { /// Options that control how C++ will be generated. final CppOptions? cppOptions; - /// Path to the ".h" Linux file that will be generated. - final String? linuxHeaderOut; + /// Path to the ".h" GObject file that will be generated. + final String? gobjectHeaderOut; - /// Path to the ".cc" Linux file that will be generated. - final String? linuxSourceOut; + /// Path to the ".cc" GObject file that will be generated. + final String? gobjectSourceOut; - /// Options that control how Linux source will be generated. - final LinuxOptions? linuxOptions; + /// Options that control how GObject source will be generated. + final GObjectOptions? gobjectOptions; /// Options that control how Dart will be generated. final DartOptions? dartOptions; @@ -370,10 +370,10 @@ class PigeonOptions { cppOptions: map.containsKey('cppOptions') ? CppOptions.fromMap(map['cppOptions']! as Map) : null, - linuxHeaderOut: map['linuxHeaderOut'] as String?, - linuxSourceOut: map['linuxSourceOut'] as String?, - linuxOptions: map.containsKey('linuxOptions') - ? LinuxOptions.fromMap(map['linuxOptions']! as Map) + gobjectHeaderOut: map['gobjectHeaderOut'] as String?, + gobjectSourceOut: map['gobjectSourceOut'] as String?, + gobjectOptions: map.containsKey('gobjectOptions') + ? GObjectOptions.fromMap(map['gobjectOptions']! as Map) : null, dartOptions: map.containsKey('dartOptions') ? DartOptions.fromMap(map['dartOptions']! as Map) @@ -406,9 +406,9 @@ class PigeonOptions { if (cppHeaderOut != null) 'cppHeaderOut': cppHeaderOut!, if (cppSourceOut != null) 'cppSourceOut': cppSourceOut!, if (cppOptions != null) 'cppOptions': cppOptions!.toMap(), - if (linuxHeaderOut != null) 'linuxHeaderOut': linuxHeaderOut!, - if (linuxSourceOut != null) 'linuxSourceOut': linuxSourceOut!, - if (linuxOptions != null) 'linuxOptions': linuxOptions!.toMap(), + if (gobjectHeaderOut != null) 'gobjectHeaderOut': gobjectHeaderOut!, + if (gobjectSourceOut != null) 'gobjectSourceOut': gobjectSourceOut!, + if (gobjectOptions != null) 'gobjectOptions': gobjectOptions!.toMap(), if (dartOptions != null) 'dartOptions': dartOptions!.toMap(), if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (astOut != null) 'astOut': astOut!, @@ -788,10 +788,10 @@ class CppGeneratorAdapter implements GeneratorAdapter { List validate(PigeonOptions options, Root root) => []; } -/// A [GeneratorAdapter] that generates Linux source code. -class LinuxGeneratorAdapter implements GeneratorAdapter { - /// Constructor for [LinuxGeneratorAdapter]. - LinuxGeneratorAdapter( +/// A [GeneratorAdapter] that generates GObject source code. +class GObjectGeneratorAdapter implements GeneratorAdapter { + /// Constructor for [GObjectGeneratorAdapter]. + GObjectGeneratorAdapter( {this.fileTypeList = const [FileType.header, FileType.source]}); @override @@ -800,18 +800,18 @@ class LinuxGeneratorAdapter implements GeneratorAdapter { @override void generate( StringSink sink, PigeonOptions options, Root root, FileType fileType) { - final LinuxOptions linuxOptions = - options.linuxOptions ?? const LinuxOptions(); - final LinuxOptions linuxOptionsWithHeader = linuxOptions.merge(LinuxOptions( + final GObjectOptions gobjectOptions = + options.gobjectOptions ?? const GObjectOptions(); + final GObjectOptions gobjectOptionsWithHeader = gobjectOptions.merge(GObjectOptions( copyrightHeader: options.copyrightHeader != null ? _lineReader( path.posix.join(options.basePath ?? '', options.copyrightHeader)) : null, )); - final OutputFileOptions outputFileOptions = - OutputFileOptions( - fileType: fileType, languageOptions: linuxOptionsWithHeader); - const LinuxGenerator generator = LinuxGenerator(); + final OutputFileOptions outputFileOptions = + OutputFileOptions( + fileType: fileType, languageOptions: gobjectOptionsWithHeader); + const GObjectGenerator generator = GObjectGenerator(); generator.generate( outputFileOptions, root, @@ -823,10 +823,10 @@ class LinuxGeneratorAdapter implements GeneratorAdapter { @override IOSink? shouldGenerate(PigeonOptions options, FileType fileType) { if (fileType == FileType.source) { - return _openSink(options.linuxSourceOut, + return _openSink(options.gobjectSourceOut, basePath: options.basePath ?? ''); } else { - return _openSink(options.linuxHeaderOut, + return _openSink(options.gobjectHeaderOut, basePath: options.basePath ?? ''); } } @@ -2149,17 +2149,17 @@ ${_argParser.usage}'''; ..addOption('cpp_namespace', help: 'The namespace that generated C++ code will be in.') ..addOption( - 'linux_header_out', - help: 'Path to generated Linux header file (.h).', - aliases: const ['experimental_linux_header_out'], + 'gobject_header_out', + help: 'Path to generated GObject header file (.h).', + aliases: const ['experimental_gobject_header_out'], ) ..addOption( - 'linux_source_out', - help: 'Path to generated Linux classes file (.cc).', - aliases: const ['experimental_linux_source_out'], + 'gobject_source_out', + help: 'Path to generated GObject classes file (.cc).', + aliases: const ['experimental_gobject_source_out'], ) - ..addOption('linux_module', - help: 'The module that generated Linux code will be in.') + ..addOption('gobject_module', + help: 'The module that generated GObject code will be in.') ..addOption('objc_header_out', help: 'Path to generated Objective-C header file (.h).') ..addOption('objc_prefix', @@ -2214,10 +2214,10 @@ ${_argParser.usage}'''; cppOptions: CppOptions( namespace: results['cpp_namespace'] as String?, ), - linuxHeaderOut: results['linux_header_out'] as String?, - linuxSourceOut: results['linux_source_out'] as String?, - linuxOptions: LinuxOptions( - module: results['linux_module'] as String?, + gobjectHeaderOut: results['gobject_header_out'] as String?, + gobjectSourceOut: results['gobject_source_out'] as String?, + gobjectOptions: GObjectOptions( + module: results['gobject_module'] as String?, ), copyrightHeader: results['copyright_header'] as String?, oneLanguage: results['one_language'] as bool?, @@ -2275,7 +2275,7 @@ ${_argParser.usage}'''; SwiftGeneratorAdapter(), KotlinGeneratorAdapter(), CppGeneratorAdapter(), - LinuxGeneratorAdapter(), + GObjectGeneratorAdapter(), DartTestGeneratorAdapter(), ObjcGeneratorAdapter(), AstGeneratorAdapter(), @@ -2344,11 +2344,11 @@ ${_argParser.usage}'''; headerIncludePath: path.basename(options.cppHeaderOut!))))); } - if (options.linuxHeaderOut != null) { + if (options.gobjectHeaderOut != null) { options = options.merge(PigeonOptions( - linuxOptions: (options.linuxOptions ?? const LinuxOptions()).merge( - LinuxOptions( - headerIncludePath: path.basename(options.linuxHeaderOut!))))); + gobjectOptions: (options.gobjectOptions ?? const GObjectOptions()).merge( + GObjectOptions( + headerIncludePath: path.basename(options.gobjectHeaderOut!))))); } for (final GeneratorAdapter adapter in safeGeneratorAdapters) { diff --git a/packages/pigeon/test/linux_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart similarity index 87% rename from packages/pigeon/test/linux_generator_test.dart rename to packages/pigeon/test/gobject_generator_test.dart index e7ab5c0e629d..46a6847074a8 100644 --- a/packages/pigeon/test/linux_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -4,7 +4,7 @@ import 'package:pigeon/ast.dart'; import 'package:pigeon/generator_tools.dart'; -import 'package:pigeon/linux_generator.dart'; +import 'package:pigeon/gobject_generator.dart'; import 'package:test/test.dart'; const String DEFAULT_PACKAGE_NAME = 'test_package'; @@ -59,11 +59,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate(generatorOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); @@ -83,11 +83,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate(generatorOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); @@ -149,11 +149,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate(generatorOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); @@ -173,11 +173,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate(generatorOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); @@ -235,11 +235,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -253,11 +253,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -291,11 +291,11 @@ void main() { ], classes: [], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -310,11 +310,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(headerIncludePath: 'a_header.h'), + languageOptions: const GObjectOptions(headerIncludePath: 'a_header.h'), ); generator.generate( generatorOptions, @@ -386,11 +386,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -407,11 +407,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -515,11 +515,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -637,11 +637,11 @@ void main() { ], enums: []); { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -657,11 +657,11 @@ void main() { } { final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.source, - languageOptions: const LinuxOptions(), + languageOptions: const GObjectOptions(), ); generator.generate( generatorOptions, @@ -751,11 +751,11 @@ void main() { ], ); final StringBuffer sink = StringBuffer(); - const LinuxGenerator generator = LinuxGenerator(); - final OutputFileOptions generatorOptions = - OutputFileOptions( + const GObjectGenerator generator = GObjectGenerator(); + final OutputFileOptions generatorOptions = + OutputFileOptions( fileType: FileType.header, - languageOptions: const LinuxOptions(headerIncludePath: 'foo'), + languageOptions: const GObjectOptions(headerIncludePath: 'foo'), ); generator.generate( generatorOptions, diff --git a/packages/pigeon/tool/run_tests.dart b/packages/pigeon/tool/run_tests.dart index ca90c5d9dcd4..66482e72178e 100644 --- a/packages/pigeon/tool/run_tests.dart +++ b/packages/pigeon/tool/run_tests.dart @@ -67,9 +67,9 @@ Future _validateGeneratedFiles( languagesToValidate = { GeneratorLanguage.cpp, GeneratorLanguage.dart, + GeneratorLanguage.gobject, GeneratorLanguage.java, GeneratorLanguage.kotlin, - GeneratorLanguage.linux, GeneratorLanguage.objc, }; } else if (Platform.isMacOS) { @@ -141,9 +141,9 @@ Set _extensionsForLanguage(GeneratorLanguage language) { return switch (language) { GeneratorLanguage.cpp => {'cc', 'cpp', 'h'}, GeneratorLanguage.dart => {'dart'}, + GeneratorLanguage.gobject => {'gobject'}, GeneratorLanguage.java => {'java'}, GeneratorLanguage.kotlin => {'kt'}, - GeneratorLanguage.linux => {'linux'}, GeneratorLanguage.swift => {'swift'}, GeneratorLanguage.objc => {'h', 'm', 'mm'}, }; diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index ff943e93e01e..f03b9f982018 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -13,9 +13,9 @@ import 'process_utils.dart'; enum GeneratorLanguage { cpp, dart, + gobject, java, kotlin, - linux, objc, swift, } @@ -114,13 +114,13 @@ Future generateTestPigeons({required String baseDir}) async { : '$outputBase/windows/pigeon/$input.gen.cpp', cppNamespace: '${input}_pigeontest', // Linux - linuxHeaderOut: skipLanguages.contains(GeneratorLanguage.linux) + gobjectHeaderOut: skipLanguages.contains(GeneratorLanguage.gobject) ? null : '$outputBase/linux/pigeon/$input.gen.h', - linuxSourceOut: skipLanguages.contains(GeneratorLanguage.linux) + gobjectSourceOut: skipLanguages.contains(GeneratorLanguage.gobject) ? null : '$outputBase/linux/pigeon/$input.gen.cc', - linuxModule: '${pascalCaseName}PigeonTest', + gobjectModule: '${pascalCaseName}PigeonTest', suppressVersion: true, dartPackageName: 'pigeon_integration_tests', ); @@ -202,9 +202,9 @@ Future runPigeon({ String? cppNamespace, String? dartOut, String? dartTestOut, - String? linuxHeaderOut, - String? linuxSourceOut, - String? linuxModule, + String? gobjectHeaderOut, + String? gobjectSourceOut, + String? gobjectModule, String? javaOut, String? javaPackage, String? objcHeaderOut, @@ -236,9 +236,9 @@ Future runPigeon({ cppHeaderOut: cppHeaderOut, cppSourceOut: cppSourceOut, cppOptions: CppOptions(namespace: cppNamespace), - linuxHeaderOut: linuxHeaderOut, - linuxSourceOut: linuxSourceOut, - linuxOptions: LinuxOptions(module: linuxModule), + gobjectHeaderOut: gobjectHeaderOut, + gobjectSourceOut: gobjectSourceOut, + gobjectOptions: GObjectOptions(module: gobjectModule), javaOut: javaOut, javaOptions: JavaOptions(package: javaPackage), kotlinOut: kotlinOut, @@ -269,9 +269,9 @@ Future formatAllFiles({ Set languages = const { GeneratorLanguage.cpp, GeneratorLanguage.dart, + GeneratorLanguage.gobject, GeneratorLanguage.java, GeneratorLanguage.kotlin, - GeneratorLanguage.linux, GeneratorLanguage.objc, GeneratorLanguage.swift, }, @@ -285,7 +285,7 @@ Future formatAllFiles({ 'format', '--packages=pigeon', if (languages.contains(GeneratorLanguage.cpp) || - languages.contains(GeneratorLanguage.linux) || + languages.contains(GeneratorLanguage.gobject) || languages.contains(GeneratorLanguage.objc)) '--clang-format' else From ef4ef9f7be6842ce07421a41731d21e4e87d42b8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 11:36:09 +1200 Subject: [PATCH 022/127] Compose warning messages dynamically --- packages/pigeon/lib/gobject_generator.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 2820186756e2..cf9f61f86ce1 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -784,7 +784,7 @@ class GObjectSourceGenerator extends StructuredGenerator { "g_autoptr($responseClassName) response = self->vtable->$methodName(${vfuncArgs.join(', ')});"); indent.writeScoped('if (response == nullptr) {', '}', () { indent.writeln( - 'g_warning("No response returned to ${api.name}.${method.name}");'); + 'g_warning("No response returned to %s.%s", "${api.name}", "${method.name}");'); indent.writeln('return;'); }); @@ -794,7 +794,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'if (!fl_basic_message_channel_respond(channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( - 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + 'g_warning("Failed to send response to %s.%s: %s", "${api.name}", "${method.name}", error->message);'); }); } }); @@ -879,7 +879,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( - 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + 'g_warning("Failed to send response to %s.%s: %s", "${api.name}", "${method.name}", error->message);'); }); }); @@ -901,7 +901,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', '}', () { indent.writeln( - 'g_warning("Failed to send response to ${api.name}.${method.name}: %s", error->message);'); + 'g_warning("Failed to send response to %s.%s: %s", "${api.name}", "${method.name}", error->message);'); }); }); } From c77b7b6cdd6700c89468852612f4f9615373650c Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 12:03:13 +1200 Subject: [PATCH 023/127] Update generated code to use new warnings --- .../pigeon/example/app/linux/messages.g.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index bbf89e375dcb..8a05bff73a76 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -393,15 +393,16 @@ static void get_host_language_cb( g_autoptr(PigeonExamplePackageExampleHostApiGetHostLanguageResponse) response = self->vtable->get_host_language(self, self->user_data); if (response == nullptr) { - g_warning("No response returned to ExampleHostApi.getHostLanguage"); + g_warning("No response returned to %s.%s", "ExampleHostApi", + "getHostLanguage"); return; } g_autoptr(GError) error = NULL; if (!fl_basic_message_channel_respond(channel, response_handle, response->value, &error)) { - g_warning("Failed to send response to ExampleHostApi.getHostLanguage: %s", - error->message); + g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", + "getHostLanguage", error->message); } } @@ -421,14 +422,14 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, fl_value_get_int(fl_value_get_list_value(message, 1)), self->user_data); if (response == nullptr) { - g_warning("No response returned to ExampleHostApi.add"); + g_warning("No response returned to %s.%s", "ExampleHostApi", "add"); return; } g_autoptr(GError) error = NULL; if (!fl_basic_message_channel_respond(channel, response_handle, response->value, &error)) { - g_warning("Failed to send response to ExampleHostApi.add: %s", + g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", "add", error->message); } } @@ -522,8 +523,8 @@ void pigeon_example_package_example_host_api_respond_send_message( if (!fl_basic_message_channel_respond(self->send_message_channel, response_handle, response->value, &error)) { - g_warning("Failed to send response to ExampleHostApi.sendMessage: %s", - error->message); + g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", + "sendMessage", error->message); } } @@ -538,8 +539,8 @@ void pigeon_example_package_example_host_api_respond_error_send_message( if (!fl_basic_message_channel_respond(self->send_message_channel, response_handle, response->value, &error)) { - g_warning("Failed to send response to ExampleHostApi.sendMessage: %s", - error->message); + g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", + "sendMessage", error->message); } } From d380a50eba147d6b26e63e4b521ceecaabc465d8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 13:09:26 +1200 Subject: [PATCH 024/127] Support integer list types --- .../pigeon/example/app/linux/messages.g.cc | 18 +- packages/pigeon/lib/gobject_generator.dart | 183 ++++++++++++++---- 2 files changed, 159 insertions(+), 42 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 8a05bff73a76..e931a9e33f32 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -416,11 +416,11 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, return; } + FlValue* value0 = fl_value_get_list_value(message, 0); + FlValue* value1 = fl_value_get_list_value(message, 1); g_autoptr(PigeonExamplePackageExampleHostApiAddResponse) response = - self->vtable->add(self, - fl_value_get_int(fl_value_get_list_value(message, 0)), - fl_value_get_int(fl_value_get_list_value(message, 1)), - self->user_data); + self->vtable->add(self, fl_value_get_int(value0), + fl_value_get_int(value1), self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "ExampleHostApi", "add"); return; @@ -444,11 +444,11 @@ static void send_message_cb( return; } - self->vtable->send_message( - self, - PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA(fl_value_get_custom_value_object( - fl_value_get_list_value(message, 0))), - response_handle, self->user_data); + FlValue* value0 = fl_value_get_list_value(message, 0); + self->vtable->send_message(self, + PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( + fl_value_get_custom_value_object(value0)), + response_handle, self->user_data); } static void pigeon_example_package_example_host_api_dispose(GObject* object) { diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index cf9f61f86ce1..2f827c723ed0 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -195,6 +195,9 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String fieldName = _snakeCaseFromCamelCase(field.name); final String type = _getType(module, field.type); constructorArgs.add('$type $fieldName'); + if (_isNumericListType(field.type)) { + constructorArgs.add('size_t ${fieldName}_length'); + } } indent.writeln( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')});"); @@ -206,8 +209,12 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); addDocumentationComments( indent, field.documentationComments, _docCommentSpec); + final List getterArgs = [ + '$className* self', + if (_isNumericListType(field.type)) 'size_t *length' + ]; indent.writeln( - '$returnType ${methodPrefix}_get_$fieldName($className* self);'); + '$returnType ${methodPrefix}_get_$fieldName(${getterArgs.join(', ')});'); } } @@ -256,6 +263,8 @@ class GObjectHeaderGenerator extends StructuredGenerator { '$className* self', 'GAsyncResult* result', if (returnType != 'void') '$returnType* return_value', + if (_isNumericListType(method.returnType)) + 'size_t* return_value_length', 'GError** error' ]; indent.newln(); @@ -310,8 +319,12 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); + final List constructorArgs = [ + '$returnType return_value', + if (_isNumericListType(method.returnType)) 'size_t return_value_length' + ]; indent.writeln( - '$responseClassName* ${responseMethodPrefix}_new($returnType return_value);'); + '$responseClassName* ${responseMethodPrefix}_new(${constructorArgs.join(', ')});'); indent.newln(); indent.writeln( @@ -329,14 +342,19 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); - final List methodArgs = [ - '$className* self', - for (final Parameter param in method.parameters) - '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + final List methodArgs = ['$className* self']; + for (final Parameter param in method.parameters) { + final String name = _snakeCaseFromCamelCase(param.name); + methodArgs.add('${_getType(module, param.type)} $name'); + if (_isNumericListType(param.type)) { + methodArgs.add('size_t ${name}_length'); + } + } + methodArgs.addAll([ if (method.isAsynchronous) 'FlBasicMessageChannelResponseHandle* response_handle', 'gpointer user_data', - ]; + ]); final String returnType = method.isAsynchronous ? 'void' : '$responseClassName*'; indent.writeln("$returnType (*$methodName)(${methodArgs.join(', ')});"); @@ -356,7 +374,8 @@ class GObjectHeaderGenerator extends StructuredGenerator { final List respondArgs = [ '$className* self', 'FlBasicMessageChannelResponseHandle* response_handle', - '$returnType return_value' + '$returnType return_value', + if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeln( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); @@ -442,6 +461,9 @@ class GObjectSourceGenerator extends StructuredGenerator { final String fieldName = _snakeCaseFromCamelCase(field.name); final String fieldType = _getType(module, field.type, isOutput: true); indent.writeln('$fieldType $fieldName;'); + if (_isNumericListType(field.type)) { + indent.writeln('size_t ${fieldName}_length;'); + } } }); @@ -470,10 +492,14 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeClassInit(indent, module, classDefinition.name, () {}); - final List constructorArgs = [ - for (final NamedType field in classDefinition.fields) - '${_getType(module, field.type)} ${_snakeCaseFromCamelCase(field.name)}', - ]; + final List constructorArgs = []; + for (final NamedType field in classDefinition.fields) { + final String name = _snakeCaseFromCamelCase(field.name); + constructorArgs.add('${_getType(module, field.type)} $name'); + if (_isNumericListType(field.type)) { + constructorArgs.add('size_t ${name}_length'); + } + } indent.newln(); indent.writeScoped( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')}) {", '}', @@ -481,9 +507,13 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectNew(indent, module, classDefinition.name); for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); - final String value = _referenceValue(field.type, fieldName); + final String value = _referenceValue(field.type, fieldName, + lengthVariableName: '${fieldName}_length'); indent.writeln('self->$fieldName = $value;'); + if (_isNumericListType(field.type)) { + indent.writeln('self->${fieldName}_length = ${fieldName}_length;'); + } } indent.writeln('return self;'); }); @@ -493,11 +523,18 @@ class GObjectSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, field.type); indent.newln(); + final List getterArgs = [ + '$className* self', + if (_isNumericListType(field.type)) 'size_t *length' + ]; indent.writeScoped( - '$returnType ${methodPrefix}_get_$fieldName($className* self) {', '}', - () { + '$returnType ${methodPrefix}_get_$fieldName(${getterArgs.join(', ')}) {', + '}', () { indent.writeln( 'g_return_val_if_fail($testMacro(self), ${_getDefaultValue(module, field.type)});'); + if (_isNumericListType(field.type)) { + indent.writeln('*length = self->${fieldName}_length;'); + } indent.writeln('return self->$fieldName;'); }); } @@ -509,7 +546,7 @@ class GObjectSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _snakeCaseFromCamelCase(field.name); indent.writeln( - 'fl_value_append_take(values, ${_makeFlValue(module, field.type, 'self->$fieldName')});'); + 'fl_value_append_take(values, ${_makeFlValue(module, field.type, 'self->$fieldName', lengthVariableName: 'self->${fieldName}_length')});'); } indent.writeln('return values;'); }); @@ -589,22 +626,29 @@ class GObjectSourceGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); - final List asyncArgs = [ - '$className* self', - for (final Parameter param in method.parameters) - '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + final List asyncArgs = ['$className* self']; + for (final Parameter param in method.parameters) { + final String name = _snakeCaseFromCamelCase(param.name); + asyncArgs.add('${_getType(module, param.type)} $name'); + if (_isNumericListType(param.type)) { + asyncArgs.add('size_t ${name}_length'); + } + } + asyncArgs.addAll([ 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data', - ]; + ]); indent.newln(); indent.writeScoped( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')}) {", '}', () { indent.writeln('g_autoptr(FlValue) args = fl_value_new_list();'); for (final Parameter param in method.parameters) { - indent.writeln( - 'fl_value_append_take(args, ${_makeFlValue(module, param.type, _snakeCaseFromCamelCase(param.name))});'); + final String name = _snakeCaseFromCamelCase(param.name); + final String value = _makeFlValue(module, param.type, name, + lengthVariableName: '${name}_length'); + indent.writeln('fl_value_append_take(args, $value);'); } indent.writeln( 'fl_method_channel_invoke_method(self->channel, "${method.name}", args, cancellable, callback, user_data);'); @@ -616,6 +660,8 @@ class GObjectSourceGenerator extends StructuredGenerator { '$className* self', 'GAsyncResult* result', if (returnType != 'void') '$returnType* return_value', + if (_isNumericListType(method.returnType)) + 'size_t* return_value_length', 'GError** error', ]; indent.newln(); @@ -640,7 +686,10 @@ class GObjectSourceGenerator extends StructuredGenerator { final String returnValue = _fromFlValue(module, method.returnType, 'r'); indent.writeln( - '*return_value = ${_referenceValue(method.returnType, returnValue)};'); + '*return_value = ${_referenceValue(method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); + if (_isNumericListType(method.returnType)) { + indent.writeln('*return_value_length = fl_value_get_length(r);'); + } } indent.newln(); @@ -704,13 +753,17 @@ class GObjectSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); + final List constructorArgs = [ + '$returnType return_value', + if (_isNumericListType(method.returnType)) 'size_t return_value_length' + ]; indent.writeScoped( - "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new($returnType return_value) {", + "${method.isAsynchronous ? 'static ' : ''}$responseClassName* ${responseMethodPrefix}_new(${constructorArgs.join(', ')}) {", '}', () { _writeObjectNew(indent, module, responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( - "fl_value_append_take(self->value, ${_makeFlValue(module, method.returnType, 'return_value')});"); + "fl_value_append_take(self->value, ${_makeFlValue(module, method.returnType, 'return_value', lengthVariableName: 'return_value_length')});"); indent.writeln('return self;'); }); @@ -764,13 +817,20 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('return;'); }); - final List methodArgs = [ - for (int i = 0; i < method.parameters.length; i++) - _fromFlValue(module, method.parameters[i].type, - 'fl_value_get_list_value(message, $i)'), - ]; + final List methodArgs = []; + for (int i = 0; i < method.parameters.length; i++) { + methodArgs + .add(_fromFlValue(module, method.parameters[i].type, 'value$i')); + if (_isNumericListType(method.parameters[i].type)) { + methodArgs.add('fl_value_get_length(value$i)'); + } + } indent.newln(); + for (int i = 0; i < method.parameters.length; i++) { + indent.writeln( + 'FlValue* value$i = fl_value_get_list_value(message, $i);'); + } if (method.isAsynchronous) { final List vfuncArgs = ['self']; vfuncArgs.addAll(methodArgs); @@ -1218,11 +1278,30 @@ String _getType(String module, TypeDeclaration type, {bool isOutput = false}) { return 'double'; } else if (type.baseName == 'String') { return isOutput ? 'gchar*' : 'const gchar*'; + } else if (type.baseName == 'Uint8List') { + return isOutput ? 'uint8_t*' : 'const uint8_t*'; + } else if (type.baseName == 'Int32List') { + return isOutput ? 'int32_t*' : 'const int32_t*'; + } else if (type.baseName == 'Int64List') { + return isOutput ? 'int64_t*' : 'const int64_t*'; + } else if (type.baseName == 'Float32List') { + return isOutput ? 'float*' : 'const float*'; + } else if (type.baseName == 'Float64List') { + return isOutput ? 'double*' : 'const double*'; } else { throw Exception('Unknown type ${type.baseName}'); } } +// Returns true if [type] is a *List typed numeric list type. +bool _isNumericListType(TypeDeclaration type) { + return type.baseName == 'Uint8List' || + type.baseName == 'Int32List' || + type.baseName == 'Int64List' || + type.baseName == 'Float32List' || + type.baseName == 'Float64List'; +} + // Returns code to clear a value stored in [variableName], or null if no function required. String? _getClearFunction(TypeDeclaration type, String variableName) { if (type.isClass) { @@ -1255,24 +1334,42 @@ String _getDefaultValue(String module, TypeDeclaration type) { return '0.0'; } else if (type.baseName == 'String') { return 'nullptr'; + } else if (_isNumericListType(type)) { + return 'nullptr'; } else { throw Exception('Unknown type ${type.baseName}'); } } // Returns code to copy the native data type stored in [variableName]. -String _referenceValue(TypeDeclaration type, String variableName) { +// +// [lengthVariableName] must be provided for the typed numeric *List types. +String _referenceValue(TypeDeclaration type, String variableName, + {String? lengthVariableName}) { if (type.isClass || type.baseName == 'List' || type.baseName == 'Map') { return 'g_object_ref($variableName)'; } else if (type.baseName == 'String') { return 'g_strdup($variableName)'; + } else if (type.baseName == 'Uint8List') { + return 'static_cast(g_memdup2($variableName, $lengthVariableName))'; + } else if (type.baseName == 'Int32List') { + return 'static_cast(g_memdup2($variableName, sizeof(int32_t) * $lengthVariableName))'; + } else if (type.baseName == 'Int64List') { + return 'static_cast(g_memdup2($variableName, sizeof(int64_t) * $lengthVariableName))'; + } else if (type.baseName == 'Float32List') { + return 'static_cast(g_memdup2($variableName, sizeof(float) * $lengthVariableName))'; + } else if (type.baseName == 'Float64List') { + return 'static_cast(g_memdup2($variableName, sizeof(double) * $lengthVariableName))'; } else { return variableName; } } // Returns code to convert the native data type stored in [variableName] to a FlValue. -String _makeFlValue(String module, TypeDeclaration type, String variableName) { +// +// [lengthVariableName] must be provided for the typed numeric *List types. +String _makeFlValue(String module, TypeDeclaration type, String variableName, + {String? lengthVariableName}) { if (type.isClass) { return 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; } else if (type.isEnum) { @@ -1289,6 +1386,16 @@ String _makeFlValue(String module, TypeDeclaration type, String variableName) { return 'fl_value_new_double($variableName)'; } else if (type.baseName == 'String') { return 'fl_value_new_string($variableName)'; + } else if (type.baseName == 'Uint8List') { + return 'fl_value_new_uint8_list($variableName, $lengthVariableName)'; + } else if (type.baseName == 'Int32List') { + return 'fl_value_new_int32_list($variableName, $lengthVariableName)'; + } else if (type.baseName == 'Int64List') { + return 'fl_value_new_int64_list($variableName, $lengthVariableName)'; + } else if (type.baseName == 'Float32List') { + return 'fl_value_new_float32_list($variableName, $lengthVariableName)'; + } else if (type.baseName == 'Float64List') { + return 'fl_value_new_float_list($variableName, $lengthVariableName)'; } else { throw Exception('Unknown type ${type.baseName}'); } @@ -1312,6 +1419,16 @@ String _fromFlValue(String module, TypeDeclaration type, String variableName) { return 'fl_value_get_double($variableName)'; } else if (type.baseName == 'String') { return 'fl_value_get_string($variableName)'; + } else if (type.baseName == 'Uint8List') { + return 'fl_value_get_uint8_list($variableName)'; + } else if (type.baseName == 'Int32List') { + return 'fl_value_get_int32_list($variableName)'; + } else if (type.baseName == 'Int64List') { + return 'fl_value_get_int64_list($variableName)'; + } else if (type.baseName == 'Float32List') { + return 'fl_value_get_float32_list($variableName)'; + } else if (type.baseName == 'Float64List') { + return 'fl_value_get_float_list($variableName)'; } else { throw Exception('Unknown type ${type.baseName}'); } From fb93d79c9a2c4128eae6b8db5afd1fa12f60f9b8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 13:12:48 +1200 Subject: [PATCH 025/127] update test --- packages/pigeon/test/gobject_generator_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 46a6847074a8..2ea55c7d079b 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -673,7 +673,7 @@ void main() { expect( code, contains( - ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(fl_value_get_list_value(message, 0)), fl_value_get_int(fl_value_get_list_value(message, 1)), fl_value_get_string(fl_value_get_list_value(message, 2)), fl_value_get_list_value(message, 3), fl_value_get_list_value(message, 4), TEST_PACKAGE_PARAMETER_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 5))), TEST_PACKAGE_OBJECT(fl_value_get_custom_value_object(fl_value_get_list_value(message, 6))), self->user_data);')); + ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(value0), fl_value_get_int(value1), fl_value_get_string(value2), value3, value4, TEST_PACKAGE_PARAMETER_OBJECT(fl_value_get_custom_value_object(value5)), TEST_PACKAGE_OBJECT(fl_value_get_custom_value_object(value6)), self->user_data);')); } }); From b5c1b7df48f84831cb6d6afd345c6d6197f33cff Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 14:03:44 +1200 Subject: [PATCH 026/127] Fix analyze --- packages/pigeon/lib/gobject_generator.dart | 8 ++++---- packages/pigeon/lib/pigeon.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 2f827c723ed0..8dcec41b3de5 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -319,7 +319,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); - final List constructorArgs = [ + final List constructorArgs = [ '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; @@ -350,7 +350,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { methodArgs.add('size_t ${name}_length'); } } - methodArgs.addAll([ + methodArgs.addAll([ if (method.isAsynchronous) 'FlBasicMessageChannelResponseHandle* response_handle', 'gpointer user_data', @@ -634,7 +634,7 @@ class GObjectSourceGenerator extends StructuredGenerator { asyncArgs.add('size_t ${name}_length'); } } - asyncArgs.addAll([ + asyncArgs.addAll([ 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data', @@ -753,7 +753,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); - final List constructorArgs = [ + final List constructorArgs = [ '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; diff --git a/packages/pigeon/lib/pigeon.dart b/packages/pigeon/lib/pigeon.dart index 4bc96ca1026a..53087ae7877a 100644 --- a/packages/pigeon/lib/pigeon.dart +++ b/packages/pigeon/lib/pigeon.dart @@ -6,9 +6,9 @@ export 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; export 'cpp_generator.dart' show CppOptions; export 'dart_generator.dart' show DartOptions; +export 'gobject_generator.dart' show GObjectOptions; export 'java_generator.dart' show JavaOptions; export 'kotlin_generator.dart' show KotlinOptions; -export 'gobject_generator.dart' show GObjectOptions; export 'objc_generator.dart' show ObjcOptions; export 'pigeon_lib.dart'; export 'swift_generator.dart' show SwiftOptions; From 51a294b9a06f4b5b349560f6c73ac2120d84f631 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 14:08:32 +1200 Subject: [PATCH 027/127] Fix void return value cases --- packages/pigeon/lib/gobject_generator.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 8dcec41b3de5..bb1cad5157c4 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -320,7 +320,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); final List constructorArgs = [ - '$returnType return_value', + if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeln( @@ -374,7 +374,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { final List respondArgs = [ '$className* self', 'FlBasicMessageChannelResponseHandle* response_handle', - '$returnType return_value', + if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeln( @@ -754,7 +754,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final String returnType = _getType(module, method.returnType); indent.newln(); final List constructorArgs = [ - '$returnType return_value', + if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeScoped( @@ -927,13 +927,16 @@ class GObjectSourceGenerator extends StructuredGenerator { final List respondArgs = [ '$className* self', 'FlBasicMessageChannelResponseHandle* response_handle', - '$returnType return_value' + if (returnType != 'void') '$returnType return_value' ]; indent.writeScoped( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')}) {", '}', () { + final List returnArgs = [ + if (returnType != 'void') 'return_value' + ]; indent.writeln( - 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(return_value);'); + 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(${returnArgs.join(', ')});'); indent.writeln('g_autoptr(GError) error = nullptr;'); indent.writeScoped( 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', From f4d41ef4826ea716443f5ce2249b871b200030da Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 14:48:55 +1200 Subject: [PATCH 028/127] Fix formatting --- packages/pigeon/lib/pigeon_lib.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart index f3b8f0ee27db..e2f4abcf5e3c 100644 --- a/packages/pigeon/lib/pigeon_lib.dart +++ b/packages/pigeon/lib/pigeon_lib.dart @@ -373,7 +373,8 @@ class PigeonOptions { gobjectHeaderOut: map['gobjectHeaderOut'] as String?, gobjectSourceOut: map['gobjectSourceOut'] as String?, gobjectOptions: map.containsKey('gobjectOptions') - ? GObjectOptions.fromMap(map['gobjectOptions']! as Map) + ? GObjectOptions.fromMap( + map['gobjectOptions']! as Map) : null, dartOptions: map.containsKey('dartOptions') ? DartOptions.fromMap(map['dartOptions']! as Map) @@ -802,7 +803,8 @@ class GObjectGeneratorAdapter implements GeneratorAdapter { StringSink sink, PigeonOptions options, Root root, FileType fileType) { final GObjectOptions gobjectOptions = options.gobjectOptions ?? const GObjectOptions(); - final GObjectOptions gobjectOptionsWithHeader = gobjectOptions.merge(GObjectOptions( + final GObjectOptions gobjectOptionsWithHeader = + gobjectOptions.merge(GObjectOptions( copyrightHeader: options.copyrightHeader != null ? _lineReader( path.posix.join(options.basePath ?? '', options.copyrightHeader)) @@ -2346,9 +2348,10 @@ ${_argParser.usage}'''; if (options.gobjectHeaderOut != null) { options = options.merge(PigeonOptions( - gobjectOptions: (options.gobjectOptions ?? const GObjectOptions()).merge( - GObjectOptions( - headerIncludePath: path.basename(options.gobjectHeaderOut!))))); + gobjectOptions: (options.gobjectOptions ?? const GObjectOptions()) + .merge(GObjectOptions( + headerIncludePath: + path.basename(options.gobjectHeaderOut!))))); } for (final GeneratorAdapter adapter in safeGeneratorAdapters) { From 14789cecaeddac94862b34f637d5d6f8a02bc3be Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 15:02:09 +1200 Subject: [PATCH 029/127] Fix README snippet --- packages/pigeon/example/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index a774c2e2387c..14d108d4f544 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -19,8 +19,8 @@ needed for your project. cppOptions: CppOptions(namespace: 'pigeon_example'), cppHeaderOut: 'windows/runner/messages.g.h', cppSourceOut: 'windows/runner/messages.g.cpp', - gobjectHeaderOut: 'gobject/messages.g.h', - gobjectSourceOut: 'gobject/messages.g.cc', + gobjectHeaderOut: 'linux/messages.g.h', + gobjectSourceOut: 'linux/messages.g.cc', gobjectOptions: GObjectOptions(), kotlinOut: 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/Messages.g.kt', From 5705ce9e6dece7a468b05f3280959e7749be2455 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 16 Apr 2024 16:52:58 +1200 Subject: [PATCH 030/127] Add initial nullable type support Doesn't work for returning primitive nullable types yet, e.g. 'int?' --- .../pigeon/example/app/linux/messages.g.cc | 56 ++++--- packages/pigeon/lib/gobject_generator.dart | 144 ++++++++++++++---- 2 files changed, 146 insertions(+), 54 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index e931a9e33f32..e87249c56b88 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -76,8 +76,12 @@ FlValue* pigeon_example_package_message_data_get_data( static FlValue* pigeon_example_package_message_data_to_list( PigeonExamplePackageMessageData* self) { FlValue* values = fl_value_new_list(); - fl_value_append_take(values, fl_value_new_string(self->name)); - fl_value_append_take(values, fl_value_new_string(self->description)); + fl_value_append_take(values, self->name != nullptr + ? fl_value_new_string(self->name) + : fl_value_new_null()); + fl_value_append_take(values, self->description != nullptr + ? fl_value_new_string(self->description) + : fl_value_new_null()); fl_value_append_take(values, fl_value_new_int(self->code)); fl_value_append_take(values, fl_value_ref(self->data)); return values; @@ -85,12 +89,20 @@ static FlValue* pigeon_example_package_message_data_to_list( static PigeonExamplePackageMessageData* pigeon_example_package_message_data_new_from_list(FlValue* values) { - return pigeon_example_package_message_data_new( - fl_value_get_string(fl_value_get_list_value(values, 0)), - fl_value_get_string(fl_value_get_list_value(values, 1)), - static_cast( - fl_value_get_int(fl_value_get_list_value(values, 2))), - fl_value_get_list_value(values, 3)); + FlValue* value0 = fl_value_get_list_value(values, 0); + const gchar* name = fl_value_get_type(value0) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_string(value0); + FlValue* value1 = fl_value_get_list_value(values, 1); + const gchar* description = fl_value_get_type(value1) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_string(value1); + FlValue* value2 = fl_value_get_list_value(values, 2); + PigeonExamplePackageCode code = + static_cast(fl_value_get_int(value2)); + FlValue* value3 = fl_value_get_list_value(values, 3); + FlValue* data = value3; + return pigeon_example_package_message_data_new(name, description, code, data); } G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiCodec, @@ -381,7 +393,7 @@ G_DEFINE_TYPE(PigeonExamplePackageExampleHostApi, pigeon_example_package_example_host_api, G_TYPE_OBJECT) static void get_host_language_cb( - FlBasicMessageChannel* channel, FlValue* message, + FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); @@ -406,7 +418,7 @@ static void get_host_language_cb( } } -static void add_cb(FlBasicMessageChannel* channel, FlValue* message, +static void add_cb(FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = @@ -416,11 +428,12 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, return; } - FlValue* value0 = fl_value_get_list_value(message, 0); - FlValue* value1 = fl_value_get_list_value(message, 1); + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t a = fl_value_get_int(value0); + FlValue* value1 = fl_value_get_list_value(message_, 1); + int64_t b = fl_value_get_int(value1); g_autoptr(PigeonExamplePackageExampleHostApiAddResponse) response = - self->vtable->add(self, fl_value_get_int(value0), - fl_value_get_int(value1), self->user_data); + self->vtable->add(self, a, b, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "ExampleHostApi", "add"); return; @@ -435,7 +448,7 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message, } static void send_message_cb( - FlBasicMessageChannel* channel, FlValue* message, + FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); @@ -444,11 +457,11 @@ static void send_message_cb( return; } - FlValue* value0 = fl_value_get_list_value(message, 0); - self->vtable->send_message(self, - PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( - fl_value_get_custom_value_object(value0)), - response_handle, self->user_data); + FlValue* value0 = fl_value_get_list_value(message_, 0); + PigeonExamplePackageMessageData* message = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( + fl_value_get_custom_value_object(value0)); + self->vtable->send_message(self, message, response_handle, self->user_data); } static void pigeon_example_package_example_host_api_dispose(GObject* object) { @@ -587,7 +600,8 @@ void pigeon_example_package_message_flutter_api_flutter_method( GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_string(a_string)); + fl_value_append_take(args, a_string != nullptr ? fl_value_new_string(a_string) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "flutterMethod", args, cancellable, callback, user_data); } diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index bb1cad5157c4..0c367cbeb465 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -464,6 +464,10 @@ class GObjectSourceGenerator extends StructuredGenerator { if (_isNumericListType(field.type)) { indent.writeln('size_t ${fieldName}_length;'); } + if (_isNullablePrimitiveType(field.type)) { + indent.writeln( + '${_getType(module, field.type, isOutput: true, primitive: true)} ${fieldName}_value;'); + } } }); @@ -510,7 +514,14 @@ class GObjectSourceGenerator extends StructuredGenerator { final String value = _referenceValue(field.type, fieldName, lengthVariableName: '${fieldName}_length'); - indent.writeln('self->$fieldName = $value;'); + if (_isNullablePrimitiveType(field.type)) { + indent.writeln( + 'self->${fieldName}_value = $value != nullptr ? *$value : ${_getDefaultValue(module, field.type, primitive: true)};'); + indent.writeln( + 'self->${fieldName} = $value != nullptr ? &self->${fieldName}_value : nullptr;'); + } else { + indent.writeln('self->$fieldName = $value;'); + } if (_isNumericListType(field.type)) { indent.writeln('self->${fieldName}_length = ${fieldName}_length;'); } @@ -558,8 +569,29 @@ class GObjectSourceGenerator extends StructuredGenerator { final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; - args.add(_fromFlValue( - module, field.type, 'fl_value_get_list_value(values, $i)')); + final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldType = _getType(module, field.type); + String fieldValue = _fromFlValue(module, field.type, 'value$i'); + indent + .writeln('FlValue *value$i = fl_value_get_list_value(values, $i);'); + if (_isNullablePrimitiveType(field.type)) { + indent.writeln('$fieldType $fieldName = nullptr;'); + indent.writeln( + '${_getType(module, field.type, isOutput: true, primitive: true)} ${fieldName}_value;'); + indent.writeScoped( + 'if (fl_value_get_type(value$i) != FL_VALUE_TYPE_NULL) {', '}', + () { + indent.writeln('${fieldName}_value = $fieldValue;'); + indent.writeln('$fieldName = &${fieldName}_value;'); + }); + } else { + if (field.type.isNullable) { + fieldValue = + 'fl_value_get_type(value$i) == FL_VALUE_TYPE_NULL ? nullptr : $fieldValue'; + } + indent.writeln('$fieldType $fieldName = $fieldValue;'); + } + args.add(fieldName); } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); }); @@ -806,7 +838,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', + 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { _writeCastSelf(indent, module, api.name, 'user_data'); @@ -817,20 +849,39 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('return;'); }); + indent.newln(); final List methodArgs = []; for (int i = 0; i < method.parameters.length; i++) { - methodArgs - .add(_fromFlValue(module, method.parameters[i].type, 'value$i')); + final Parameter param = method.parameters[i]; + final String paramName = _snakeCaseFromCamelCase(param.name); + final String paramType = _getType(module, param.type); + indent.writeln( + 'FlValue* value$i = fl_value_get_list_value(message_, $i);'); + if (_isNullablePrimitiveType(param.type)) { + final String primitiveType = + _getType(module, param.type, primitive: true); + indent.writeln('$paramType $paramName = nullptr;'); + indent.writeln('$primitiveType ${paramName}_value;'); + indent.writeScoped( + 'if (fl_value_get_type(value$i) != FL_VALUE_TYPE_NULL) {', '}', + () { + final String paramValue = + _fromFlValue(module, method.parameters[i].type, 'value$i'); + indent.writeln('${paramName}_value = $paramValue;'); + indent.writeln('$paramName = &${paramName}_value;'); + }); + } else { + final String paramValue = + _fromFlValue(module, method.parameters[i].type, 'value$i'); + indent.writeln('$paramType $paramName = $paramValue;'); + } + methodArgs.add(paramName); if (_isNumericListType(method.parameters[i].type)) { - methodArgs.add('fl_value_get_length(value$i)'); + indent.writeln( + 'size_t ${paramName}_length = fl_value_get_length(value$i);'); + methodArgs.add('${paramName}_length'); } } - - indent.newln(); - for (int i = 0; i < method.parameters.length; i++) { - indent.writeln( - 'FlValue* value$i = fl_value_get_list_value(message, $i);'); - } if (method.isAsynchronous) { final List vfuncArgs = ['self']; vfuncArgs.addAll(methodArgs); @@ -1264,21 +1315,23 @@ String _getEnumValue(String module, String enumName, String memberName) { } // Returns code for storing a value of [type]. -String _getType(String module, TypeDeclaration type, {bool isOutput = false}) { +String _getType(String module, TypeDeclaration type, + {bool isOutput = false, bool primitive = false}) { if (type.isClass) { return '${_getClassName(module, type.baseName)}*'; } else if (type.isEnum) { - return _getClassName(module, type.baseName); + final String name = _getClassName(module, type.baseName); + return type.isNullable ? '$name*' : name; } else if (type.baseName == 'List' || type.baseName == 'Map') { return 'FlValue*'; } else if (type.baseName == 'void') { return 'void'; } else if (type.baseName == 'bool') { - return 'gboolean'; + return type.isNullable && !primitive ? 'gboolean*' : 'gboolean'; } else if (type.baseName == 'int') { - return 'int64_t'; + return type.isNullable && !primitive ? 'int64_t*' : 'int64_t'; } else if (type.baseName == 'double') { - return 'double'; + return type.isNullable && !primitive ? 'double*' : 'double'; } else if (type.baseName == 'String') { return isOutput ? 'gchar*' : 'const gchar*'; } else if (type.baseName == 'Uint8List') { @@ -1305,6 +1358,17 @@ bool _isNumericListType(TypeDeclaration type) { type.baseName == 'Float64List'; } +// Returns true if [type] is a nullable type with a primitive native data type. +bool _isNullablePrimitiveType(TypeDeclaration type) { + if (!type.isNullable) { + return false; + } + + return type.baseName == 'bool' || + type.baseName == 'int' || + type.baseName == 'double'; +} + // Returns code to clear a value stored in [variableName], or null if no function required. String? _getClearFunction(TypeDeclaration type, String variableName) { if (type.isClass) { @@ -1319,8 +1383,9 @@ String? _getClearFunction(TypeDeclaration type, String variableName) { } // Returns code for the default value for [type]. -String _getDefaultValue(String module, TypeDeclaration type) { - if (type.isClass) { +String _getDefaultValue(String module, TypeDeclaration type, + {primitive = false}) { + if (type.isClass || (type.isNullable && !primitive)) { return 'nullptr'; } else if (type.isEnum) { final String enumName = _getClassName(module, type.baseName); @@ -1373,35 +1438,48 @@ String _referenceValue(TypeDeclaration type, String variableName, // [lengthVariableName] must be provided for the typed numeric *List types. String _makeFlValue(String module, TypeDeclaration type, String variableName, {String? lengthVariableName}) { + final String value; if (type.isClass) { - return 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; + value = 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; } else if (type.isEnum) { - return 'fl_value_new_int($variableName)'; + value = 'fl_value_new_int($variableName)'; } else if (type.baseName == 'List' || type.baseName == 'Map') { - return 'fl_value_ref($variableName)'; + value = 'fl_value_ref($variableName)'; } else if (type.baseName == 'void') { - return 'fl_value_new_null()'; + value = 'fl_value_new_null()'; } else if (type.baseName == 'bool') { - return 'fl_value_new_bool($variableName)'; + value = type.isNullable + ? 'fl_value_new_bool(*$variableName)' + : 'fl_value_new_bool($variableName)'; } else if (type.baseName == 'int') { - return 'fl_value_new_int($variableName)'; + value = type.isNullable + ? 'fl_value_new_int(*$variableName)' + : 'fl_value_new_int($variableName)'; } else if (type.baseName == 'double') { - return 'fl_value_new_double($variableName)'; + value = type.isNullable + ? 'fl_value_new_double(*$variableName)' + : 'fl_value_new_double($variableName)'; } else if (type.baseName == 'String') { - return 'fl_value_new_string($variableName)'; + value = 'fl_value_new_string($variableName)'; } else if (type.baseName == 'Uint8List') { - return 'fl_value_new_uint8_list($variableName, $lengthVariableName)'; + value = 'fl_value_new_uint8_list($variableName, $lengthVariableName)'; } else if (type.baseName == 'Int32List') { - return 'fl_value_new_int32_list($variableName, $lengthVariableName)'; + value = 'fl_value_new_int32_list($variableName, $lengthVariableName)'; } else if (type.baseName == 'Int64List') { - return 'fl_value_new_int64_list($variableName, $lengthVariableName)'; + value = 'fl_value_new_int64_list($variableName, $lengthVariableName)'; } else if (type.baseName == 'Float32List') { - return 'fl_value_new_float32_list($variableName, $lengthVariableName)'; + value = 'fl_value_new_float32_list($variableName, $lengthVariableName)'; } else if (type.baseName == 'Float64List') { - return 'fl_value_new_float_list($variableName, $lengthVariableName)'; + value = 'fl_value_new_float_list($variableName, $lengthVariableName)'; } else { throw Exception('Unknown type ${type.baseName}'); } + + if (type.isNullable) { + return '$variableName != nullptr ? $value : fl_value_new_null()'; + } else { + return value; + } } // Returns code to convert the FlValue stored in [variableName] to a native data type. From a4958b52ade43892a814eba2b3e660bdabf3c939 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 5 Apr 2024 11:17:39 -0400 Subject: [PATCH 031/127] Unchanged boilerplate --- .../test_plugin/example/linux/.gitignore | 1 + .../test_plugin/example/linux/CMakeLists.txt | 147 ++++++++++++++++++ .../example/linux/flutter/CMakeLists.txt | 88 +++++++++++ .../test_plugin/example/linux/main.cc | 6 + .../example/linux/my_application.cc | 127 +++++++++++++++ .../example/linux/my_application.h | 18 +++ .../test_plugin/linux/CMakeLists.txt | 94 +++++++++++ .../linux/include/test_plugin/test_plugin.h | 26 ++++ .../linux/test/test_plugin_test.cc | 32 ++++ .../test_plugin/linux/test_plugin.cc | 72 +++++++++ .../test_plugin/linux/test_plugin_private.h | 10 ++ 11 files changed, 621 insertions(+) create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/.gitignore create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/flutter/CMakeLists.txt create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/main.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/.gitignore b/packages/pigeon/platform_tests/test_plugin/example/linux/.gitignore new file mode 100644 index 000000000000..d3896c98444f --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt new file mode 100644 index 000000000000..8bd5d1b7dcfb --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt @@ -0,0 +1,147 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "test_plugin_example") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.test_plugin") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + +# Enable the test target. +set(include_test_plugin_tests TRUE) + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/CMakeLists.txt new file mode 100644 index 000000000000..d5bd01648a96 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc b/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc new file mode 100644 index 000000000000..e7c5c5437037 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc new file mode 100644 index 000000000000..a340096bbf7e --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc @@ -0,0 +1,127 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "test_plugin_example"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "test_plugin_example"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h new file mode 100644 index 000000000000..72271d5e4170 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt new file mode 100644 index 000000000000..2c788cbf358c --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt @@ -0,0 +1,94 @@ +# The Flutter tooling requires that developers have CMake 3.10 or later +# installed. You should not increase this version, as doing so will cause +# the plugin to fail to compile for some customers of the plugin. +cmake_minimum_required(VERSION 3.10) + +# Project-level configuration. +set(PROJECT_NAME "test_plugin") +project(${PROJECT_NAME} LANGUAGES CXX) + +# This value is used when generating builds using this plugin, so it must +# not be changed. +set(PLUGIN_NAME "test_plugin_plugin") + +# Any new source files that you add to the plugin should be added here. +list(APPEND PLUGIN_SOURCES + "test_plugin.cc" +) + +# Define the plugin library target. Its name must not be changed (see comment +# on PLUGIN_NAME above). +add_library(${PLUGIN_NAME} SHARED + ${PLUGIN_SOURCES} +) + +# Apply a standard set of build settings that are configured in the +# application-level CMakeLists.txt. This can be removed for plugins that want +# full control over build settings. +apply_standard_settings(${PLUGIN_NAME}) + +# Symbols are hidden by default to reduce the chance of accidental conflicts +# between plugins. This should not be removed; any symbols that should be +# exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro. +set_target_properties(${PLUGIN_NAME} PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) + +# Source include directories and library dependencies. Add any plugin-specific +# dependencies here. +target_include_directories(${PLUGIN_NAME} INTERFACE + "${CMAKE_CURRENT_SOURCE_DIR}/include") +target_link_libraries(${PLUGIN_NAME} PRIVATE flutter) +target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK) + +# List of absolute paths to libraries that should be bundled with the plugin. +# This list could contain prebuilt libraries, or libraries created by an +# external build triggered from this build file. +set(test_plugin_bundled_libraries + "" + PARENT_SCOPE +) + +# === Tests === +# These unit tests can be run from a terminal after building the example. + +# Only enable test builds when building the example (which sets this variable) +# so that plugin clients aren't building the tests. +if (${include_${PROJECT_NAME}_tests}) +if(${CMAKE_VERSION} VERSION_LESS "3.11.0") +message("Unit tests require CMake 3.11.0 or later") +else() +set(TEST_RUNNER "${PROJECT_NAME}_test") +enable_testing() + +# Add the Google Test dependency. +include(FetchContent) +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/release-1.11.0.zip +) +# Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +# Disable install commands for gtest so it doesn't end up in the bundle. +set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of googletest" FORCE) + +FetchContent_MakeAvailable(googletest) + +# The plugin's exported API is not very useful for unit testing, so build the +# sources directly into the test binary rather than using the shared library. +add_executable(${TEST_RUNNER} + test/test_plugin_test.cc + ${PLUGIN_SOURCES} +) +apply_standard_settings(${TEST_RUNNER}) +target_include_directories(${TEST_RUNNER} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(${TEST_RUNNER} PRIVATE flutter) +target_link_libraries(${TEST_RUNNER} PRIVATE PkgConfig::GTK) +target_link_libraries(${TEST_RUNNER} PRIVATE gtest_main gmock) + +# Enable automatic test discovery. +include(GoogleTest) +gtest_discover_tests(${TEST_RUNNER}) + +endif() # CMake version check +endif() # include_${PROJECT_NAME}_tests \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h new file mode 100644 index 000000000000..0cd657e04758 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h @@ -0,0 +1,26 @@ +#ifndef FLUTTER_PLUGIN_TEST_PLUGIN_H_ +#define FLUTTER_PLUGIN_TEST_PLUGIN_H_ + +#include + +G_BEGIN_DECLS + +#ifdef FLUTTER_PLUGIN_IMPL +#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default"))) +#else +#define FLUTTER_PLUGIN_EXPORT +#endif + +typedef struct _TestPlugin TestPlugin; +typedef struct { + GObjectClass parent_class; +} TestPluginClass; + +FLUTTER_PLUGIN_EXPORT GType test_plugin_get_type(); + +FLUTTER_PLUGIN_EXPORT void test_plugin_register_with_registrar( + FlPluginRegistrar* registrar); + +G_END_DECLS + +#endif // FLUTTER_PLUGIN_TEST_PLUGIN_H_ diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc new file mode 100644 index 000000000000..3f1bbd491415 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc @@ -0,0 +1,32 @@ +#include "include/test_plugin/test_plugin.h" + +#include +#include +#include + +#include "test_plugin_private.h" + +// This demonstrates a simple unit test of the C portion of this plugin's +// implementation. +// +// Once you have built the plugin's example app, you can run these tests +// from the command line. For instance, for a plugin called my_plugin +// built for x64 debug, run: +// $ build/linux/x64/debug/plugins/my_plugin/my_plugin_test + +namespace test_plugin { +namespace test { + +TEST(TestPlugin, GetPlatformVersion) { + g_autoptr(FlMethodResponse) response = get_platform_version(); + ASSERT_NE(response, nullptr); + ASSERT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response)); + FlValue* result = fl_method_success_response_get_result( + FL_METHOD_SUCCESS_RESPONSE(response)); + ASSERT_EQ(fl_value_get_type(result), FL_VALUE_TYPE_STRING); + // The full string varies, so just validate that it has the right format. + EXPECT_THAT(fl_value_get_string(result), testing::StartsWith("Linux ")); +} + +} // namespace test +} // namespace test_plugin diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc new file mode 100644 index 000000000000..2f177157400f --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -0,0 +1,72 @@ +#include "include/test_plugin/test_plugin.h" + +#include +#include +#include + +#include + +#include "test_plugin_private.h" + +#define TEST_PLUGIN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), test_plugin_get_type(), TestPlugin)) + +struct _TestPlugin { + GObject parent_instance; +}; + +G_DEFINE_TYPE(TestPlugin, test_plugin, g_object_get_type()) + +// Called when a method call is received from Flutter. +static void test_plugin_handle_method_call(TestPlugin* self, + FlMethodCall* method_call) { + g_autoptr(FlMethodResponse) response = nullptr; + + const gchar* method = fl_method_call_get_name(method_call); + + if (strcmp(method, "getPlatformVersion") == 0) { + response = get_platform_version(); + } else { + response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new()); + } + + fl_method_call_respond(method_call, response, nullptr); +} + +FlMethodResponse* get_platform_version() { + struct utsname uname_data = {}; + uname(&uname_data); + g_autofree gchar* version = g_strdup_printf("Linux %s", uname_data.version); + g_autoptr(FlValue) result = fl_value_new_string(version); + return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); +} + +static void test_plugin_dispose(GObject* object) { + G_OBJECT_CLASS(test_plugin_parent_class)->dispose(object); +} + +static void test_plugin_class_init(TestPluginClass* klass) { + G_OBJECT_CLASS(klass)->dispose = test_plugin_dispose; +} + +static void test_plugin_init(TestPlugin* self) {} + +static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, + gpointer user_data) { + TestPlugin* plugin = TEST_PLUGIN(user_data); + test_plugin_handle_method_call(plugin, method_call); +} + +void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { + TestPlugin* plugin = + TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); + + g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); + g_autoptr(FlMethodChannel) channel = + fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), + "test_plugin", FL_METHOD_CODEC(codec)); + fl_method_channel_set_method_call_handler( + channel, method_call_cb, g_object_ref(plugin), g_object_unref); + + g_object_unref(plugin); +} diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h new file mode 100644 index 000000000000..d4160b343acf --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h @@ -0,0 +1,10 @@ +#include + +#include "include/test_plugin/test_plugin.h" + +// This file exposes some plugin internals for unit testing. See +// https://github.com/flutter/flutter/issues/88724 for current limitations +// in the unit-testable API. + +// Handles the getPlatformVersion method call. +FlMethodResponse* get_platform_version(); From 5aadccded3cedc33264757ec94f293b3c8ea9ce8 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 5 Apr 2024 11:21:35 -0400 Subject: [PATCH 032/127] Add licenses to boilerplate --- .../pigeon/platform_tests/test_plugin/example/linux/main.cc | 4 ++++ .../test_plugin/example/linux/my_application.cc | 4 ++++ .../platform_tests/test_plugin/example/linux/my_application.h | 4 ++++ .../test_plugin/linux/include/test_plugin/test_plugin.h | 4 ++++ .../platform_tests/test_plugin/linux/test/test_plugin_test.cc | 4 ++++ .../pigeon/platform_tests/test_plugin/linux/test_plugin.cc | 4 ++++ .../platform_tests/test_plugin/linux/test_plugin_private.h | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc b/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc index e7c5c5437037..1507d02825e7 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/main.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "my_application.h" int main(int argc, char** argv) { diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc index a340096bbf7e..2c91863a8049 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "my_application.h" #include diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h index 72271d5e4170..6e9f0c3ff665 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/my_application.h @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #ifndef FLUTTER_MY_APPLICATION_H_ #define FLUTTER_MY_APPLICATION_H_ diff --git a/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h index 0cd657e04758..99b50d2368d4 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #ifndef FLUTTER_PLUGIN_TEST_PLUGIN_H_ #define FLUTTER_PLUGIN_TEST_PLUGIN_H_ diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc index 3f1bbd491415..9f8e24b3b3ee 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "include/test_plugin/test_plugin.h" #include diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 2f177157400f..140703beb5d6 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "include/test_plugin/test_plugin.h" #include diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h index d4160b343acf..c4f53faa4bf6 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin_private.h @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include #include "include/test_plugin/test_plugin.h" From 84a7d5c7446830906ac5644ec30fe155d7b7a0e8 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 5 Apr 2024 12:46:03 -0400 Subject: [PATCH 033/127] Wire up Linux test suites --- .../test_plugin/example/linux/CMakeLists.txt | 10 ++-- packages/pigeon/tool/run_tests.dart | 4 +- packages/pigeon/tool/shared/generation.dart | 20 ++++---- packages/pigeon/tool/shared/test_suites.dart | 48 +++++++++++++++---- packages/pigeon/tool/test.dart | 5 ++ 5 files changed, 64 insertions(+), 23 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt index 8bd5d1b7dcfb..972ceb58f205 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/CMakeLists.txt @@ -5,6 +5,7 @@ project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. set(BINARY_NAME "test_plugin_example") + # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.example.test_plugin") @@ -46,6 +47,9 @@ function(APPLY_STANDARD_SETTINGS TARGET) target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") endfunction() +# Enable the test target. +set(include_test_plugin_tests TRUE) + # Flutter library and tool build rules. set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") add_subdirectory(${FLUTTER_MANAGED_DIR}) @@ -93,11 +97,11 @@ set(include_test_plugin_tests TRUE) # them to the application. include(flutter/generated_plugins.cmake) - # === Installation === # By default, "installing" just makes a relocatable bundle in the build # directory. set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() @@ -128,8 +132,8 @@ endforeach(bundled_library) # Copy the native assets provided by the build.dart from all packages. set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. diff --git a/packages/pigeon/tool/run_tests.dart b/packages/pigeon/tool/run_tests.dart index 66482e72178e..983348864d81 100644 --- a/packages/pigeon/tool/run_tests.dart +++ b/packages/pigeon/tool/run_tests.dart @@ -141,7 +141,7 @@ Set _extensionsForLanguage(GeneratorLanguage language) { return switch (language) { GeneratorLanguage.cpp => {'cc', 'cpp', 'h'}, GeneratorLanguage.dart => {'dart'}, - GeneratorLanguage.gobject => {'gobject'}, + GeneratorLanguage.gobject => {'cc', 'h'}, GeneratorLanguage.java => {'java'}, GeneratorLanguage.kotlin => {'kt'}, GeneratorLanguage.swift => {'swift'}, @@ -179,6 +179,8 @@ Future main(List args) async { androidKotlinUnitTests, androidJavaIntegrationTests, androidKotlinIntegrationTests, + linuxUnitTests, + linuxIntegrationTests, ]; const List macOSHostTests = [ iOSObjCUnitTests, diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index f03b9f982018..10aaf473f336 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -94,6 +94,8 @@ Future generateTestPigeons({required String baseDir}) async { int generateCode = await runPigeon( input: './pigeons/$input.dart', dartOut: '$sharedDartOutputBase/lib/src/generated/$input.gen.dart', + dartPackageName: 'pigeon_integration_tests', + suppressVersion: true, // Android kotlinOut: skipLanguages.contains(GeneratorLanguage.kotlin) ? null @@ -105,14 +107,6 @@ Future generateTestPigeons({required String baseDir}) async { swiftOut: skipLanguages.contains(GeneratorLanguage.swift) ? null : '$outputBase/ios/Classes/$pascalCaseName.gen.swift', - // Windows - cppHeaderOut: skipLanguages.contains(GeneratorLanguage.cpp) - ? null - : '$outputBase/windows/pigeon/$input.gen.h', - cppSourceOut: skipLanguages.contains(GeneratorLanguage.cpp) - ? null - : '$outputBase/windows/pigeon/$input.gen.cpp', - cppNamespace: '${input}_pigeontest', // Linux gobjectHeaderOut: skipLanguages.contains(GeneratorLanguage.gobject) ? null @@ -121,8 +115,14 @@ Future generateTestPigeons({required String baseDir}) async { ? null : '$outputBase/linux/pigeon/$input.gen.cc', gobjectModule: '${pascalCaseName}PigeonTest', - suppressVersion: true, - dartPackageName: 'pigeon_integration_tests', + // Windows + cppHeaderOut: skipLanguages.contains(GeneratorLanguage.cpp) + ? null + : '$outputBase/windows/pigeon/$input.gen.h', + cppSourceOut: skipLanguages.contains(GeneratorLanguage.cpp) + ? null + : '$outputBase/windows/pigeon/$input.gen.cpp', + cppNamespace: '${input}_pigeontest', ); if (generateCode != 0) { return generateCode; diff --git a/packages/pigeon/tool/shared/test_suites.dart b/packages/pigeon/tool/shared/test_suites.dart index 8f9bb7a4cb40..959ef3734654 100644 --- a/packages/pigeon/tool/shared/test_suites.dart +++ b/packages/pigeon/tool/shared/test_suites.dart @@ -43,6 +43,8 @@ const String iOSObjCUnitTests = 'ios_objc_unittests'; const String iOSObjCIntegrationTests = 'ios_objc_integration_tests'; const String iOSSwiftUnitTests = 'ios_swift_unittests'; const String iOSSwiftIntegrationTests = 'ios_swift_integration_tests'; +const String linuxUnitTests = 'linux_unittests'; +const String linuxIntegrationTests = 'linux_integration_tests'; const String macOSObjCIntegrationTests = 'macos_objc_integration_tests'; const String macOSSwiftUnitTests = 'macos_swift_unittests'; const String macOSSwiftIntegrationTests = 'macos_swift_integration_tests'; @@ -91,6 +93,12 @@ const Map testSuites = { iOSSwiftIntegrationTests: TestInfo( function: _runIOSSwiftIntegrationTests, description: 'Integration tests on generated Swift code.'), + linuxUnitTests: TestInfo( + function: _runLinuxUnitTests, + description: 'Unit tests on generated Linux C code.'), + linuxIntegrationTests: TestInfo( + function: _runLinuxIntegrationTests, + description: 'Integration tests on generated Linux C code.'), macOSObjCIntegrationTests: TestInfo( function: _runMacOSObjCIntegrationTests, description: 'Integration tests on generated Objective-C code on macOS.'), @@ -349,6 +357,33 @@ Future _runIOSSwiftIntegrationTests() async { return _runMobileIntegrationTests('iOS', _testPluginRelativePath); } +Future _runLinuxUnitTests() async { + const String examplePath = './$_testPluginRelativePath/example'; + final int compileCode = await runFlutterBuild(examplePath, 'linux'); + if (compileCode != 0) { + return compileCode; + } + + const String buildDirBase = '$examplePath/build/linux/plugins'; + const String buildRelativeBinaryPath = 'debug/test_plugin/test_plugin_test'; + const String arm64Path = '$buildDirBase/arm64/$buildRelativeBinaryPath'; + const String x64Path = '$buildDirBase/x64/$buildRelativeBinaryPath'; + if (File(arm64Path).existsSync()) { + return runProcess(arm64Path, []); + } else { + return runProcess(x64Path, []); + } +} + +Future _runLinuxIntegrationTests() async { + const String examplePath = './$_testPluginRelativePath/example'; + return runFlutterCommand( + examplePath, + 'test', + [_integrationTestFileRelativePath, '-d', 'linux'], + ); +} + Future _runWindowsUnitTests() async { const String examplePath = './$_testPluginRelativePath/example'; final int compileCode = await runFlutterBuild(examplePath, 'windows'); @@ -356,13 +391,11 @@ Future _runWindowsUnitTests() async { return compileCode; } - // Depending on the Flutter version, the build output path is different. To - // handle both master and stable, and to future-proof against the changes + // Depending on the Flutter version, the build output path may be different. + // To handle both master and stable, and to future-proof against the changes // that will happen in https://github.com/flutter/flutter/issues/129807 // - Try arm64, to future-proof against arm64 support. - // - Try x64, to cover pre-arm64 support on arm64 hosts, as well as x64 hosts - // running newer versions of Flutter. - // - Fall back to the pre-arch path, to support running against stable. + // - Try x64, to cover pre-arm64 support on arm64 hosts, as well as x64 hosts. // TODO(stuartmorgan): Remove all this when these tests no longer need to // support a version of Flutter without // https://github.com/flutter/flutter/issues/129807, and just construct the @@ -372,13 +405,10 @@ Future _runWindowsUnitTests() async { 'plugins/test_plugin/Debug/test_plugin_test.exe'; const String arm64Path = '$buildDirBase/arm64/$buildRelativeBinaryPath'; const String x64Path = '$buildDirBase/x64/$buildRelativeBinaryPath'; - const String oldPath = '$buildDirBase/$buildRelativeBinaryPath'; if (File(arm64Path).existsSync()) { return runProcess(arm64Path, []); - } else if (File(x64Path).existsSync()) { - return runProcess(x64Path, []); } else { - return runProcess(oldPath, []); + return runProcess(x64Path, []); } } diff --git a/packages/pigeon/tool/test.dart b/packages/pigeon/tool/test.dart index 4c3eab669f1d..4dea945fef7a 100644 --- a/packages/pigeon/tool/test.dart +++ b/packages/pigeon/tool/test.dart @@ -80,6 +80,10 @@ ${parser.usage}'''); iOSSwiftUnitTests, iOSSwiftIntegrationTests, ]; + const List linuxTests = [ + linuxUnitTests, + linuxIntegrationTests, + ]; const List macOSTests = [ macOSObjCIntegrationTests, macOSSwiftUnitTests, @@ -106,6 +110,7 @@ ${parser.usage}'''); testsToRun = [ ...dartTests, ...androidTests, + ...linuxTests, ]; } else { print('Unsupported host platform.'); From f3a813f18a2e75d87862d058c61c72b0a18fa9de Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 15 Apr 2024 17:48:58 +0000 Subject: [PATCH 034/127] Fix unit test compilation and running --- .../linux/flutter/generated_plugins.cmake | 24 +++++++++++++++++++ .../platform_tests/test_plugin/pubspec.yaml | 2 ++ packages/pigeon/tool/shared/test_suites.dart | 5 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake new file mode 100644 index 000000000000..98e2c9fa93fd --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + test_plugin +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml index 75b456336e81..6d51f834156b 100644 --- a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml @@ -15,6 +15,8 @@ flutter: pluginClass: TestPlugin ios: pluginClass: TestPlugin + linux: + pluginClass: TestPlugin macos: pluginClass: TestPlugin windows: diff --git a/packages/pigeon/tool/shared/test_suites.dart b/packages/pigeon/tool/shared/test_suites.dart index 959ef3734654..8b3222b73656 100644 --- a/packages/pigeon/tool/shared/test_suites.dart +++ b/packages/pigeon/tool/shared/test_suites.dart @@ -364,8 +364,9 @@ Future _runLinuxUnitTests() async { return compileCode; } - const String buildDirBase = '$examplePath/build/linux/plugins'; - const String buildRelativeBinaryPath = 'debug/test_plugin/test_plugin_test'; + const String buildDirBase = '$examplePath/build/linux'; + const String buildRelativeBinaryPath = + 'debug/plugins/test_plugin/test_plugin_test'; const String arm64Path = '$buildDirBase/arm64/$buildRelativeBinaryPath'; const String x64Path = '$buildDirBase/x64/$buildRelativeBinaryPath'; if (File(arm64Path).existsSync()) { From 6300d08dec460f91202e6464097954475245445c Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 15 Apr 2024 18:47:38 +0000 Subject: [PATCH 035/127] Add generated files to compilation; currently fails --- .../test_plugin/linux/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt index 2c788cbf358c..f37b200815d0 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt +++ b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt @@ -14,6 +14,23 @@ set(PLUGIN_NAME "test_plugin_plugin") # Any new source files that you add to the plugin should be added here. list(APPEND PLUGIN_SOURCES "test_plugin.cc" + # Generated sources. + "pigeon/core_tests.gen.cc" + "pigeon/core_tests.gen.h" + "pigeon/enum.gen.cc" + "pigeon/enum.gen.h" + "pigeon/message.gen.cc" + "pigeon/message.gen.h" + "pigeon/multiple_arity.gen.cc" + "pigeon/multiple_arity.gen.h" + "pigeon/non_null_fields.gen.cc" + "pigeon/non_null_fields.gen.h" + "pigeon/null_fields.gen.cc" + "pigeon/null_fields.gen.h" + "pigeon/nullable_returns.gen.cc" + "pigeon/nullable_returns.gen.h" + "pigeon/primitive.gen.cc" + "pigeon/primitive.gen.h" ) # Define the plugin library target. Its name must not be changed (see comment @@ -77,6 +94,7 @@ FetchContent_MakeAvailable(googletest) # The plugin's exported API is not very useful for unit testing, so build the # sources directly into the test binary rather than using the shared library. add_executable(${TEST_RUNNER} + # TODO(stuartmorgan): Add real tests. test/test_plugin_test.cc ${PLUGIN_SOURCES} ) From ce7f90bcfbb2705ec553ccca323c73c0d5bdab33 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 16 Apr 2024 11:52:04 -0400 Subject: [PATCH 036/127] Analyzer fixes --- packages/pigeon/lib/gobject_generator.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 0c367cbeb465..ca4cb41df53a 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -518,7 +518,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln( 'self->${fieldName}_value = $value != nullptr ? *$value : ${_getDefaultValue(module, field.type, primitive: true)};'); indent.writeln( - 'self->${fieldName} = $value != nullptr ? &self->${fieldName}_value : nullptr;'); + 'self->$fieldName = $value != nullptr ? &self->${fieldName}_value : nullptr;'); } else { indent.writeln('self->$fieldName = $value;'); } @@ -1384,7 +1384,7 @@ String? _getClearFunction(TypeDeclaration type, String variableName) { // Returns code for the default value for [type]. String _getDefaultValue(String module, TypeDeclaration type, - {primitive = false}) { + {bool primitive = false}) { if (type.isClass || (type.isNullable && !primitive)) { return 'nullptr'; } else if (type.isEnum) { From 617ab2b683f194efc8a4ec89851c2d28cd620289 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 16 Apr 2024 11:56:20 -0400 Subject: [PATCH 037/127] Add initial Object support --- packages/pigeon/lib/gobject_generator.dart | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index ca4cb41df53a..d03b4b43faad 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1322,7 +1322,7 @@ String _getType(String module, TypeDeclaration type, } else if (type.isEnum) { final String name = _getClassName(module, type.baseName); return type.isNullable ? '$name*' : name; - } else if (type.baseName == 'List' || type.baseName == 'Map') { + } else if (_isFlValueWrappedType(type)) { return 'FlValue*'; } else if (type.baseName == 'void') { return 'void'; @@ -1369,11 +1369,19 @@ bool _isNullablePrimitiveType(TypeDeclaration type) { type.baseName == 'double'; } +/// Whether [type] is a type that needs to stay an FLValue* since it can't be +/// expressed as a more concrete type. +bool _isFlValueWrappedType(TypeDeclaration type) { + return type.baseName == 'List' || + type.baseName == 'Map' || + type.baseName == 'Object'; +} + // Returns code to clear a value stored in [variableName], or null if no function required. String? _getClearFunction(TypeDeclaration type, String variableName) { if (type.isClass) { return 'g_clear_object(&$variableName)'; - } else if (type.baseName == 'List' || type.baseName == 'Map') { + } else if (_isFlValueWrappedType(type)) { return 'g_clear_pointer(&$variableName, fl_value_unref)'; } else if (type.baseName == 'String') { return 'g_clear_pointer(&$variableName, g_free)'; @@ -1390,7 +1398,7 @@ String _getDefaultValue(String module, TypeDeclaration type, } else if (type.isEnum) { final String enumName = _getClassName(module, type.baseName); return 'static_cast<$enumName>(0)'; - } else if (type.baseName == 'List' || type.baseName == 'Map') { + } else if (_isFlValueWrappedType(type)) { return 'nullptr'; } else if (type.baseName == 'void') { return ''; @@ -1414,7 +1422,7 @@ String _getDefaultValue(String module, TypeDeclaration type, // [lengthVariableName] must be provided for the typed numeric *List types. String _referenceValue(TypeDeclaration type, String variableName, {String? lengthVariableName}) { - if (type.isClass || type.baseName == 'List' || type.baseName == 'Map') { + if (type.isClass || _isFlValueWrappedType(type)) { return 'g_object_ref($variableName)'; } else if (type.baseName == 'String') { return 'g_strdup($variableName)'; @@ -1443,7 +1451,7 @@ String _makeFlValue(String module, TypeDeclaration type, String variableName, value = 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; } else if (type.isEnum) { value = 'fl_value_new_int($variableName)'; - } else if (type.baseName == 'List' || type.baseName == 'Map') { + } else if (_isFlValueWrappedType(type)) { value = 'fl_value_ref($variableName)'; } else if (type.baseName == 'void') { value = 'fl_value_new_null()'; @@ -1490,7 +1498,7 @@ String _fromFlValue(String module, TypeDeclaration type, String variableName) { } else if (type.isEnum) { final String enumName = _getClassName(module, type.baseName); return 'static_cast<$enumName>(fl_value_get_int($variableName))'; - } else if (type.baseName == 'List' || type.baseName == 'Map') { + } else if (_isFlValueWrappedType(type)) { return variableName; } else if (type.baseName == 'bool') { return 'fl_value_get_bool($variableName)'; From ebf30c296bee7bfa150cfbb045448cf526d6f7fb Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 16 Apr 2024 11:59:05 -0400 Subject: [PATCH 038/127] Add generated files --- .../test_plugin/linux/pigeon/.gitignore | 6 + .../linux/pigeon/core_tests.gen.cc | 13677 ++++++++++++++++ .../test_plugin/linux/pigeon/core_tests.gen.h | 1955 +++ 3 files changed, 15638 insertions(+) create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/pigeon/.gitignore create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/.gitignore b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/.gitignore new file mode 100644 index 000000000000..3c556db82870 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/.gitignore @@ -0,0 +1,6 @@ +# TODO(stuartmorgan): Remove this, so that review will show the effects of +# changes on generated files, once https://github.com/flutter/flutter/issues/115168 +# is done. +*.gen.h +*.gen.cc +!core_tests.gen* diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc new file mode 100644 index 000000000000..9bfaeee87638 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -0,0 +1,13677 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#include "core_tests.gen.h" + +struct _CoreTestsPigeonTestAllTypes { + GObject parent_instance; + + gboolean a_bool; + int64_t an_int; + int64_t an_int64; + double a_double; + uint8_t* a_byte_array; + size_t a_byte_array_length; + int32_t* a4_byte_array; + size_t a4_byte_array_length; + int64_t* a8_byte_array; + size_t a8_byte_array_length; + double* a_float_array; + size_t a_float_array_length; + FlValue* a_list; + FlValue* a_map; + CoreTestsPigeonTestAnEnum an_enum; + gchar* a_string; + FlValue* an_object; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestAllTypes, core_tests_pigeon_test_all_types, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_all_types_dispose(GObject* object) { + CoreTestsPigeonTestAllTypes* self = CORE_TESTS_PIGEON_TEST_ALL_TYPES(object); + g_clear_pointer(&self->a_list, fl_value_unref); + g_clear_pointer(&self->a_map, fl_value_unref); + g_clear_pointer(&self->a_string, g_free); + g_clear_pointer(&self->an_object, fl_value_unref); + G_OBJECT_CLASS(core_tests_pigeon_test_all_types_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_all_types_init( + CoreTestsPigeonTestAllTypes* self) {} + +static void core_tests_pigeon_test_all_types_class_init( + CoreTestsPigeonTestAllTypesClass* klass) { + G_OBJECT_CLASS(klass)->dispose = core_tests_pigeon_test_all_types_dispose; +} + +CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( + gboolean a_bool, int64_t an_int, int64_t an_int64, double a_double, + const uint8_t* a_byte_array, size_t a_byte_array_length, + const int32_t* a4_byte_array, size_t a4_byte_array_length, + const int64_t* a8_byte_array, size_t a8_byte_array_length, + const double* a_float_array, size_t a_float_array_length, FlValue* a_list, + FlValue* a_map, CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, + FlValue* an_object) { + CoreTestsPigeonTestAllTypes* self = CORE_TESTS_PIGEON_TEST_ALL_TYPES( + g_object_new(core_tests_pigeon_test_all_types_get_type(), nullptr)); + self->a_bool = a_bool; + self->an_int = an_int; + self->an_int64 = an_int64; + self->a_double = a_double; + self->a_byte_array = + static_cast(g_memdup2(a_byte_array, a_byte_array_length)); + self->a_byte_array_length = a_byte_array_length; + self->a4_byte_array = static_cast( + g_memdup2(a4_byte_array, sizeof(int32_t) * a4_byte_array_length)); + self->a4_byte_array_length = a4_byte_array_length; + self->a8_byte_array = static_cast( + g_memdup2(a8_byte_array, sizeof(int64_t) * a8_byte_array_length)); + self->a8_byte_array_length = a8_byte_array_length; + self->a_float_array = static_cast( + g_memdup2(a_float_array, sizeof(double) * a_float_array_length)); + self->a_float_array_length = a_float_array_length; + self->a_list = g_object_ref(a_list); + self->a_map = g_object_ref(a_map); + self->an_enum = an_enum; + self->a_string = g_strdup(a_string); + self->an_object = g_object_ref(an_object); + return self; +} + +gboolean core_tests_pigeon_test_all_types_get_a_bool( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), FALSE); + return self->a_bool; +} + +int64_t core_tests_pigeon_test_all_types_get_an_int( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), 0); + return self->an_int; +} + +int64_t core_tests_pigeon_test_all_types_get_an_int64( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), 0); + return self->an_int64; +} + +double core_tests_pigeon_test_all_types_get_a_double( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), 0.0); + return self->a_double; +} + +const uint8_t* core_tests_pigeon_test_all_types_get_a_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + *length = self->a_byte_array_length; + return self->a_byte_array; +} + +const int32_t* core_tests_pigeon_test_all_types_get_a4_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + *length = self->a4_byte_array_length; + return self->a4_byte_array; +} + +const int64_t* core_tests_pigeon_test_all_types_get_a8_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + *length = self->a8_byte_array_length; + return self->a8_byte_array; +} + +const double* core_tests_pigeon_test_all_types_get_a_float_array( + CoreTestsPigeonTestAllTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + *length = self->a_float_array_length; + return self->a_float_array; +} + +FlValue* core_tests_pigeon_test_all_types_get_a_list( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->a_list; +} + +FlValue* core_tests_pigeon_test_all_types_get_a_map( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->a_map; +} + +CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), + static_cast(0)); + return self->an_enum; +} + +const gchar* core_tests_pigeon_test_all_types_get_a_string( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->a_string; +} + +FlValue* core_tests_pigeon_test_all_types_get_an_object( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->an_object; +} + +static FlValue* core_tests_pigeon_test_all_types_to_list( + CoreTestsPigeonTestAllTypes* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, fl_value_new_bool(self->a_bool)); + fl_value_append_take(values, fl_value_new_int(self->an_int)); + fl_value_append_take(values, fl_value_new_int(self->an_int64)); + fl_value_append_take(values, fl_value_new_double(self->a_double)); + fl_value_append_take( + values, + fl_value_new_uint8_list(self->a_byte_array, self->a_byte_array_length)); + fl_value_append_take( + values, + fl_value_new_int32_list(self->a4_byte_array, self->a4_byte_array_length)); + fl_value_append_take( + values, + fl_value_new_int64_list(self->a8_byte_array, self->a8_byte_array_length)); + fl_value_append_take( + values, + fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); + fl_value_append_take(values, fl_value_ref(self->a_list)); + fl_value_append_take(values, fl_value_ref(self->a_map)); + fl_value_append_take(values, fl_value_new_int(self->an_enum)); + fl_value_append_take(values, fl_value_new_string(self->a_string)); + fl_value_append_take(values, fl_value_ref(self->an_object)); + return values; +} + +static CoreTestsPigeonTestAllTypes* +core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { + FlValue* value0 = fl_value_get_list_value(values, 0); + gboolean a_bool = fl_value_get_bool(value0); + FlValue* value1 = fl_value_get_list_value(values, 1); + int64_t an_int = fl_value_get_int(value1); + FlValue* value2 = fl_value_get_list_value(values, 2); + int64_t an_int64 = fl_value_get_int(value2); + FlValue* value3 = fl_value_get_list_value(values, 3); + double a_double = fl_value_get_double(value3); + FlValue* value4 = fl_value_get_list_value(values, 4); + const uint8_t* a_byte_array = fl_value_get_uint8_list(value4); + FlValue* value5 = fl_value_get_list_value(values, 5); + const int32_t* a4_byte_array = fl_value_get_int32_list(value5); + FlValue* value6 = fl_value_get_list_value(values, 6); + const int64_t* a8_byte_array = fl_value_get_int64_list(value6); + FlValue* value7 = fl_value_get_list_value(values, 7); + const double* a_float_array = fl_value_get_float_list(value7); + FlValue* value8 = fl_value_get_list_value(values, 8); + FlValue* a_list = value8; + FlValue* value9 = fl_value_get_list_value(values, 9); + FlValue* a_map = value9; + FlValue* value10 = fl_value_get_list_value(values, 10); + CoreTestsPigeonTestAnEnum an_enum = + static_cast(fl_value_get_int(value10)); + FlValue* value11 = fl_value_get_list_value(values, 11); + const gchar* a_string = fl_value_get_string(value11); + FlValue* value12 = fl_value_get_list_value(values, 12); + FlValue* an_object = value12; + return core_tests_pigeon_test_all_types_new( + a_bool, an_int, an_int64, a_double, a_byte_array, a4_byte_array, + a8_byte_array, a_float_array, a_list, a_map, an_enum, a_string, + an_object); +} + +struct _CoreTestsPigeonTestAllNullableTypes { + GObject parent_instance; + + gboolean* a_nullable_bool; + gboolean a_nullable_bool_value; + int64_t* a_nullable_int; + int64_t a_nullable_int_value; + int64_t* a_nullable_int64; + int64_t a_nullable_int64_value; + double* a_nullable_double; + double a_nullable_double_value; + uint8_t* a_nullable_byte_array; + size_t a_nullable_byte_array_length; + int32_t* a_nullable4_byte_array; + size_t a_nullable4_byte_array_length; + int64_t* a_nullable8_byte_array; + size_t a_nullable8_byte_array_length; + double* a_nullable_float_array; + size_t a_nullable_float_array_length; + FlValue* a_nullable_list; + FlValue* a_nullable_map; + FlValue* nullable_nested_list; + FlValue* nullable_map_with_annotations; + FlValue* nullable_map_with_object; + CoreTestsPigeonTestAnEnum* a_nullable_enum; + gchar* a_nullable_string; + FlValue* a_nullable_object; + CoreTestsPigeonTestAllNullableTypes* all_nullable_types; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestAllNullableTypes, + core_tests_pigeon_test_all_nullable_types, G_TYPE_OBJECT) + +static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { + CoreTestsPigeonTestAllNullableTypes* self = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(object); + g_clear_pointer(&self->a_nullable_list, fl_value_unref); + g_clear_pointer(&self->a_nullable_map, fl_value_unref); + g_clear_pointer(&self->nullable_nested_list, fl_value_unref); + g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); + g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); + g_clear_pointer(&self->a_nullable_string, g_free); + g_clear_pointer(&self->a_nullable_object, fl_value_unref); + g_clear_object(&self->all_nullable_types); + G_OBJECT_CLASS(core_tests_pigeon_test_all_nullable_types_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_all_nullable_types_init( + CoreTestsPigeonTestAllNullableTypes* self) {} + +static void core_tests_pigeon_test_all_nullable_types_class_init( + CoreTestsPigeonTestAllNullableTypesClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_all_nullable_types_dispose; +} + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_nullable_types_new( + gboolean* a_nullable_bool, int64_t* a_nullable_int, + int64_t* a_nullable_int64, double* a_nullable_double, + const uint8_t* a_nullable_byte_array, size_t a_nullable_byte_array_length, + const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, + const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, + const double* a_nullable_float_array, size_t a_nullable_float_array_length, + FlValue* a_nullable_list, FlValue* a_nullable_map, + FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, + FlValue* nullable_map_with_object, + CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, + FlValue* a_nullable_object, + CoreTestsPigeonTestAllNullableTypes* all_nullable_types) { + CoreTestsPigeonTestAllNullableTypes* self = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(g_object_new( + core_tests_pigeon_test_all_nullable_types_get_type(), nullptr)); + self->a_nullable_bool_value = + a_nullable_bool != nullptr ? *a_nullable_bool : FALSE; + self->a_nullable_bool = + a_nullable_bool != nullptr ? &self->a_nullable_bool_value : nullptr; + self->a_nullable_int_value = a_nullable_int != nullptr ? *a_nullable_int : 0; + self->a_nullable_int = + a_nullable_int != nullptr ? &self->a_nullable_int_value : nullptr; + self->a_nullable_int64_value = + a_nullable_int64 != nullptr ? *a_nullable_int64 : 0; + self->a_nullable_int64 = + a_nullable_int64 != nullptr ? &self->a_nullable_int64_value : nullptr; + self->a_nullable_double_value = + a_nullable_double != nullptr ? *a_nullable_double : 0.0; + self->a_nullable_double = + a_nullable_double != nullptr ? &self->a_nullable_double_value : nullptr; + self->a_nullable_byte_array = static_cast( + g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); + self->a_nullable_byte_array_length = a_nullable_byte_array_length; + self->a_nullable4_byte_array = static_cast(g_memdup2( + a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); + self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; + self->a_nullable8_byte_array = static_cast(g_memdup2( + a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); + self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; + self->a_nullable_float_array = static_cast(g_memdup2( + a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); + self->a_nullable_float_array_length = a_nullable_float_array_length; + self->a_nullable_list = g_object_ref(a_nullable_list); + self->a_nullable_map = g_object_ref(a_nullable_map); + self->nullable_nested_list = g_object_ref(nullable_nested_list); + self->nullable_map_with_annotations = + g_object_ref(nullable_map_with_annotations); + self->nullable_map_with_object = g_object_ref(nullable_map_with_object); + self->a_nullable_enum = a_nullable_enum; + self->a_nullable_string = g_strdup(a_nullable_string); + self->a_nullable_object = g_object_ref(a_nullable_object); + self->all_nullable_types = g_object_ref(all_nullable_types); + return self; +} + +gboolean* core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_bool; +} + +int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_int; +} + +int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int64( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_int64; +} + +double* core_tests_pigeon_test_all_nullable_types_get_a_nullable_double( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_double; +} + +const uint8_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + *length = self->a_nullable_byte_array_length; + return self->a_nullable_byte_array; +} + +const int32_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable4_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + *length = self->a_nullable4_byte_array_length; + return self->a_nullable4_byte_array; +} + +const int64_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable8_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + *length = self->a_nullable8_byte_array_length; + return self->a_nullable8_byte_array; +} + +const double* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + *length = self->a_nullable_float_array_length; + return self->a_nullable_float_array; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_map( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_map; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->nullable_nested_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_annotations( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->nullable_map_with_annotations; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_object( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->nullable_map_with_object; +} + +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_enum( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_enum; +} + +const gchar* core_tests_pigeon_test_all_nullable_types_get_a_nullable_string( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_string; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_object( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->a_nullable_object; +} + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_nullable_types_get_all_nullable_types( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->all_nullable_types; +} + +static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( + CoreTestsPigeonTestAllNullableTypes* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, self->a_nullable_bool != nullptr + ? fl_value_new_bool(*self->a_nullable_bool) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_int != nullptr + ? fl_value_new_int(*self->a_nullable_int) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_int64 != nullptr + ? fl_value_new_int(*self->a_nullable_int64) + : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_double != nullptr + ? fl_value_new_double(*self->a_nullable_double) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable_byte_array != nullptr + ? fl_value_new_uint8_list(self->a_nullable_byte_array, + self->a_nullable_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable4_byte_array != nullptr + ? fl_value_new_int32_list(self->a_nullable4_byte_array, + self->a_nullable4_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable8_byte_array != nullptr + ? fl_value_new_int64_list(self->a_nullable8_byte_array, + self->a_nullable8_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable_float_array != nullptr + ? fl_value_new_float_list(self->a_nullable_float_array, + self->a_nullable_float_array_length) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_list != nullptr + ? fl_value_ref(self->a_nullable_list) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_map != nullptr + ? fl_value_ref(self->a_nullable_map) + : fl_value_new_null()); + fl_value_append_take(values, self->nullable_nested_list != nullptr + ? fl_value_ref(self->nullable_nested_list) + : fl_value_new_null()); + fl_value_append_take(values, + self->nullable_map_with_annotations != nullptr + ? fl_value_ref(self->nullable_map_with_annotations) + : fl_value_new_null()); + fl_value_append_take(values, + self->nullable_map_with_object != nullptr + ? fl_value_ref(self->nullable_map_with_object) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_enum != nullptr + ? fl_value_new_int(self->a_nullable_enum) + : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_string != nullptr + ? fl_value_new_string(self->a_nullable_string) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_object != nullptr + ? fl_value_ref(self->a_nullable_object) + : fl_value_new_null()); + fl_value_append_take(values, self->all_nullable_types != nullptr + ? fl_value_new_custom_object( + 0, G_OBJECT(self->all_nullable_types)) + : fl_value_new_null()); + return values; +} + +static CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { + FlValue* value0 = fl_value_get_list_value(values, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(values, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(values, 2); + int64_t* a_nullable_int64 = nullptr; + int64_t a_nullable_int64_value; + if (fl_value_get_type(value2) != FL_VALUE_TYPE_NULL) { + a_nullable_int64_value = fl_value_get_int(value2); + a_nullable_int64 = &a_nullable_int64_value; + } + FlValue* value3 = fl_value_get_list_value(values, 3); + double* a_nullable_double = nullptr; + double a_nullable_double_value; + if (fl_value_get_type(value3) != FL_VALUE_TYPE_NULL) { + a_nullable_double_value = fl_value_get_double(value3); + a_nullable_double = &a_nullable_double_value; + } + FlValue* value4 = fl_value_get_list_value(values, 4); + const uint8_t* a_nullable_byte_array = + fl_value_get_type(value4) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_uint8_list(value4); + FlValue* value5 = fl_value_get_list_value(values, 5); + const int32_t* a_nullable4_byte_array = + fl_value_get_type(value5) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_int32_list(value5); + FlValue* value6 = fl_value_get_list_value(values, 6); + const int64_t* a_nullable8_byte_array = + fl_value_get_type(value6) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_int64_list(value6); + FlValue* value7 = fl_value_get_list_value(values, 7); + const double* a_nullable_float_array = + fl_value_get_type(value7) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_float_list(value7); + FlValue* value8 = fl_value_get_list_value(values, 8); + FlValue* a_nullable_list = + fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; + FlValue* value9 = fl_value_get_list_value(values, 9); + FlValue* a_nullable_map = + fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; + FlValue* value10 = fl_value_get_list_value(values, 10); + FlValue* nullable_nested_list = + fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; + FlValue* value11 = fl_value_get_list_value(values, 11); + FlValue* nullable_map_with_annotations = + fl_value_get_type(value11) == FL_VALUE_TYPE_NULL ? nullptr : value11; + FlValue* value12 = fl_value_get_list_value(values, 12); + FlValue* nullable_map_with_object = + fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; + FlValue* value13 = fl_value_get_list_value(values, 13); + CoreTestsPigeonTestAnEnum* a_nullable_enum = + fl_value_get_type(value13) == FL_VALUE_TYPE_NULL + ? nullptr + : static_cast(fl_value_get_int(value13)); + FlValue* value14 = fl_value_get_list_value(values, 14); + const gchar* a_nullable_string = + fl_value_get_type(value14) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_string(value14); + FlValue* value15 = fl_value_get_list_value(values, 15); + FlValue* a_nullable_object = + fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + FlValue* value16 = fl_value_get_list_value(values, 16); + CoreTestsPigeonTestAllNullableTypes* all_nullable_types = + fl_value_get_type(value16) == FL_VALUE_TYPE_NULL + ? nullptr + : CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value16)); + return core_tests_pigeon_test_all_nullable_types_new( + a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, + a_nullable_byte_array, a_nullable4_byte_array, a_nullable8_byte_array, + a_nullable_float_array, a_nullable_list, a_nullable_map, + nullable_nested_list, nullable_map_with_annotations, + nullable_map_with_object, a_nullable_enum, a_nullable_string, + a_nullable_object, all_nullable_types); +} + +struct _CoreTestsPigeonTestAllNullableTypesWithoutRecursion { + GObject parent_instance; + + gboolean* a_nullable_bool; + gboolean a_nullable_bool_value; + int64_t* a_nullable_int; + int64_t a_nullable_int_value; + int64_t* a_nullable_int64; + int64_t a_nullable_int64_value; + double* a_nullable_double; + double a_nullable_double_value; + uint8_t* a_nullable_byte_array; + size_t a_nullable_byte_array_length; + int32_t* a_nullable4_byte_array; + size_t a_nullable4_byte_array_length; + int64_t* a_nullable8_byte_array; + size_t a_nullable8_byte_array_length; + double* a_nullable_float_array; + size_t a_nullable_float_array_length; + FlValue* a_nullable_list; + FlValue* a_nullable_map; + FlValue* nullable_nested_list; + FlValue* nullable_map_with_annotations; + FlValue* nullable_map_with_object; + CoreTestsPigeonTestAnEnum* a_nullable_enum; + gchar* a_nullable_string; + FlValue* a_nullable_object; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestAllNullableTypesWithoutRecursion, + core_tests_pigeon_test_all_nullable_types_without_recursion, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_all_nullable_types_without_recursion_dispose( + GObject* object) { + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(object); + g_clear_pointer(&self->a_nullable_list, fl_value_unref); + g_clear_pointer(&self->a_nullable_map, fl_value_unref); + g_clear_pointer(&self->nullable_nested_list, fl_value_unref); + g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); + g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); + g_clear_pointer(&self->a_nullable_string, g_free); + g_clear_pointer(&self->a_nullable_object, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_all_nullable_types_without_recursion_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_all_nullable_types_without_recursion_init( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) {} + +static void +core_tests_pigeon_test_all_nullable_types_without_recursion_class_init( + CoreTestsPigeonTestAllNullableTypesWithoutRecursionClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_all_nullable_types_without_recursion_dispose; +} + +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_all_nullable_types_without_recursion_new( + gboolean* a_nullable_bool, int64_t* a_nullable_int, + int64_t* a_nullable_int64, double* a_nullable_double, + const uint8_t* a_nullable_byte_array, size_t a_nullable_byte_array_length, + const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, + const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, + const double* a_nullable_float_array, size_t a_nullable_float_array_length, + FlValue* a_nullable_list, FlValue* a_nullable_map, + FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, + FlValue* nullable_map_with_object, + CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, + FlValue* a_nullable_object) { + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(g_object_new( + core_tests_pigeon_test_all_nullable_types_without_recursion_get_type(), + nullptr)); + self->a_nullable_bool_value = + a_nullable_bool != nullptr ? *a_nullable_bool : FALSE; + self->a_nullable_bool = + a_nullable_bool != nullptr ? &self->a_nullable_bool_value : nullptr; + self->a_nullable_int_value = a_nullable_int != nullptr ? *a_nullable_int : 0; + self->a_nullable_int = + a_nullable_int != nullptr ? &self->a_nullable_int_value : nullptr; + self->a_nullable_int64_value = + a_nullable_int64 != nullptr ? *a_nullable_int64 : 0; + self->a_nullable_int64 = + a_nullable_int64 != nullptr ? &self->a_nullable_int64_value : nullptr; + self->a_nullable_double_value = + a_nullable_double != nullptr ? *a_nullable_double : 0.0; + self->a_nullable_double = + a_nullable_double != nullptr ? &self->a_nullable_double_value : nullptr; + self->a_nullable_byte_array = static_cast( + g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); + self->a_nullable_byte_array_length = a_nullable_byte_array_length; + self->a_nullable4_byte_array = static_cast(g_memdup2( + a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); + self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; + self->a_nullable8_byte_array = static_cast(g_memdup2( + a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); + self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; + self->a_nullable_float_array = static_cast(g_memdup2( + a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); + self->a_nullable_float_array_length = a_nullable_float_array_length; + self->a_nullable_list = g_object_ref(a_nullable_list); + self->a_nullable_map = g_object_ref(a_nullable_map); + self->nullable_nested_list = g_object_ref(nullable_nested_list); + self->nullable_map_with_annotations = + g_object_ref(nullable_map_with_annotations); + self->nullable_map_with_object = g_object_ref(nullable_map_with_object); + self->a_nullable_enum = a_nullable_enum; + self->a_nullable_string = g_strdup(a_nullable_string); + self->a_nullable_object = g_object_ref(a_nullable_object); + return self; +} + +gboolean* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_bool( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_bool; +} + +int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_int; +} + +int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int64( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_int64; +} + +double* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_double( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_double; +} + +const uint8_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + *length = self->a_nullable_byte_array_length; + return self->a_nullable_byte_array; +} + +const int32_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable4_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + *length = self->a_nullable4_byte_array_length; + return self->a_nullable4_byte_array; +} + +const int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable8_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + *length = self->a_nullable8_byte_array_length; + return self->a_nullable8_byte_array; +} + +const double* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + *length = self->a_nullable_float_array_length; + return self->a_nullable_float_array; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_map( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_map; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->nullable_nested_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_annotations( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->nullable_map_with_annotations; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_object( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->nullable_map_with_object; +} + +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_enum( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_enum; +} + +const gchar* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_string( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_string; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_object( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->a_nullable_object; +} + +static FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, self->a_nullable_bool != nullptr + ? fl_value_new_bool(*self->a_nullable_bool) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_int != nullptr + ? fl_value_new_int(*self->a_nullable_int) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_int64 != nullptr + ? fl_value_new_int(*self->a_nullable_int64) + : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_double != nullptr + ? fl_value_new_double(*self->a_nullable_double) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable_byte_array != nullptr + ? fl_value_new_uint8_list(self->a_nullable_byte_array, + self->a_nullable_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable4_byte_array != nullptr + ? fl_value_new_int32_list(self->a_nullable4_byte_array, + self->a_nullable4_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable8_byte_array != nullptr + ? fl_value_new_int64_list(self->a_nullable8_byte_array, + self->a_nullable8_byte_array_length) + : fl_value_new_null()); + fl_value_append_take( + values, self->a_nullable_float_array != nullptr + ? fl_value_new_float_list(self->a_nullable_float_array, + self->a_nullable_float_array_length) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_list != nullptr + ? fl_value_ref(self->a_nullable_list) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_map != nullptr + ? fl_value_ref(self->a_nullable_map) + : fl_value_new_null()); + fl_value_append_take(values, self->nullable_nested_list != nullptr + ? fl_value_ref(self->nullable_nested_list) + : fl_value_new_null()); + fl_value_append_take(values, + self->nullable_map_with_annotations != nullptr + ? fl_value_ref(self->nullable_map_with_annotations) + : fl_value_new_null()); + fl_value_append_take(values, + self->nullable_map_with_object != nullptr + ? fl_value_ref(self->nullable_map_with_object) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_enum != nullptr + ? fl_value_new_int(self->a_nullable_enum) + : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_string != nullptr + ? fl_value_new_string(self->a_nullable_string) + : fl_value_new_null()); + fl_value_append_take(values, self->a_nullable_object != nullptr + ? fl_value_ref(self->a_nullable_object) + : fl_value_new_null()); + return values; +} + +static CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( + FlValue* values) { + FlValue* value0 = fl_value_get_list_value(values, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(values, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(values, 2); + int64_t* a_nullable_int64 = nullptr; + int64_t a_nullable_int64_value; + if (fl_value_get_type(value2) != FL_VALUE_TYPE_NULL) { + a_nullable_int64_value = fl_value_get_int(value2); + a_nullable_int64 = &a_nullable_int64_value; + } + FlValue* value3 = fl_value_get_list_value(values, 3); + double* a_nullable_double = nullptr; + double a_nullable_double_value; + if (fl_value_get_type(value3) != FL_VALUE_TYPE_NULL) { + a_nullable_double_value = fl_value_get_double(value3); + a_nullable_double = &a_nullable_double_value; + } + FlValue* value4 = fl_value_get_list_value(values, 4); + const uint8_t* a_nullable_byte_array = + fl_value_get_type(value4) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_uint8_list(value4); + FlValue* value5 = fl_value_get_list_value(values, 5); + const int32_t* a_nullable4_byte_array = + fl_value_get_type(value5) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_int32_list(value5); + FlValue* value6 = fl_value_get_list_value(values, 6); + const int64_t* a_nullable8_byte_array = + fl_value_get_type(value6) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_int64_list(value6); + FlValue* value7 = fl_value_get_list_value(values, 7); + const double* a_nullable_float_array = + fl_value_get_type(value7) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_float_list(value7); + FlValue* value8 = fl_value_get_list_value(values, 8); + FlValue* a_nullable_list = + fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; + FlValue* value9 = fl_value_get_list_value(values, 9); + FlValue* a_nullable_map = + fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; + FlValue* value10 = fl_value_get_list_value(values, 10); + FlValue* nullable_nested_list = + fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; + FlValue* value11 = fl_value_get_list_value(values, 11); + FlValue* nullable_map_with_annotations = + fl_value_get_type(value11) == FL_VALUE_TYPE_NULL ? nullptr : value11; + FlValue* value12 = fl_value_get_list_value(values, 12); + FlValue* nullable_map_with_object = + fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; + FlValue* value13 = fl_value_get_list_value(values, 13); + CoreTestsPigeonTestAnEnum* a_nullable_enum = + fl_value_get_type(value13) == FL_VALUE_TYPE_NULL + ? nullptr + : static_cast(fl_value_get_int(value13)); + FlValue* value14 = fl_value_get_list_value(values, 14); + const gchar* a_nullable_string = + fl_value_get_type(value14) == FL_VALUE_TYPE_NULL + ? nullptr + : fl_value_get_string(value14); + FlValue* value15 = fl_value_get_list_value(values, 15); + FlValue* a_nullable_object = + fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + return core_tests_pigeon_test_all_nullable_types_without_recursion_new( + a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, + a_nullable_byte_array, a_nullable4_byte_array, a_nullable8_byte_array, + a_nullable_float_array, a_nullable_list, a_nullable_map, + nullable_nested_list, nullable_map_with_annotations, + nullable_map_with_object, a_nullable_enum, a_nullable_string, + a_nullable_object); +} + +struct _CoreTestsPigeonTestAllClassesWrapper { + GObject parent_instance; + + CoreTestsPigeonTestAllNullableTypes* all_nullable_types; + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* + all_nullable_types_without_recursion; + CoreTestsPigeonTestAllTypes* all_types; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestAllClassesWrapper, + core_tests_pigeon_test_all_classes_wrapper, G_TYPE_OBJECT) + +static void core_tests_pigeon_test_all_classes_wrapper_dispose( + GObject* object) { + CoreTestsPigeonTestAllClassesWrapper* self = + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER(object); + g_clear_object(&self->all_nullable_types); + g_clear_object(&self->all_nullable_types_without_recursion); + g_clear_object(&self->all_types); + G_OBJECT_CLASS(core_tests_pigeon_test_all_classes_wrapper_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_all_classes_wrapper_init( + CoreTestsPigeonTestAllClassesWrapper* self) {} + +static void core_tests_pigeon_test_all_classes_wrapper_class_init( + CoreTestsPigeonTestAllClassesWrapperClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_all_classes_wrapper_dispose; +} + +CoreTestsPigeonTestAllClassesWrapper* +core_tests_pigeon_test_all_classes_wrapper_new( + CoreTestsPigeonTestAllNullableTypes* all_nullable_types, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* + all_nullable_types_without_recursion, + CoreTestsPigeonTestAllTypes* all_types) { + CoreTestsPigeonTestAllClassesWrapper* self = + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER(g_object_new( + core_tests_pigeon_test_all_classes_wrapper_get_type(), nullptr)); + self->all_nullable_types = g_object_ref(all_nullable_types); + self->all_nullable_types_without_recursion = + g_object_ref(all_nullable_types_without_recursion); + self->all_types = g_object_ref(all_types); + return self; +} + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types( + CoreTestsPigeonTestAllClassesWrapper* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_CLASSES_WRAPPER(self), + nullptr); + return self->all_nullable_types; +} + +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types_without_recursion( + CoreTestsPigeonTestAllClassesWrapper* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_CLASSES_WRAPPER(self), + nullptr); + return self->all_nullable_types_without_recursion; +} + +CoreTestsPigeonTestAllTypes* +core_tests_pigeon_test_all_classes_wrapper_get_all_types( + CoreTestsPigeonTestAllClassesWrapper* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_CLASSES_WRAPPER(self), + nullptr); + return self->all_types; +} + +static FlValue* core_tests_pigeon_test_all_classes_wrapper_to_list( + CoreTestsPigeonTestAllClassesWrapper* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, fl_value_new_custom_object( + 0, G_OBJECT(self->all_nullable_types))); + fl_value_append_take( + values, self->all_nullable_types_without_recursion != nullptr + ? fl_value_new_custom_object( + 0, G_OBJECT(self->all_nullable_types_without_recursion)) + : fl_value_new_null()); + fl_value_append_take( + values, self->all_types != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(self->all_types)) + : fl_value_new_null()); + return values; +} + +static CoreTestsPigeonTestAllClassesWrapper* +core_tests_pigeon_test_all_classes_wrapper_new_from_list(FlValue* values) { + FlValue* value0 = fl_value_get_list_value(values, 0); + CoreTestsPigeonTestAllNullableTypes* all_nullable_types = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value0)); + FlValue* value1 = fl_value_get_list_value(values, 1); + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* + all_nullable_types_without_recursion = + fl_value_get_type(value1) == FL_VALUE_TYPE_NULL + ? nullptr + : CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value1)); + FlValue* value2 = fl_value_get_list_value(values, 2); + CoreTestsPigeonTestAllTypes* all_types = + fl_value_get_type(value2) == FL_VALUE_TYPE_NULL + ? nullptr + : CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value2)); + return core_tests_pigeon_test_all_classes_wrapper_new( + all_nullable_types, all_nullable_types_without_recursion, all_types); +} + +struct _CoreTestsPigeonTestTestMessage { + GObject parent_instance; + + FlValue* test_list; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestTestMessage, + core_tests_pigeon_test_test_message, G_TYPE_OBJECT) + +static void core_tests_pigeon_test_test_message_dispose(GObject* object) { + CoreTestsPigeonTestTestMessage* self = + CORE_TESTS_PIGEON_TEST_TEST_MESSAGE(object); + g_clear_pointer(&self->test_list, fl_value_unref); + G_OBJECT_CLASS(core_tests_pigeon_test_test_message_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_test_message_init( + CoreTestsPigeonTestTestMessage* self) {} + +static void core_tests_pigeon_test_test_message_class_init( + CoreTestsPigeonTestTestMessageClass* klass) { + G_OBJECT_CLASS(klass)->dispose = core_tests_pigeon_test_test_message_dispose; +} + +CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( + FlValue* test_list) { + CoreTestsPigeonTestTestMessage* self = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + g_object_new(core_tests_pigeon_test_test_message_get_type(), nullptr)); + self->test_list = g_object_ref(test_list); + return self; +} + +FlValue* core_tests_pigeon_test_test_message_get_test_list( + CoreTestsPigeonTestTestMessage* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_TEST_MESSAGE(self), nullptr); + return self->test_list; +} + +static FlValue* core_tests_pigeon_test_test_message_to_list( + CoreTestsPigeonTestTestMessage* self) { + FlValue* values = fl_value_new_list(); + fl_value_append_take(values, self->test_list != nullptr + ? fl_value_ref(self->test_list) + : fl_value_new_null()); + return values; +} + +static CoreTestsPigeonTestTestMessage* +core_tests_pigeon_test_test_message_new_from_list(FlValue* values) { + FlValue* value0 = fl_value_get_list_value(values, 0); + FlValue* test_list = + fl_value_get_type(value0) == FL_VALUE_TYPE_NULL ? nullptr : value0; + return core_tests_pigeon_test_test_message_new(test_list); +} + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiCodec, + core_tests_pigeon_test_host_integration_core_api_codec, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_CODEC, + FlStandardMessageCodec) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCodec { + FlStandardMessageCodec parent_instance; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiCodec, + core_tests_pigeon_test_host_integration_core_api_codec, + fl_standard_message_codec_get_type()) + +static gboolean write_core_tests_pigeon_test_all_classes_wrapper( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { + uint8_t type = 128; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_classes_wrapper_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_all_nullable_types( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllNullableTypes* value, GError** error) { + uint8_t type = 129; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_nullable_types_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean +write_core_tests_pigeon_test_all_nullable_types_without_recursion( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, + GError** error) { + uint8_t type = 130; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( + value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_all_types( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllTypes* value, GError** error) { + uint8_t type = 131; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = core_tests_pigeon_test_all_types_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestTestMessage* value, GError** error) { + uint8_t type = 132; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_test_message_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean core_tests_pigeon_test_host_integration_core_api_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { + if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { + switch (fl_value_get_custom_type(value)) { + case 128: + return write_core_tests_pigeon_test_all_classes_wrapper( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( + fl_value_get_custom_value_object(value)), + error); + case 129: + return write_core_tests_pigeon_test_all_nullable_types( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value)), + error); + case 130: + return write_core_tests_pigeon_test_all_nullable_types_without_recursion( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value)), + error); + case 131: + return write_core_tests_pigeon_test_all_types( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value)), + error); + case 132: + return write_core_tests_pigeon_test_test_message( + codec, buffer, + CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + fl_value_get_custom_value_object(value)), + error); + } + } + + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_host_integration_core_api_codec_parent_class) + ->write_value(codec, buffer, value, error); +} + +static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllClassesWrapper) value = + core_tests_pigeon_test_all_classes_wrapper_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(128, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_all_nullable_types( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllNullableTypes) value = + core_tests_pigeon_test_all_nullable_types_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(129, G_OBJECT(value)); +} + +static FlValue* +read_core_tests_pigeon_test_all_nullable_types_without_recursion( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) value = + core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( + values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(130, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_all_types( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllTypes) value = + core_tests_pigeon_test_all_types_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(131, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestTestMessage) value = + core_tests_pigeon_test_test_message_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(132, G_OBJECT(value)); +} + +static FlValue* +core_tests_pigeon_test_host_integration_core_api_read_value_of_type( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, + GError** error) { + switch (type) { + case 128: + return read_core_tests_pigeon_test_all_classes_wrapper(codec, buffer, + offset, error); + case 129: + return read_core_tests_pigeon_test_all_nullable_types(codec, buffer, + offset, error); + case 130: + return read_core_tests_pigeon_test_all_nullable_types_without_recursion( + codec, buffer, offset, error); + case 131: + return read_core_tests_pigeon_test_all_types(codec, buffer, offset, + error); + case 132: + return read_core_tests_pigeon_test_test_message(codec, buffer, offset, + error); + default: + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_host_integration_core_api_codec_parent_class) + ->read_value_of_type(codec, buffer, offset, type, error); + } +} + +static void core_tests_pigeon_test_host_integration_core_api_codec_init( + CoreTestsPigeonTestHostIntegrationCoreApiCodec* self) {} + +static void core_tests_pigeon_test_host_integration_core_api_codec_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCodecClass* klass) { + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = + core_tests_pigeon_test_host_integration_core_api_write_value; + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = + core_tests_pigeon_test_host_integration_core_api_read_value_of_type; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCodec* +core_tests_pigeon_test_host_integration_core_api_codec_new() { + CoreTestsPigeonTestHostIntegrationCoreApiCodec* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CODEC(g_object_new( + core_tests_pigeon_test_host_integration_core_api_codec_get_type(), + nullptr)); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse, + core_tests_pigeon_test_host_integration_core_api_noop_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_noop_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_noop_response_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_integration_core_api_noop_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_noop_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_noop_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_host_integration_core_api_noop_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_host_integration_core_api_noop_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( + CoreTestsPigeonTestAllTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_error_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_FLUTTER_ERROR_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_FLUTTER_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_FLUTTER_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_int_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( + int64_t return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_INT_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_INT_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_double_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( + double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_double(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_bool_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( + gboolean return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_bool(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, fl_value_new_uint8_list(return_value, return_value_length)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_object_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_object_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OBJECT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_object_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_object_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_object_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_object_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_list_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_map_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse, + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_CLASS_WRAPPER_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new( + CoreTestsPigeonTestAllClassesWrapper* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_CLASS_WRAPPER_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_CLASS_WRAPPER_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_enum_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( + CoreTestsPigeonTestAnEnum return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_DEFAULT_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_DEFAULT_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_DEFAULT_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_DEFAULT_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new( + double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_DEFAULT_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_double(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_DEFAULT_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_REQUIRED_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new( + int64_t return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_REQUIRED_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_REQUIRED_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_EXTRACT_NESTED_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_EXTRACT_NESTED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_string(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_EXTRACT_NESTED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CREATE_NESTED_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new( + CoreTestsPigeonTestAllClassesWrapper* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CREATE_NESTED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CREATE_NESTED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new( + int64_t* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(*return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new( + double* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_double(*return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new( + gboolean* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_bool(*return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_string(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_uint8_list( + return_value, return_value_length) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_OBJECT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new( + CoreTestsPigeonTestAnEnum* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_NULLABLE_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new( + int64_t* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(*return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_string(return_value) + : fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NAMED_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse, + core_tests_pigeon_test_host_integration_core_api_noop_async_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse, + core_tests_pigeon_test_host_integration_core_api_noop_async_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_noop_async_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_noop_async_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_noop_async_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_noop_async_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_noop_async_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* +core_tests_pigeon_test_host_integration_core_api_noop_async_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_noop_async_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* +core_tests_pigeon_test_host_integration_core_api_noop_async_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_noop_async_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ASYNC_INT_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new( + int64_t return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_DOUBLE_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new( + double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_double(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ASYNC_BOOL_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new( + gboolean return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_bool(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_UINT8_LIST_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, fl_value_new_uint8_list(return_value, return_value_length)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_OBJECT_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_OBJECT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ASYNC_LIST_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ASYNC_MAP_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ENUM_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( + CoreTestsPigeonTestAnEnum return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_FROM_VOID_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_FROM_VOID_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_THROW_ASYNC_FLUTTER_ERROR_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_FLUTTER_ERROR_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_FLUTTER_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_THROW_ASYNC_FLUTTER_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ALL_TYPES_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ALL_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new( + CoreTestsPigeonTestAllTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_INT_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new( + int64_t* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_DOUBLE_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new( + double* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_double(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_BOOL_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new( + gboolean* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_bool(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_STRING_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_string(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_UINT8_LIST_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_uint8_list( + return_value, return_value_length) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_OBJECT_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_OBJECT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_OBJECT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_LIST_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_MAP_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ENUM_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new( + CoreTestsPigeonTestAnEnum* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_ASYNC_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_NOOP_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_NOOP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_NOOP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_NOOP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_FROM_VOID_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_FROM_VOID_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new() { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_THROW_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_TYPES_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new( + CoreTestsPigeonTestAllTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, + fl_value_new_custom_object(0, G_OBJECT(return_value))); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_BOOL_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new( + gboolean return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_bool(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_INT_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new( + int64_t return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_DOUBLE_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new( + double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_double(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_STRING_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_UINT8_LIST_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take( + self->value, fl_value_new_uint8_list(return_value, return_value_length)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_LIST_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_MAP_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* self) { +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ENUM_RESPONSE, GObject) + +struct _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new( + CoreTestsPigeonTestAnEnum return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_int(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_BOOL_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_BOOL_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new( + gboolean* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_bool(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_INT_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_INT_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new( + int64_t* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_DOUBLE_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new( + double* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_double(*return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_STRING_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_string(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_UINT8_LIST_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_uint8_list( + return_value, return_value_length) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse* + self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_LIST_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_MAP_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_MAP_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_ref(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_ENUM_RESPONSE, GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_ENUM_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new( + CoreTestsPigeonTestAnEnum* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, return_value != nullptr + ? fl_value_new_int(return_value) + : fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_ECHO_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE, + GObject) + +struct + _CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* + self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CALL_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostIntegrationCoreApi { + GObject parent_instance; + + FlBinaryMessenger* messenger; + const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable; + gpointer user_data; + GDestroyNotify user_data_free_func; + + FlBasicMessageChannel* noop_channel; + FlBasicMessageChannel* echo_all_types_channel; + FlBasicMessageChannel* throw_error_channel; + FlBasicMessageChannel* throw_error_from_void_channel; + FlBasicMessageChannel* throw_flutter_error_channel; + FlBasicMessageChannel* echo_int_channel; + FlBasicMessageChannel* echo_double_channel; + FlBasicMessageChannel* echo_bool_channel; + FlBasicMessageChannel* echo_string_channel; + FlBasicMessageChannel* echo_uint8_list_channel; + FlBasicMessageChannel* echo_object_channel; + FlBasicMessageChannel* echo_list_channel; + FlBasicMessageChannel* echo_map_channel; + FlBasicMessageChannel* echo_class_wrapper_channel; + FlBasicMessageChannel* echo_enum_channel; + FlBasicMessageChannel* echo_named_default_string_channel; + FlBasicMessageChannel* echo_optional_default_double_channel; + FlBasicMessageChannel* echo_required_int_channel; + FlBasicMessageChannel* echo_all_nullable_types_channel; + FlBasicMessageChannel* echo_all_nullable_types_without_recursion_channel; + FlBasicMessageChannel* extract_nested_nullable_string_channel; + FlBasicMessageChannel* create_nested_nullable_string_channel; + FlBasicMessageChannel* send_multiple_nullable_types_channel; + FlBasicMessageChannel* send_multiple_nullable_types_without_recursion_channel; + FlBasicMessageChannel* echo_nullable_int_channel; + FlBasicMessageChannel* echo_nullable_double_channel; + FlBasicMessageChannel* echo_nullable_bool_channel; + FlBasicMessageChannel* echo_nullable_string_channel; + FlBasicMessageChannel* echo_nullable_uint8_list_channel; + FlBasicMessageChannel* echo_nullable_object_channel; + FlBasicMessageChannel* echo_nullable_list_channel; + FlBasicMessageChannel* echo_nullable_map_channel; + FlBasicMessageChannel* echo_nullable_enum_channel; + FlBasicMessageChannel* echo_optional_nullable_int_channel; + FlBasicMessageChannel* echo_named_nullable_string_channel; + FlBasicMessageChannel* noop_async_channel; + FlBasicMessageChannel* echo_async_int_channel; + FlBasicMessageChannel* echo_async_double_channel; + FlBasicMessageChannel* echo_async_bool_channel; + FlBasicMessageChannel* echo_async_string_channel; + FlBasicMessageChannel* echo_async_uint8_list_channel; + FlBasicMessageChannel* echo_async_object_channel; + FlBasicMessageChannel* echo_async_list_channel; + FlBasicMessageChannel* echo_async_map_channel; + FlBasicMessageChannel* echo_async_enum_channel; + FlBasicMessageChannel* throw_async_error_channel; + FlBasicMessageChannel* throw_async_error_from_void_channel; + FlBasicMessageChannel* throw_async_flutter_error_channel; + FlBasicMessageChannel* echo_async_all_types_channel; + FlBasicMessageChannel* echo_async_nullable_all_nullable_types_channel; + FlBasicMessageChannel* + echo_async_nullable_all_nullable_types_without_recursion_channel; + FlBasicMessageChannel* echo_async_nullable_int_channel; + FlBasicMessageChannel* echo_async_nullable_double_channel; + FlBasicMessageChannel* echo_async_nullable_bool_channel; + FlBasicMessageChannel* echo_async_nullable_string_channel; + FlBasicMessageChannel* echo_async_nullable_uint8_list_channel; + FlBasicMessageChannel* echo_async_nullable_object_channel; + FlBasicMessageChannel* echo_async_nullable_list_channel; + FlBasicMessageChannel* echo_async_nullable_map_channel; + FlBasicMessageChannel* echo_async_nullable_enum_channel; + FlBasicMessageChannel* call_flutter_noop_channel; + FlBasicMessageChannel* call_flutter_throw_error_channel; + FlBasicMessageChannel* call_flutter_throw_error_from_void_channel; + FlBasicMessageChannel* call_flutter_echo_all_types_channel; + FlBasicMessageChannel* call_flutter_echo_all_nullable_types_channel; + FlBasicMessageChannel* call_flutter_send_multiple_nullable_types_channel; + FlBasicMessageChannel* + call_flutter_echo_all_nullable_types_without_recursion_channel; + FlBasicMessageChannel* + call_flutter_send_multiple_nullable_types_without_recursion_channel; + FlBasicMessageChannel* call_flutter_echo_bool_channel; + FlBasicMessageChannel* call_flutter_echo_int_channel; + FlBasicMessageChannel* call_flutter_echo_double_channel; + FlBasicMessageChannel* call_flutter_echo_string_channel; + FlBasicMessageChannel* call_flutter_echo_uint8_list_channel; + FlBasicMessageChannel* call_flutter_echo_list_channel; + FlBasicMessageChannel* call_flutter_echo_map_channel; + FlBasicMessageChannel* call_flutter_echo_enum_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_bool_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_int_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_double_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_string_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_uint8_list_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_list_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_map_channel; + FlBasicMessageChannel* call_flutter_echo_nullable_enum_channel; + FlBasicMessageChannel* call_flutter_small_api_echo_string_channel; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, + core_tests_pigeon_test_host_integration_core_api, G_TYPE_OBJECT) + +static void noop_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->noop == nullptr) { + return; + } + + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse) response = + self->vtable->noop(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "noop"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "noop", error->message); + } +} + +static void echo_all_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_all_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse) + response = + self->vtable->echo_all_types(self, everything, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoAllTypes"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAllTypes", error->message); + } +} + +static void throw_error_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->throw_error == nullptr) { + return; + } + + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse) + response = self->vtable->throw_error(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "throwError"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwError", error->message); + } +} + +static void throw_error_from_void_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->throw_error_from_void == nullptr) { + return; + } + + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse) + response = self->vtable->throw_error_from_void(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "throwErrorFromVoid"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwErrorFromVoid", error->message); + } +} + +static void throw_flutter_error_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->throw_flutter_error == nullptr) { + return; + } + + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse) + response = self->vtable->throw_flutter_error(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "throwFlutterError"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwFlutterError", error->message); + } +} + +static void echo_int_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t an_int = fl_value_get_int(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse) response = + self->vtable->echo_int(self, an_int, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoInt"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoInt", error->message); + } +} + +static void echo_double_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double a_double = fl_value_get_double(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse) + response = self->vtable->echo_double(self, a_double, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoDouble"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoDouble", error->message); + } +} + +static void echo_bool_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean a_bool = fl_value_get_bool(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse) + response = self->vtable->echo_bool(self, a_bool, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoBool"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoBool", error->message); + } +} + +static void echo_string_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse) + response = self->vtable->echo_string(self, a_string, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoString", error->message); + } +} + +static void echo_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_uint8_list = fl_value_get_uint8_list(value0); + size_t a_uint8_list_length = fl_value_get_length(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse) + response = self->vtable->echo_uint8_list( + self, a_uint8_list, a_uint8_list_length, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoUint8List"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoUint8List", error->message); + } +} + +static void echo_object_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_object == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* an_object = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse) + response = self->vtable->echo_object(self, an_object, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoObject"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoObject", error->message); + } +} + +static void echo_list_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_list = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse) + response = self->vtable->echo_list(self, a_list, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoList"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoList", error->message); + } +} + +static void echo_map_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_map = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse) response = + self->vtable->echo_map(self, a_map, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoMap"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoMap", error->message); + } +} + +static void echo_class_wrapper_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_class_wrapper == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllClassesWrapper* wrapper = + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( + fl_value_get_custom_value_object(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse) + response = + self->vtable->echo_class_wrapper(self, wrapper, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoClassWrapper"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoClassWrapper", error->message); + } +} + +static void echo_enum_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum an_enum = + static_cast(fl_value_get_int(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse) + response = self->vtable->echo_enum(self, an_enum, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoEnum"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoEnum", error->message); + } +} + +static void echo_named_default_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_named_default_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse) + response = self->vtable->echo_named_default_string(self, a_string, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNamedDefaultString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNamedDefaultString", error->message); + } +} + +static void echo_optional_default_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_optional_default_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double a_double = fl_value_get_double(value0); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse) + response = self->vtable->echo_optional_default_double(self, a_double, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoOptionalDefaultDouble"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoOptionalDefaultDouble", error->message); + } +} + +static void echo_required_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_required_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t an_int = fl_value_get_int(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse) + response = self->vtable->echo_required_int(self, an_int, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoRequiredInt"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoRequiredInt", error->message); + } +} + +static void echo_all_nullable_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_all_nullable_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypes* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value0)); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse) + response = self->vtable->echo_all_nullable_types(self, everything, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoAllNullableTypes"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAllNullableTypes", error->message); + } +} + +static void echo_all_nullable_types_without_recursion_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_all_nullable_types_without_recursion == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value0)); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse) + response = self->vtable->echo_all_nullable_types_without_recursion( + self, everything, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoAllNullableTypesWithoutRecursion"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAllNullableTypesWithoutRecursion", error->message); + } +} + +static void extract_nested_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->extract_nested_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllClassesWrapper* wrapper = + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( + fl_value_get_custom_value_object(value0)); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse) + response = self->vtable->extract_nested_nullable_string(self, wrapper, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "extractNestedNullableString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "extractNestedNullableString", error->message); + } +} + +static void create_nested_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->create_nested_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* nullable_string = fl_value_get_string(value0); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse) + response = self->vtable->create_nested_nullable_string( + self, nullable_string, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "createNestedNullableString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "createNestedNullableString", error->message); + } +} + +static void send_multiple_nullable_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->send_multiple_nullable_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(message_, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(message_, 2); + const gchar* a_nullable_string = fl_value_get_string(value2); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse) + response = self->vtable->send_multiple_nullable_types( + self, a_nullable_bool, a_nullable_int, a_nullable_string, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "sendMultipleNullableTypes"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "sendMultipleNullableTypes", error->message); + } +} + +static void send_multiple_nullable_types_without_recursion_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->send_multiple_nullable_types_without_recursion == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(message_, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(message_, 2); + const gchar* a_nullable_string = fl_value_get_string(value2); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse) + response = self->vtable->send_multiple_nullable_types_without_recursion( + self, a_nullable_bool, a_nullable_int, a_nullable_string, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "sendMultipleNullableTypesWithoutRecursion"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "sendMultipleNullableTypesWithoutRecursion", error->message); + } +} + +static void echo_nullable_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_nullable_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value0); + a_nullable_int = &a_nullable_int_value; + } + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse) + response = self->vtable->echo_nullable_int(self, a_nullable_int, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableInt"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableInt", error->message); + } +} + +static void echo_nullable_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_nullable_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double* a_nullable_double = nullptr; + double a_nullable_double_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_double_value = fl_value_get_double(value0); + a_nullable_double = &a_nullable_double_value; + } + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse) + response = self->vtable->echo_nullable_double(self, a_nullable_double, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableDouble"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableDouble", error->message); + } +} + +static void echo_nullable_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_nullable_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse) + response = self->vtable->echo_nullable_bool(self, a_nullable_bool, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableBool"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableBool", error->message); + } +} + +static void echo_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_nullable_string = fl_value_get_string(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse) + response = self->vtable->echo_nullable_string(self, a_nullable_string, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableString", error->message); + } +} + +static void echo_nullable_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_nullable_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_nullable_uint8_list = fl_value_get_uint8_list(value0); + size_t a_nullable_uint8_list_length = fl_value_get_length(value0); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse) + response = self->vtable->echo_nullable_uint8_list( + self, a_nullable_uint8_list, a_nullable_uint8_list_length, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableUint8List"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableUint8List", error->message); + } +} + +static void echo_nullable_object_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_nullable_object == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_nullable_object = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse) + response = self->vtable->echo_nullable_object(self, a_nullable_object, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableObject"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableObject", error->message); + } +} + +static void echo_nullable_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_nullable_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_nullable_list = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse) + response = self->vtable->echo_nullable_list(self, a_nullable_list, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableList"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableList", error->message); + } +} + +static void echo_nullable_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_nullable_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_nullable_map = value0; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse) + response = self->vtable->echo_nullable_map(self, a_nullable_map, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableMap"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableMap", error->message); + } +} + +static void echo_nullable_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_nullable_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum* an_enum = + static_cast(fl_value_get_int(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse) + response = + self->vtable->echo_nullable_enum(self, an_enum, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNullableEnum"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNullableEnum", error->message); + } +} + +static void echo_optional_nullable_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_optional_nullable_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value0); + a_nullable_int = &a_nullable_int_value; + } + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse) + response = self->vtable->echo_optional_nullable_int(self, a_nullable_int, + self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoOptionalNullableInt"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoOptionalNullableInt", error->message); + } +} + +static void echo_named_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_named_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_nullable_string = fl_value_get_string(value0); + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse) + response = self->vtable->echo_named_nullable_string( + self, a_nullable_string, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNamedNullableString"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNamedNullableString", error->message); + } +} + +static void noop_async_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->noop_async == nullptr) { + return; + } + + self->vtable->noop_async(self, response_handle, self->user_data); +} + +static void echo_async_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t an_int = fl_value_get_int(value0); + self->vtable->echo_async_int(self, an_int, response_handle, self->user_data); +} + +static void echo_async_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double a_double = fl_value_get_double(value0); + self->vtable->echo_async_double(self, a_double, response_handle, + self->user_data); +} + +static void echo_async_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean a_bool = fl_value_get_bool(value0); + self->vtable->echo_async_bool(self, a_bool, response_handle, self->user_data); +} + +static void echo_async_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->echo_async_string(self, a_string, response_handle, + self->user_data); +} + +static void echo_async_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_uint8_list = fl_value_get_uint8_list(value0); + size_t a_uint8_list_length = fl_value_get_length(value0); + self->vtable->echo_async_uint8_list(self, a_uint8_list, a_uint8_list_length, + response_handle, self->user_data); +} + +static void echo_async_object_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_object == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* an_object = value0; + self->vtable->echo_async_object(self, an_object, response_handle, + self->user_data); +} + +static void echo_async_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_list = value0; + self->vtable->echo_async_list(self, a_list, response_handle, self->user_data); +} + +static void echo_async_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_map = value0; + self->vtable->echo_async_map(self, a_map, response_handle, self->user_data); +} + +static void echo_async_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo_async_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum an_enum = + static_cast(fl_value_get_int(value0)); + self->vtable->echo_async_enum(self, an_enum, response_handle, + self->user_data); +} + +static void throw_async_error_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->throw_async_error == nullptr) { + return; + } + + self->vtable->throw_async_error(self, response_handle, self->user_data); +} + +static void throw_async_error_from_void_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->throw_async_error_from_void == nullptr) { + return; + } + + self->vtable->throw_async_error_from_void(self, response_handle, + self->user_data); +} + +static void throw_async_flutter_error_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->throw_async_flutter_error == nullptr) { + return; + } + + self->vtable->throw_async_flutter_error(self, response_handle, + self->user_data); +} + +static void echo_async_all_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_all_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value0)); + self->vtable->echo_async_all_types(self, everything, response_handle, + self->user_data); +} + +static void echo_async_nullable_all_nullable_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_all_nullable_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypes* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value0)); + self->vtable->echo_async_nullable_all_nullable_types( + self, everything, response_handle, self->user_data); +} + +static void echo_async_nullable_all_nullable_types_without_recursion_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_all_nullable_types_without_recursion == + nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value0)); + self->vtable->echo_async_nullable_all_nullable_types_without_recursion( + self, everything, response_handle, self->user_data); +} + +static void echo_async_nullable_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t* an_int = nullptr; + int64_t an_int_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + an_int_value = fl_value_get_int(value0); + an_int = &an_int_value; + } + self->vtable->echo_async_nullable_int(self, an_int, response_handle, + self->user_data); +} + +static void echo_async_nullable_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double* a_double = nullptr; + double a_double_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_double_value = fl_value_get_double(value0); + a_double = &a_double_value; + } + self->vtable->echo_async_nullable_double(self, a_double, response_handle, + self->user_data); +} + +static void echo_async_nullable_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_bool = nullptr; + gboolean a_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_bool_value = fl_value_get_bool(value0); + a_bool = &a_bool_value; + } + self->vtable->echo_async_nullable_bool(self, a_bool, response_handle, + self->user_data); +} + +static void echo_async_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->echo_async_nullable_string(self, a_string, response_handle, + self->user_data); +} + +static void echo_async_nullable_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_uint8_list = fl_value_get_uint8_list(value0); + size_t a_uint8_list_length = fl_value_get_length(value0); + self->vtable->echo_async_nullable_uint8_list( + self, a_uint8_list, a_uint8_list_length, response_handle, + self->user_data); +} + +static void echo_async_nullable_object_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_object == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* an_object = value0; + self->vtable->echo_async_nullable_object(self, an_object, response_handle, + self->user_data); +} + +static void echo_async_nullable_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_list = value0; + self->vtable->echo_async_nullable_list(self, a_list, response_handle, + self->user_data); +} + +static void echo_async_nullable_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_map = value0; + self->vtable->echo_async_nullable_map(self, a_map, response_handle, + self->user_data); +} + +static void echo_async_nullable_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_async_nullable_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum* an_enum = + static_cast(fl_value_get_int(value0)); + self->vtable->echo_async_nullable_enum(self, an_enum, response_handle, + self->user_data); +} + +static void call_flutter_noop_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || self->vtable->call_flutter_noop == nullptr) { + return; + } + + self->vtable->call_flutter_noop(self, response_handle, self->user_data); +} + +static void call_flutter_throw_error_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_throw_error == nullptr) { + return; + } + + self->vtable->call_flutter_throw_error(self, response_handle, + self->user_data); +} + +static void call_flutter_throw_error_from_void_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_throw_error_from_void == nullptr) { + return; + } + + self->vtable->call_flutter_throw_error_from_void(self, response_handle, + self->user_data); +} + +static void call_flutter_echo_all_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_all_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value0)); + self->vtable->call_flutter_echo_all_types(self, everything, response_handle, + self->user_data); +} + +static void call_flutter_echo_all_nullable_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_all_nullable_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypes* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value0)); + self->vtable->call_flutter_echo_all_nullable_types( + self, everything, response_handle, self->user_data); +} + +static void call_flutter_send_multiple_nullable_types_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_send_multiple_nullable_types == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(message_, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(message_, 2); + const gchar* a_nullable_string = fl_value_get_string(value2); + self->vtable->call_flutter_send_multiple_nullable_types( + self, a_nullable_bool, a_nullable_int, a_nullable_string, response_handle, + self->user_data); +} + +static void call_flutter_echo_all_nullable_types_without_recursion_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_all_nullable_types_without_recursion == + nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value0)); + self->vtable->call_flutter_echo_all_nullable_types_without_recursion( + self, everything, response_handle, self->user_data); +} + +static void call_flutter_send_multiple_nullable_types_without_recursion_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable + ->call_flutter_send_multiple_nullable_types_without_recursion == + nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_nullable_bool = nullptr; + gboolean a_nullable_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_nullable_bool_value = fl_value_get_bool(value0); + a_nullable_bool = &a_nullable_bool_value; + } + FlValue* value1 = fl_value_get_list_value(message_, 1); + int64_t* a_nullable_int = nullptr; + int64_t a_nullable_int_value; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + a_nullable_int_value = fl_value_get_int(value1); + a_nullable_int = &a_nullable_int_value; + } + FlValue* value2 = fl_value_get_list_value(message_, 2); + const gchar* a_nullable_string = fl_value_get_string(value2); + self->vtable->call_flutter_send_multiple_nullable_types_without_recursion( + self, a_nullable_bool, a_nullable_int, a_nullable_string, response_handle, + self->user_data); +} + +static void call_flutter_echo_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean a_bool = fl_value_get_bool(value0); + self->vtable->call_flutter_echo_bool(self, a_bool, response_handle, + self->user_data); +} + +static void call_flutter_echo_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t an_int = fl_value_get_int(value0); + self->vtable->call_flutter_echo_int(self, an_int, response_handle, + self->user_data); +} + +static void call_flutter_echo_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double a_double = fl_value_get_double(value0); + self->vtable->call_flutter_echo_double(self, a_double, response_handle, + self->user_data); +} + +static void call_flutter_echo_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->call_flutter_echo_string(self, a_string, response_handle, + self->user_data); +} + +static void call_flutter_echo_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_list = fl_value_get_uint8_list(value0); + size_t a_list_length = fl_value_get_length(value0); + self->vtable->call_flutter_echo_uint8_list(self, a_list, a_list_length, + response_handle, self->user_data); +} + +static void call_flutter_echo_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_list = value0; + self->vtable->call_flutter_echo_list(self, a_list, response_handle, + self->user_data); +} + +static void call_flutter_echo_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_map = value0; + self->vtable->call_flutter_echo_map(self, a_map, response_handle, + self->user_data); +} + +static void call_flutter_echo_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum an_enum = + static_cast(fl_value_get_int(value0)); + self->vtable->call_flutter_echo_enum(self, an_enum, response_handle, + self->user_data); +} + +static void call_flutter_echo_nullable_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_bool == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + gboolean* a_bool = nullptr; + gboolean a_bool_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_bool_value = fl_value_get_bool(value0); + a_bool = &a_bool_value; + } + self->vtable->call_flutter_echo_nullable_bool(self, a_bool, response_handle, + self->user_data); +} + +static void call_flutter_echo_nullable_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_int == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + int64_t* an_int = nullptr; + int64_t an_int_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + an_int_value = fl_value_get_int(value0); + an_int = &an_int_value; + } + self->vtable->call_flutter_echo_nullable_int(self, an_int, response_handle, + self->user_data); +} + +static void call_flutter_echo_nullable_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_double == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + double* a_double = nullptr; + double a_double_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + a_double_value = fl_value_get_double(value0); + a_double = &a_double_value; + } + self->vtable->call_flutter_echo_nullable_double( + self, a_double, response_handle, self->user_data); +} + +static void call_flutter_echo_nullable_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->call_flutter_echo_nullable_string( + self, a_string, response_handle, self->user_data); +} + +static void call_flutter_echo_nullable_uint8_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_uint8_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const uint8_t* a_list = fl_value_get_uint8_list(value0); + size_t a_list_length = fl_value_get_length(value0); + self->vtable->call_flutter_echo_nullable_uint8_list( + self, a_list, a_list_length, response_handle, self->user_data); +} + +static void call_flutter_echo_nullable_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_list = value0; + self->vtable->call_flutter_echo_nullable_list(self, a_list, response_handle, + self->user_data); +} + +static void call_flutter_echo_nullable_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_map == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* a_map = value0; + self->vtable->call_flutter_echo_nullable_map(self, a_map, response_handle, + self->user_data); +} + +static void call_flutter_echo_nullable_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_echo_nullable_enum == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + CoreTestsPigeonTestAnEnum* an_enum = + static_cast(fl_value_get_int(value0)); + self->vtable->call_flutter_echo_nullable_enum(self, an_enum, response_handle, + self->user_data); +} + +static void call_flutter_small_api_echo_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->call_flutter_small_api_echo_string == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->call_flutter_small_api_echo_string( + self, a_string, response_handle, self->user_data); +} + +static void core_tests_pigeon_test_host_integration_core_api_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(object); + g_clear_object(&self->messenger); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + + g_clear_object(&self->noop_channel); + g_clear_object(&self->echo_all_types_channel); + g_clear_object(&self->throw_error_channel); + g_clear_object(&self->throw_error_from_void_channel); + g_clear_object(&self->throw_flutter_error_channel); + g_clear_object(&self->echo_int_channel); + g_clear_object(&self->echo_double_channel); + g_clear_object(&self->echo_bool_channel); + g_clear_object(&self->echo_string_channel); + g_clear_object(&self->echo_uint8_list_channel); + g_clear_object(&self->echo_object_channel); + g_clear_object(&self->echo_list_channel); + g_clear_object(&self->echo_map_channel); + g_clear_object(&self->echo_class_wrapper_channel); + g_clear_object(&self->echo_enum_channel); + g_clear_object(&self->echo_named_default_string_channel); + g_clear_object(&self->echo_optional_default_double_channel); + g_clear_object(&self->echo_required_int_channel); + g_clear_object(&self->echo_all_nullable_types_channel); + g_clear_object(&self->echo_all_nullable_types_without_recursion_channel); + g_clear_object(&self->extract_nested_nullable_string_channel); + g_clear_object(&self->create_nested_nullable_string_channel); + g_clear_object(&self->send_multiple_nullable_types_channel); + g_clear_object(&self->send_multiple_nullable_types_without_recursion_channel); + g_clear_object(&self->echo_nullable_int_channel); + g_clear_object(&self->echo_nullable_double_channel); + g_clear_object(&self->echo_nullable_bool_channel); + g_clear_object(&self->echo_nullable_string_channel); + g_clear_object(&self->echo_nullable_uint8_list_channel); + g_clear_object(&self->echo_nullable_object_channel); + g_clear_object(&self->echo_nullable_list_channel); + g_clear_object(&self->echo_nullable_map_channel); + g_clear_object(&self->echo_nullable_enum_channel); + g_clear_object(&self->echo_optional_nullable_int_channel); + g_clear_object(&self->echo_named_nullable_string_channel); + g_clear_object(&self->noop_async_channel); + g_clear_object(&self->echo_async_int_channel); + g_clear_object(&self->echo_async_double_channel); + g_clear_object(&self->echo_async_bool_channel); + g_clear_object(&self->echo_async_string_channel); + g_clear_object(&self->echo_async_uint8_list_channel); + g_clear_object(&self->echo_async_object_channel); + g_clear_object(&self->echo_async_list_channel); + g_clear_object(&self->echo_async_map_channel); + g_clear_object(&self->echo_async_enum_channel); + g_clear_object(&self->throw_async_error_channel); + g_clear_object(&self->throw_async_error_from_void_channel); + g_clear_object(&self->throw_async_flutter_error_channel); + g_clear_object(&self->echo_async_all_types_channel); + g_clear_object(&self->echo_async_nullable_all_nullable_types_channel); + g_clear_object( + &self->echo_async_nullable_all_nullable_types_without_recursion_channel); + g_clear_object(&self->echo_async_nullable_int_channel); + g_clear_object(&self->echo_async_nullable_double_channel); + g_clear_object(&self->echo_async_nullable_bool_channel); + g_clear_object(&self->echo_async_nullable_string_channel); + g_clear_object(&self->echo_async_nullable_uint8_list_channel); + g_clear_object(&self->echo_async_nullable_object_channel); + g_clear_object(&self->echo_async_nullable_list_channel); + g_clear_object(&self->echo_async_nullable_map_channel); + g_clear_object(&self->echo_async_nullable_enum_channel); + g_clear_object(&self->call_flutter_noop_channel); + g_clear_object(&self->call_flutter_throw_error_channel); + g_clear_object(&self->call_flutter_throw_error_from_void_channel); + g_clear_object(&self->call_flutter_echo_all_types_channel); + g_clear_object(&self->call_flutter_echo_all_nullable_types_channel); + g_clear_object(&self->call_flutter_send_multiple_nullable_types_channel); + g_clear_object( + &self->call_flutter_echo_all_nullable_types_without_recursion_channel); + g_clear_object( + &self->call_flutter_send_multiple_nullable_types_without_recursion_channel); + g_clear_object(&self->call_flutter_echo_bool_channel); + g_clear_object(&self->call_flutter_echo_int_channel); + g_clear_object(&self->call_flutter_echo_double_channel); + g_clear_object(&self->call_flutter_echo_string_channel); + g_clear_object(&self->call_flutter_echo_uint8_list_channel); + g_clear_object(&self->call_flutter_echo_list_channel); + g_clear_object(&self->call_flutter_echo_map_channel); + g_clear_object(&self->call_flutter_echo_enum_channel); + g_clear_object(&self->call_flutter_echo_nullable_bool_channel); + g_clear_object(&self->call_flutter_echo_nullable_int_channel); + g_clear_object(&self->call_flutter_echo_nullable_double_channel); + g_clear_object(&self->call_flutter_echo_nullable_string_channel); + g_clear_object(&self->call_flutter_echo_nullable_uint8_list_channel); + g_clear_object(&self->call_flutter_echo_nullable_list_channel); + g_clear_object(&self->call_flutter_echo_nullable_map_channel); + g_clear_object(&self->call_flutter_echo_nullable_enum_channel); + g_clear_object(&self->call_flutter_small_api_echo_string_channel); + G_OBJECT_CLASS(core_tests_pigeon_test_host_integration_core_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_integration_core_api_init( + CoreTestsPigeonTestHostIntegrationCoreApi* self) {} + +static void core_tests_pigeon_test_host_integration_core_api_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApi* +core_tests_pigeon_test_host_integration_core_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, + gpointer user_data, GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(g_object_new( + core_tests_pigeon_test_host_integration_core_api_get_type(), + nullptr)); + self->messenger = g_object_ref(messenger); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCodec) codec = + core_tests_pigeon_test_host_integration_core_api_codec_new(); + self->noop_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->noop_channel, noop_cb, + self, nullptr); + self->echo_all_types_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAllTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_all_types_channel, echo_all_types_cb, self, nullptr); + self->throw_error_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.throwError", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->throw_error_channel, + throw_error_cb, self, nullptr); + self->throw_error_from_void_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwErrorFromVoid", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->throw_error_from_void_channel, throw_error_from_void_cb, self, + nullptr); + self->throw_flutter_error_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwFlutterError", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->throw_flutter_error_channel, throw_flutter_error_cb, self, nullptr); + self->echo_int_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_int_channel, + echo_int_cb, self, nullptr); + self->echo_double_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_double_channel, + echo_double_cb, self, nullptr); + self->echo_bool_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_bool_channel, + echo_bool_cb, self, nullptr); + self->echo_string_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_string_channel, + echo_string_cb, self, nullptr); + self->echo_uint8_list_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_uint8_list_channel, echo_uint8_list_cb, self, nullptr); + self->echo_object_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoObject", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_object_channel, + echo_object_cb, self, nullptr); + self->echo_list_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_list_channel, + echo_list_cb, self, nullptr); + self->echo_map_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_map_channel, + echo_map_cb, self, nullptr); + self->echo_class_wrapper_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoClassWrapper", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_class_wrapper_channel, echo_class_wrapper_cb, self, nullptr); + self->echo_enum_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_enum_channel, + echo_enum_cb, self, nullptr); + self->echo_named_default_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedDefaultString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_named_default_string_channel, echo_named_default_string_cb, + self, nullptr); + self->echo_optional_default_double_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalDefaultDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_optional_default_double_channel, + echo_optional_default_double_cb, self, nullptr); + self->echo_required_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoRequiredInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_required_int_channel, echo_required_int_cb, self, nullptr); + self->echo_all_nullable_types_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_all_nullable_types_channel, echo_all_nullable_types_cb, self, + nullptr); + self->echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypesWithoutRecursion", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_all_nullable_types_without_recursion_channel, + echo_all_nullable_types_without_recursion_cb, self, nullptr); + self->extract_nested_nullable_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "extractNestedNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->extract_nested_nullable_string_channel, + extract_nested_nullable_string_cb, self, nullptr); + self->create_nested_nullable_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "createNestedNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->create_nested_nullable_string_channel, + create_nested_nullable_string_cb, self, nullptr); + self->send_multiple_nullable_types_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "sendMultipleNullableTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->send_multiple_nullable_types_channel, + send_multiple_nullable_types_cb, self, nullptr); + self->send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->send_multiple_nullable_types_without_recursion_channel, + send_multiple_nullable_types_without_recursion_cb, self, nullptr); + self->echo_nullable_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_int_channel, echo_nullable_int_cb, self, nullptr); + self->echo_nullable_double_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_double_channel, echo_nullable_double_cb, self, + nullptr); + self->echo_nullable_bool_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_bool_channel, echo_nullable_bool_cb, self, nullptr); + self->echo_nullable_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_string_channel, echo_nullable_string_cb, self, + nullptr); + self->echo_nullable_uint8_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_uint8_list_channel, echo_nullable_uint8_list_cb, self, + nullptr); + self->echo_nullable_object_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableObject", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_object_channel, echo_nullable_object_cb, self, + nullptr); + self->echo_nullable_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_list_channel, echo_nullable_list_cb, self, nullptr); + self->echo_nullable_map_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_map_channel, echo_nullable_map_cb, self, nullptr); + self->echo_nullable_enum_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_nullable_enum_channel, echo_nullable_enum_cb, self, nullptr); + self->echo_optional_nullable_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalNullableInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_optional_nullable_int_channel, echo_optional_nullable_int_cb, + self, nullptr); + self->echo_named_nullable_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_named_nullable_string_channel, echo_named_nullable_string_cb, + self, nullptr); + self->noop_async_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.noopAsync", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->noop_async_channel, + noop_async_cb, self, nullptr); + self->echo_async_int_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAsyncInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_int_channel, echo_async_int_cb, self, nullptr); + self->echo_async_double_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_double_channel, echo_async_double_cb, self, nullptr); + self->echo_async_bool_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAsyncBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_bool_channel, echo_async_bool_cb, self, nullptr); + self->echo_async_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_string_channel, echo_async_string_cb, self, nullptr); + self->echo_async_uint8_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_uint8_list_channel, echo_async_uint8_list_cb, self, + nullptr); + self->echo_async_object_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncObject", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_object_channel, echo_async_object_cb, self, nullptr); + self->echo_async_list_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAsyncList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_list_channel, echo_async_list_cb, self, nullptr); + self->echo_async_map_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAsyncMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_map_channel, echo_async_map_cb, self, nullptr); + self->echo_async_enum_channel = + fl_basic_message_channel_new(messenger, + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoAsyncEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_enum_channel, echo_async_enum_cb, self, nullptr); + self->throw_async_error_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncError", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->throw_async_error_channel, throw_async_error_cb, self, nullptr); + self->throw_async_error_from_void_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncErrorFromVoid", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->throw_async_error_from_void_channel, throw_async_error_from_void_cb, + self, nullptr); + self->throw_async_flutter_error_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncFlutterError", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->throw_async_flutter_error_channel, throw_async_flutter_error_cb, + self, nullptr); + self->echo_async_all_types_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncAllTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_all_types_channel, echo_async_all_types_cb, self, + nullptr); + self->echo_async_nullable_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_all_nullable_types_channel, + echo_async_nullable_all_nullable_types_cb, self, nullptr); + self->echo_async_nullable_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypesWithoutRecursion", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_all_nullable_types_without_recursion_channel, + echo_async_nullable_all_nullable_types_without_recursion_cb, self, + nullptr); + self->echo_async_nullable_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_int_channel, echo_async_nullable_int_cb, self, + nullptr); + self->echo_async_nullable_double_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_double_channel, echo_async_nullable_double_cb, + self, nullptr); + self->echo_async_nullable_bool_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_bool_channel, echo_async_nullable_bool_cb, self, + nullptr); + self->echo_async_nullable_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_string_channel, echo_async_nullable_string_cb, + self, nullptr); + self->echo_async_nullable_uint8_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_uint8_list_channel, + echo_async_nullable_uint8_list_cb, self, nullptr); + self->echo_async_nullable_object_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableObject", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_object_channel, echo_async_nullable_object_cb, + self, nullptr); + self->echo_async_nullable_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_list_channel, echo_async_nullable_list_cb, self, + nullptr); + self->echo_async_nullable_map_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_map_channel, echo_async_nullable_map_cb, self, + nullptr); + self->echo_async_nullable_enum_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->echo_async_nullable_enum_channel, echo_async_nullable_enum_cb, self, + nullptr); + self->call_flutter_noop_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterNoop", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_noop_channel, call_flutter_noop_cb, self, nullptr); + self->call_flutter_throw_error_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowError", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_throw_error_channel, call_flutter_throw_error_cb, self, + nullptr); + self->call_flutter_throw_error_from_void_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowErrorFromVoid", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_throw_error_from_void_channel, + call_flutter_throw_error_from_void_cb, self, nullptr); + self->call_flutter_echo_all_types_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_all_types_channel, call_flutter_echo_all_types_cb, + self, nullptr); + self->call_flutter_echo_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_all_nullable_types_channel, + call_flutter_echo_all_nullable_types_cb, self, nullptr); + self->call_flutter_send_multiple_nullable_types_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypes", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_send_multiple_nullable_types_channel, + call_flutter_send_multiple_nullable_types_cb, self, nullptr); + self->call_flutter_echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypesWithoutRecursion", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_all_nullable_types_without_recursion_channel, + call_flutter_echo_all_nullable_types_without_recursion_cb, self, nullptr); + self->call_flutter_send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypesWithoutRecursion", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_send_multiple_nullable_types_without_recursion_channel, + call_flutter_send_multiple_nullable_types_without_recursion_cb, self, + nullptr); + self->call_flutter_echo_bool_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_bool_channel, call_flutter_echo_bool_cb, self, + nullptr); + self->call_flutter_echo_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_int_channel, call_flutter_echo_int_cb, self, + nullptr); + self->call_flutter_echo_double_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_double_channel, call_flutter_echo_double_cb, self, + nullptr); + self->call_flutter_echo_string_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_string_channel, call_flutter_echo_string_cb, self, + nullptr); + self->call_flutter_echo_uint8_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_uint8_list_channel, + call_flutter_echo_uint8_list_cb, self, nullptr); + self->call_flutter_echo_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_list_channel, call_flutter_echo_list_cb, self, + nullptr); + self->call_flutter_echo_map_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_map_channel, call_flutter_echo_map_cb, self, + nullptr); + self->call_flutter_echo_enum_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_enum_channel, call_flutter_echo_enum_cb, self, + nullptr); + self->call_flutter_echo_nullable_bool_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableBool", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_bool_channel, + call_flutter_echo_nullable_bool_cb, self, nullptr); + self->call_flutter_echo_nullable_int_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableInt", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_int_channel, + call_flutter_echo_nullable_int_cb, self, nullptr); + self->call_flutter_echo_nullable_double_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableDouble", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_double_channel, + call_flutter_echo_nullable_double_cb, self, nullptr); + self->call_flutter_echo_nullable_string_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_string_channel, + call_flutter_echo_nullable_string_cb, self, nullptr); + self->call_flutter_echo_nullable_uint8_list_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableUint8List", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_uint8_list_channel, + call_flutter_echo_nullable_uint8_list_cb, self, nullptr); + self->call_flutter_echo_nullable_list_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableList", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_list_channel, + call_flutter_echo_nullable_list_cb, self, nullptr); + self->call_flutter_echo_nullable_map_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableMap", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_map_channel, + call_flutter_echo_nullable_map_cb, self, nullptr); + self->call_flutter_echo_nullable_enum_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableEnum", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_echo_nullable_enum_channel, + call_flutter_echo_nullable_enum_cb, self, nullptr); + self->call_flutter_small_api_echo_string_channel = + fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSmallApiEchoString", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + self->call_flutter_small_api_echo_string_channel, + call_flutter_small_api_echo_string_cb, self, nullptr); + + return self; +} + +void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse) response = + core_tests_pigeon_test_host_integration_core_api_noop_async_response_new(); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->noop_async_channel, response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "noopAsync", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse) response = + core_tests_pigeon_test_host_integration_core_api_noop_async_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->noop_async_channel, response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "noopAsync", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_double_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_double_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_string_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_string_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_uint8_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_uint8_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_object_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncObject", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_object_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncObject", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse) response = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->throw_async_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse) response = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->throw_async_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse) + response = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new(); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->throw_async_error_from_void_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncErrorFromVoid", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse) + response = + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->throw_async_error_from_void_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncErrorFromVoid", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse) + response = + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->throw_async_flutter_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncFlutterError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse) + response = + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->throw_async_flutter_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "throwAsyncFlutterError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllTypes* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_all_types_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncAllTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse) response = + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_all_types_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncAllTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_all_nullable_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableAllNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_all_nullable_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableAllNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_all_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableAllNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_all_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableAllNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + double* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_double_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_double_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_object_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableObject", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->echo_async_nullable_object_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableObject", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_async_nullable_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoAsyncNullableEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse) response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new(); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_noop_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterNoop", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse) response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_noop_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterNoop", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_throw_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterThrowError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_throw_error_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterThrowError", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new(); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_throw_error_from_void_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterThrowErrorFromVoid", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_throw_error_from_void_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterThrowErrorFromVoid", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllTypes* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_nullable_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_nullable_types_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_send_multiple_nullable_types_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSendMultipleNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_send_multiple_nullable_types_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSendMultipleNullableTypes", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_all_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoAllNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_send_multiple_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSendMultipleNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_send_multiple_nullable_types_without_recursion_channel, + response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSendMultipleNullableTypesWithoutRecursion", + error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_bool_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t return_value) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_int_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_double_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_double_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_string_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_string_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_list_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_map_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->call_flutter_echo_enum_channel, + response_handle, response->value, + &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_bool_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_bool_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableBool", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_int_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_int_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableInt", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + double* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_double_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_double_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableDouble", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableUint8List", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableList", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_map_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_map_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableMap", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_enum_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_enum_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableEnum", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_small_api_echo_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSmallApiEchoString", error->message); + } +} + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_small_api_echo_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSmallApiEchoString", error->message); + } +} + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec, + core_tests_pigeon_test_flutter_integration_core_api_codec, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_CODEC, + FlStandardMessageCodec) + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiCodec { + FlStandardMessageCodec parent_instance; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec, + core_tests_pigeon_test_flutter_integration_core_api_codec, + fl_standard_message_codec_get_type()) + +static gboolean write_core_tests_pigeon_test_all_classes_wrapper( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { + uint8_t type = 128; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_classes_wrapper_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_all_nullable_types( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllNullableTypes* value, GError** error) { + uint8_t type = 129; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_nullable_types_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean +write_core_tests_pigeon_test_all_nullable_types_without_recursion( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, + GError** error) { + uint8_t type = 130; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( + value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_all_types( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestAllTypes* value, GError** error) { + uint8_t type = 131; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = core_tests_pigeon_test_all_types_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean write_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestTestMessage* value, GError** error) { + uint8_t type = 132; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_test_message_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean core_tests_pigeon_test_flutter_integration_core_api_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { + if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { + switch (fl_value_get_custom_type(value)) { + case 128: + return write_core_tests_pigeon_test_all_classes_wrapper( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( + fl_value_get_custom_value_object(value)), + error); + case 129: + return write_core_tests_pigeon_test_all_nullable_types( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value)), + error); + case 130: + return write_core_tests_pigeon_test_all_nullable_types_without_recursion( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value)), + error); + case 131: + return write_core_tests_pigeon_test_all_types( + codec, buffer, + CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value)), + error); + case 132: + return write_core_tests_pigeon_test_test_message( + codec, buffer, + CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + fl_value_get_custom_value_object(value)), + error); + } + } + + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_codec_parent_class) + ->write_value(codec, buffer, value, error); +} + +static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllClassesWrapper) value = + core_tests_pigeon_test_all_classes_wrapper_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(128, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_all_nullable_types( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllNullableTypes) value = + core_tests_pigeon_test_all_nullable_types_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(129, G_OBJECT(value)); +} + +static FlValue* +read_core_tests_pigeon_test_all_nullable_types_without_recursion( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) value = + core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( + values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(130, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_all_types( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestAllTypes) value = + core_tests_pigeon_test_all_types_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(131, G_OBJECT(value)); +} + +static FlValue* read_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestTestMessage) value = + core_tests_pigeon_test_test_message_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(132, G_OBJECT(value)); +} + +static FlValue* +core_tests_pigeon_test_flutter_integration_core_api_read_value_of_type( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, + GError** error) { + switch (type) { + case 128: + return read_core_tests_pigeon_test_all_classes_wrapper(codec, buffer, + offset, error); + case 129: + return read_core_tests_pigeon_test_all_nullable_types(codec, buffer, + offset, error); + case 130: + return read_core_tests_pigeon_test_all_nullable_types_without_recursion( + codec, buffer, offset, error); + case 131: + return read_core_tests_pigeon_test_all_types(codec, buffer, offset, + error); + case 132: + return read_core_tests_pigeon_test_test_message(codec, buffer, offset, + error); + default: + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_codec_parent_class) + ->read_value_of_type(codec, buffer, offset, type, error); + } +} + +static void core_tests_pigeon_test_flutter_integration_core_api_codec_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_codec_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiCodecClass* klass) { + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = + core_tests_pigeon_test_flutter_integration_core_api_write_value; + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = + core_tests_pigeon_test_flutter_integration_core_api_read_value_of_type; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* +core_tests_pigeon_test_flutter_integration_core_api_codec_new() { + CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_CODEC(g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_codec_get_type(), + nullptr)); + return self; +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApi { + GObject parent_instance; + + FlMethodChannel* channel; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApi, + core_tests_pigeon_test_flutter_integration_core_api, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_flutter_integration_core_api_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object); + g_clear_object(&self->channel); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_flutter_integration_core_api_init( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self) {} + +static void core_tests_pigeon_test_flutter_integration_core_api_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_dispose; +} + +CoreTestsPigeonTestFlutterIntegrationCoreApi* +core_tests_pigeon_test_flutter_integration_core_api_new( + FlBinaryMessenger* messenger) { + CoreTestsPigeonTestFlutterIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_get_type(), + nullptr)); + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec) message_codec = + core_tests_pigeon_test_flutter_integration_core_api_codec_new(); + g_autoptr(FlStandardMethodCodec) codec = + fl_standard_method_codec_new_with_message_codec( + FL_STANDARD_MESSAGE_CODEC(message_codec)); + self->channel = fl_method_channel_new(messenger, "FlutterIntegrationCoreApi", + FL_METHOD_CODEC(codec)); + return self; +} + +void core_tests_pigeon_test_flutter_integration_core_api_noop( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_method_channel_invoke_method(self->channel, "noop", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_throw_error( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_method_channel_invoke_method(self->channel, "throwError", args, + cancellable, callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_method_channel_invoke_method(self->channel, "throwErrorFromVoid", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, + fl_value_new_custom_object(0, G_OBJECT(everything))); + fl_method_channel_invoke_method(self->channel, "echoAllTypes", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllTypes** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref( + CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, + everything != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(everything)) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoAllNullableTypes", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_nullable_bool != nullptr + ? fl_value_new_bool(*a_nullable_bool) + : fl_value_new_null()); + fl_value_append_take(args, a_nullable_int != nullptr + ? fl_value_new_int(*a_nullable_int) + : fl_value_new_null()); + fl_value_append_take(args, a_nullable_string != nullptr + ? fl_value_new_string(a_nullable_string) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "sendMultipleNullableTypes", + args, cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, + everything != nullptr + ? fl_value_new_custom_object(0, G_OBJECT(everything)) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, + "echoAllNullableTypesWithoutRecursion", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, + GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = + g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_nullable_bool != nullptr + ? fl_value_new_bool(*a_nullable_bool) + : fl_value_new_null()); + fl_value_append_take(args, a_nullable_int != nullptr + ? fl_value_new_int(*a_nullable_int) + : fl_value_new_null()); + fl_value_append_take(args, a_nullable_string != nullptr + ? fl_value_new_string(a_nullable_string) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, + "sendMultipleNullableTypesWithoutRecursion", + args, cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, + GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = + g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean a_bool, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_bool(a_bool)); + fl_method_channel_invoke_method(self->channel, "echoBool", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gboolean* return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_bool(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_int( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t an_int, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_int(an_int)); + fl_method_channel_invoke_method(self->channel, "echoInt", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + int64_t* return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_int(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_double( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double a_double, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_double(a_double)); + fl_method_channel_invoke_method(self->channel, "echoDouble", args, + cancellable, callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + double* return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_double(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_string(a_string)); + fl_method_channel_invoke_method(self->channel, "echoString", args, + cancellable, callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_strdup(fl_value_get_string(r)); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_uint8_list(a_list, a_list_length)); + fl_method_channel_invoke_method(self->channel, "echoUint8List", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + uint8_t** return_value, size_t* return_value_length, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = static_cast( + g_memdup2(fl_value_get_uint8_list(r), fl_value_get_length(r))); + *return_value_length = fl_value_get_length(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_ref(a_list)); + fl_method_channel_invoke_method(self->channel, "echoList", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_map( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_ref(a_map)); + fl_method_channel_invoke_method(self->channel, "echoMap", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_int(an_enum)); + fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAnEnum* return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = static_cast(fl_value_get_int(r)); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_bool, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_bool != nullptr ? fl_value_new_bool(*a_bool) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableBool", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gboolean** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_bool(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t* an_int, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, an_int != nullptr ? fl_value_new_int(*an_int) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableInt", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + int64_t** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_int(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_double != nullptr + ? fl_value_new_double(*a_double) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableDouble", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + double** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = fl_value_get_double(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_string != nullptr ? fl_value_new_string(a_string) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableString", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_strdup(fl_value_get_string(r)); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take( + args, a_list != nullptr ? fl_value_new_uint8_list(a_list, a_list_length) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableUint8List", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + uint8_t** return_value, size_t* return_value_length, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = static_cast( + g_memdup2(fl_value_get_uint8_list(r), fl_value_get_length(r))); + *return_value_length = fl_value_get_length(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take( + args, a_list != nullptr ? fl_value_ref(a_list) : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableList", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take( + args, a_map != nullptr ? fl_value_ref(a_map) : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableMap", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref(r); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, an_enum != nullptr ? fl_value_new_int(an_enum) + : fl_value_new_null()); + fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAnEnum** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = static_cast(fl_value_get_int(r)); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_noop_async( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_method_channel_invoke_method(self->channel, "noopAsync", args, cancellable, + callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + return TRUE; +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_string(a_string)); + fl_method_channel_invoke_method(self->channel, "echoAsyncString", args, + cancellable, callback, user_data); +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_strdup(fl_value_get_string(r)); + + return TRUE; +} + +struct _CoreTestsPigeonTestHostTrivialApiNoopResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostTrivialApiNoopResponse, + core_tests_pigeon_test_host_trivial_api_noop_response, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_host_trivial_api_noop_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostTrivialApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API_NOOP_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_trivial_api_noop_response_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_trivial_api_noop_response_init( + CoreTestsPigeonTestHostTrivialApiNoopResponse* self) {} + +static void core_tests_pigeon_test_host_trivial_api_noop_response_class_init( + CoreTestsPigeonTestHostTrivialApiNoopResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_trivial_api_noop_response_dispose; +} + +CoreTestsPigeonTestHostTrivialApiNoopResponse* +core_tests_pigeon_test_host_trivial_api_noop_response_new() { + CoreTestsPigeonTestHostTrivialApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API_NOOP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_trivial_api_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +CoreTestsPigeonTestHostTrivialApiNoopResponse* +core_tests_pigeon_test_host_trivial_api_noop_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostTrivialApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API_NOOP_RESPONSE(g_object_new( + core_tests_pigeon_test_host_trivial_api_noop_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostTrivialApi { + GObject parent_instance; + + FlBinaryMessenger* messenger; + const CoreTestsPigeonTestHostTrivialApiVTable* vtable; + gpointer user_data; + GDestroyNotify user_data_free_func; + + FlBasicMessageChannel* noop_channel; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostTrivialApi, + core_tests_pigeon_test_host_trivial_api, G_TYPE_OBJECT) + +static void noop_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostTrivialApi* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(user_data); + + if (self->vtable == nullptr || self->vtable->noop == nullptr) { + return; + } + + g_autoptr(CoreTestsPigeonTestHostTrivialApiNoopResponse) response = + self->vtable->noop(self, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostTrivialApi", "noop"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostTrivialApi", "noop", + error->message); + } +} + +static void core_tests_pigeon_test_host_trivial_api_dispose(GObject* object) { + CoreTestsPigeonTestHostTrivialApi* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(object); + g_clear_object(&self->messenger); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + + g_clear_object(&self->noop_channel); + G_OBJECT_CLASS(core_tests_pigeon_test_host_trivial_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_trivial_api_init( + CoreTestsPigeonTestHostTrivialApi* self) {} + +static void core_tests_pigeon_test_host_trivial_api_class_init( + CoreTestsPigeonTestHostTrivialApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_trivial_api_dispose; +} + +CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostTrivialApi* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( + core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); + self->messenger = g_object_ref(messenger); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + self->noop_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->noop_channel, noop_cb, + self, nullptr); + + return self; +} + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApiEchoResponse, + core_tests_pigeon_test_host_small_api_echo_response, + CORE_TESTS_PIGEON_TEST, HOST_SMALL_API_ECHO_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostSmallApiEchoResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApiEchoResponse, + core_tests_pigeon_test_host_small_api_echo_response, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_host_small_api_echo_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostSmallApiEchoResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_ECHO_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_small_api_echo_response_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_small_api_echo_response_init( + CoreTestsPigeonTestHostSmallApiEchoResponse* self) {} + +static void core_tests_pigeon_test_host_small_api_echo_response_class_init( + CoreTestsPigeonTestHostSmallApiEchoResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_small_api_echo_response_dispose; +} + +static CoreTestsPigeonTestHostSmallApiEchoResponse* +core_tests_pigeon_test_host_small_api_echo_response_new( + const gchar* return_value) { + CoreTestsPigeonTestHostSmallApiEchoResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_ECHO_RESPONSE(g_object_new( + core_tests_pigeon_test_host_small_api_echo_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(return_value)); + return self; +} + +static CoreTestsPigeonTestHostSmallApiEchoResponse* +core_tests_pigeon_test_host_small_api_echo_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostSmallApiEchoResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_ECHO_RESPONSE(g_object_new( + core_tests_pigeon_test_host_small_api_echo_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApiVoidVoidResponse, + core_tests_pigeon_test_host_small_api_void_void_response, + CORE_TESTS_PIGEON_TEST, HOST_SMALL_API_VOID_VOID_RESPONSE, + GObject) + +struct _CoreTestsPigeonTestHostSmallApiVoidVoidResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApiVoidVoidResponse, + core_tests_pigeon_test_host_small_api_void_void_response, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_host_small_api_void_void_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostSmallApiVoidVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_VOID_VOID_RESPONSE(object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_small_api_void_void_response_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_small_api_void_void_response_init( + CoreTestsPigeonTestHostSmallApiVoidVoidResponse* self) {} + +static void core_tests_pigeon_test_host_small_api_void_void_response_class_init( + CoreTestsPigeonTestHostSmallApiVoidVoidResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_small_api_void_void_response_dispose; +} + +static CoreTestsPigeonTestHostSmallApiVoidVoidResponse* +core_tests_pigeon_test_host_small_api_void_void_response_new() { + CoreTestsPigeonTestHostSmallApiVoidVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_VOID_VOID_RESPONSE(g_object_new( + core_tests_pigeon_test_host_small_api_void_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_null()); + return self; +} + +static CoreTestsPigeonTestHostSmallApiVoidVoidResponse* +core_tests_pigeon_test_host_small_api_void_void_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostSmallApiVoidVoidResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_VOID_VOID_RESPONSE(g_object_new( + core_tests_pigeon_test_host_small_api_void_void_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, fl_value_new_string(message)); + fl_value_append(self->value, details); + return self; +} + +struct _CoreTestsPigeonTestHostSmallApi { + GObject parent_instance; + + FlBinaryMessenger* messenger; + const CoreTestsPigeonTestHostSmallApiVTable* vtable; + gpointer user_data; + GDestroyNotify user_data_free_func; + + FlBasicMessageChannel* echo_channel; + FlBasicMessageChannel* void_void_channel; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApi, + core_tests_pigeon_test_host_small_api, G_TYPE_OBJECT) + +static void echo_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostSmallApi* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(user_data); + + if (self->vtable == nullptr || self->vtable->echo == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + const gchar* a_string = fl_value_get_string(value0); + self->vtable->echo(self, a_string, response_handle, self->user_data); +} + +static void void_void_cb(FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + CoreTestsPigeonTestHostSmallApi* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(user_data); + + if (self->vtable == nullptr || self->vtable->void_void == nullptr) { + return; + } + + self->vtable->void_void(self, response_handle, self->user_data); +} + +static void core_tests_pigeon_test_host_small_api_dispose(GObject* object) { + CoreTestsPigeonTestHostSmallApi* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(object); + g_clear_object(&self->messenger); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + + g_clear_object(&self->echo_channel); + g_clear_object(&self->void_void_channel); + G_OBJECT_CLASS(core_tests_pigeon_test_host_small_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_small_api_init( + CoreTestsPigeonTestHostSmallApi* self) {} + +static void core_tests_pigeon_test_host_small_api_class_init( + CoreTestsPigeonTestHostSmallApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_small_api_dispose; +} + +CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( + g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); + self->messenger = g_object_ref(messenger); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + self->echo_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->echo_channel, echo_cb, + self, nullptr); + self->void_void_channel = fl_basic_message_channel_new( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid", + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(self->void_void_channel, + void_void_cb, self, nullptr); + + return self; +} + +void core_tests_pigeon_test_host_small_api_respond_echo( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = + core_tests_pigeon_test_host_small_api_echo_response_new(return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "echo", + error->message); + } +} + +void core_tests_pigeon_test_host_small_api_respond_error_echo( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = + core_tests_pigeon_test_host_small_api_echo_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond(self->echo_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "echo", + error->message); + } +} + +void core_tests_pigeon_test_host_small_api_respond_void_void( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle) { + g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = + core_tests_pigeon_test_host_small_api_void_void_response_new(); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->void_void_channel, response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", + "voidVoid", error->message); + } +} + +void core_tests_pigeon_test_host_small_api_respond_error_void_void( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = + core_tests_pigeon_test_host_small_api_void_void_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->void_void_channel, response_handle, response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", + "voidVoid", error->message); + } +} + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterSmallApiCodec, + core_tests_pigeon_test_flutter_small_api_codec, + CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API_CODEC, + FlStandardMessageCodec) + +struct _CoreTestsPigeonTestFlutterSmallApiCodec { + FlStandardMessageCodec parent_instance; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApiCodec, + core_tests_pigeon_test_flutter_small_api_codec, + fl_standard_message_codec_get_type()) + +static gboolean write_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GByteArray* buffer, + CoreTestsPigeonTestTestMessage* value, GError** error) { + uint8_t type = 128; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + g_autoptr(FlValue) values = + core_tests_pigeon_test_test_message_to_list(value); + return fl_standard_message_codec_write_value(codec, buffer, values, error); +} + +static gboolean core_tests_pigeon_test_flutter_small_api_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { + if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { + switch (fl_value_get_custom_type(value)) { + case 128: + return write_core_tests_pigeon_test_test_message( + codec, buffer, + CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + fl_value_get_custom_value_object(value)), + error); + } + } + + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_flutter_small_api_codec_parent_class) + ->write_value(codec, buffer, value, error); +} + +static FlValue* read_core_tests_pigeon_test_test_message( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + g_autoptr(FlValue) values = + fl_standard_message_codec_read_value(codec, buffer, offset, error); + if (values == nullptr) { + return nullptr; + } + + g_autoptr(CoreTestsPigeonTestTestMessage) value = + core_tests_pigeon_test_test_message_new_from_list(values); + if (value == nullptr) { + g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, + "Invalid data received for MessageData"); + return nullptr; + } + + return fl_value_new_custom_object_take(128, G_OBJECT(value)); +} + +static FlValue* core_tests_pigeon_test_flutter_small_api_read_value_of_type( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, + GError** error) { + switch (type) { + case 128: + return read_core_tests_pigeon_test_test_message(codec, buffer, offset, + error); + default: + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_flutter_small_api_codec_parent_class) + ->read_value_of_type(codec, buffer, offset, type, error); + } +} + +static void core_tests_pigeon_test_flutter_small_api_codec_init( + CoreTestsPigeonTestFlutterSmallApiCodec* self) {} + +static void core_tests_pigeon_test_flutter_small_api_codec_class_init( + CoreTestsPigeonTestFlutterSmallApiCodecClass* klass) { + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = + core_tests_pigeon_test_flutter_small_api_write_value; + FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = + core_tests_pigeon_test_flutter_small_api_read_value_of_type; +} + +static CoreTestsPigeonTestFlutterSmallApiCodec* +core_tests_pigeon_test_flutter_small_api_codec_new() { + CoreTestsPigeonTestFlutterSmallApiCodec* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_CODEC(g_object_new( + core_tests_pigeon_test_flutter_small_api_codec_get_type(), nullptr)); + return self; +} + +struct _CoreTestsPigeonTestFlutterSmallApi { + GObject parent_instance; + + FlMethodChannel* channel; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApi, + core_tests_pigeon_test_flutter_small_api, G_TYPE_OBJECT) + +static void core_tests_pigeon_test_flutter_small_api_dispose(GObject* object) { + CoreTestsPigeonTestFlutterSmallApi* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object); + g_clear_object(&self->channel); + G_OBJECT_CLASS(core_tests_pigeon_test_flutter_small_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_flutter_small_api_init( + CoreTestsPigeonTestFlutterSmallApi* self) {} + +static void core_tests_pigeon_test_flutter_small_api_class_init( + CoreTestsPigeonTestFlutterSmallApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_small_api_dispose; +} + +CoreTestsPigeonTestFlutterSmallApi* +core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger) { + CoreTestsPigeonTestFlutterSmallApi* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(g_object_new( + core_tests_pigeon_test_flutter_small_api_get_type(), nullptr)); + g_autoptr(CoreTestsPigeonTestFlutterSmallApiCodec) message_codec = + core_tests_pigeon_test_flutter_small_api_codec_new(); + g_autoptr(FlStandardMethodCodec) codec = + fl_standard_method_codec_new_with_message_codec( + FL_STANDARD_MESSAGE_CODEC(message_codec)); + self->channel = fl_method_channel_new(messenger, "FlutterSmallApi", + FL_METHOD_CODEC(codec)); + return self; +} + +void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( + CoreTestsPigeonTestFlutterSmallApi* self, + CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_custom_object(0, G_OBJECT(msg))); + fl_method_channel_invoke_method(self->channel, "echoWrappedList", args, + cancellable, callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( + CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + CoreTestsPigeonTestTestMessage** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_object_ref( + CORE_TESTS_PIGEON_TEST_TEST_MESSAGE(fl_value_get_custom_value_object(r))); + + return TRUE; +} + +void core_tests_pigeon_test_flutter_small_api_echo_string( + CoreTestsPigeonTestFlutterSmallApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_new_string(a_string)); + fl_method_channel_invoke_method(self->channel, "echoString", args, + cancellable, callback, user_data); +} + +gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + gchar** return_value, GError** error) { + g_autoptr(FlMethodResponse) response = + fl_method_channel_invoke_method_finish(self->channel, result, error); + if (response == nullptr) { + return FALSE; + } + + g_autoptr(FlValue) r = fl_method_response_get_result(response, error); + if (r == nullptr) { + return FALSE; + } + + *return_value = g_strdup(fl_value_get_string(r)); + + return TRUE; +} diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h new file mode 100644 index 000000000000..1a114b4d09ac --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -0,0 +1,1955 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#ifndef PIGEON_CORE_TESTS_GEN_H_ +#define PIGEON_CORE_TESTS_GEN_H_ + +#include + +G_BEGIN_DECLS + +typedef enum { + PIGEON_INTEGRATION_TESTS_AN_ENUM_ONE = 0, + PIGEON_INTEGRATION_TESTS_AN_ENUM_TWO = 1, + PIGEON_INTEGRATION_TESTS_AN_ENUM_THREE = 2, + PIGEON_INTEGRATION_TESTS_AN_ENUM_FORTY_TWO = 3, + PIGEON_INTEGRATION_TESTS_AN_ENUM_FOUR_HUNDRED_TWENTY_TWO = 4 +} CoreTestsPigeonTestAnEnum; + +// A class containing all supported types. +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllTypes, + core_tests_pigeon_test_all_types, CORE_TESTS_PIGEON_TEST, + ALL_TYPES, GObject) + +CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( + gboolean a_bool, int64_t an_int, int64_t an_int64, double a_double, + const uint8_t* a_byte_array, size_t a_byte_array_length, + const int32_t* a4_byte_array, size_t a4_byte_array_length, + const int64_t* a8_byte_array, size_t a8_byte_array_length, + const double* a_float_array, size_t a_float_array_length, FlValue* a_list, + FlValue* a_map, CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, + FlValue* an_object); + +gboolean core_tests_pigeon_test_all_types_get_a_bool( + CoreTestsPigeonTestAllTypes* self); + +int64_t core_tests_pigeon_test_all_types_get_an_int( + CoreTestsPigeonTestAllTypes* self); + +int64_t core_tests_pigeon_test_all_types_get_an_int64( + CoreTestsPigeonTestAllTypes* self); + +double core_tests_pigeon_test_all_types_get_a_double( + CoreTestsPigeonTestAllTypes* self); + +const uint8_t* core_tests_pigeon_test_all_types_get_a_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length); + +const int32_t* core_tests_pigeon_test_all_types_get_a4_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length); + +const int64_t* core_tests_pigeon_test_all_types_get_a8_byte_array( + CoreTestsPigeonTestAllTypes* self, size_t* length); + +const double* core_tests_pigeon_test_all_types_get_a_float_array( + CoreTestsPigeonTestAllTypes* self, size_t* length); + +FlValue* core_tests_pigeon_test_all_types_get_a_list( + CoreTestsPigeonTestAllTypes* self); + +FlValue* core_tests_pigeon_test_all_types_get_a_map( + CoreTestsPigeonTestAllTypes* self); + +CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( + CoreTestsPigeonTestAllTypes* self); + +const gchar* core_tests_pigeon_test_all_types_get_a_string( + CoreTestsPigeonTestAllTypes* self); + +FlValue* core_tests_pigeon_test_all_types_get_an_object( + CoreTestsPigeonTestAllTypes* self); + +// A class containing all supported nullable types. +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllNullableTypes, + core_tests_pigeon_test_all_nullable_types, + CORE_TESTS_PIGEON_TEST, ALL_NULLABLE_TYPES, GObject) + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_nullable_types_new( + gboolean* a_nullable_bool, int64_t* a_nullable_int, + int64_t* a_nullable_int64, double* a_nullable_double, + const uint8_t* a_nullable_byte_array, size_t a_nullable_byte_array_length, + const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, + const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, + const double* a_nullable_float_array, size_t a_nullable_float_array_length, + FlValue* a_nullable_list, FlValue* a_nullable_map, + FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, + FlValue* nullable_map_with_object, + CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, + FlValue* a_nullable_object, + CoreTestsPigeonTestAllNullableTypes* all_nullable_types); + +gboolean* core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool( + CoreTestsPigeonTestAllNullableTypes* self); + +int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int( + CoreTestsPigeonTestAllNullableTypes* self); + +int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int64( + CoreTestsPigeonTestAllNullableTypes* self); + +double* core_tests_pigeon_test_all_nullable_types_get_a_nullable_double( + CoreTestsPigeonTestAllNullableTypes* self); + +const uint8_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length); + +const int32_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable4_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length); + +const int64_t* +core_tests_pigeon_test_all_nullable_types_get_a_nullable8_byte_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length); + +const double* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array( + CoreTestsPigeonTestAllNullableTypes* self, size_t* length); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_map( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_annotations( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_object( + CoreTestsPigeonTestAllNullableTypes* self); + +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_all_nullable_types_get_a_nullable_enum( + CoreTestsPigeonTestAllNullableTypes* self); + +const gchar* core_tests_pigeon_test_all_nullable_types_get_a_nullable_string( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_object( + CoreTestsPigeonTestAllNullableTypes* self); + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_nullable_types_get_all_nullable_types( + CoreTestsPigeonTestAllNullableTypes* self); + +// The primary purpose for this class is to ensure coverage of Swift structs +// with nullable items, as the primary [AllNullableTypes] class is being used to +// test Swift classes. +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion, + core_tests_pigeon_test_all_nullable_types_without_recursion, + CORE_TESTS_PIGEON_TEST, ALL_NULLABLE_TYPES_WITHOUT_RECURSION, GObject) + +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_all_nullable_types_without_recursion_new( + gboolean* a_nullable_bool, int64_t* a_nullable_int, + int64_t* a_nullable_int64, double* a_nullable_double, + const uint8_t* a_nullable_byte_array, size_t a_nullable_byte_array_length, + const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, + const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, + const double* a_nullable_float_array, size_t a_nullable_float_array_length, + FlValue* a_nullable_list, FlValue* a_nullable_map, + FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, + FlValue* nullable_map_with_object, + CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, + FlValue* a_nullable_object); + +gboolean* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_bool( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int64( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +double* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_double( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +const uint8_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); + +const int32_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable4_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); + +const int64_t* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable8_byte_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); + +const double* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float_array( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_map( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_annotations( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_object( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_enum( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +const gchar* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_string( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_object( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +// A class for testing nested class handling. +// +// This is needed to test nested nullable and non-nullable classes, +// `AllNullableTypes` is non-nullable here as it is easier to instantiate +// than `AllTypes` when testing doesn't require both (ie. testing null classes). +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllClassesWrapper, + core_tests_pigeon_test_all_classes_wrapper, + CORE_TESTS_PIGEON_TEST, ALL_CLASSES_WRAPPER, GObject) + +CoreTestsPigeonTestAllClassesWrapper* +core_tests_pigeon_test_all_classes_wrapper_new( + CoreTestsPigeonTestAllNullableTypes* all_nullable_types, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* + all_nullable_types_without_recursion, + CoreTestsPigeonTestAllTypes* all_types); + +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types( + CoreTestsPigeonTestAllClassesWrapper* self); + +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types_without_recursion( + CoreTestsPigeonTestAllClassesWrapper* self); + +CoreTestsPigeonTestAllTypes* +core_tests_pigeon_test_all_classes_wrapper_get_all_types( + CoreTestsPigeonTestAllClassesWrapper* self); + +// A data class containing a List, used in unit tests. +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestTestMessage, + core_tests_pigeon_test_test_message, + CORE_TESTS_PIGEON_TEST, TEST_MESSAGE, GObject) + +CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( + FlValue* test_list); + +FlValue* core_tests_pigeon_test_test_message_get_test_list( + CoreTestsPigeonTestTestMessage* self); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse, + core_tests_pigeon_test_host_integration_core_api_noop_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_NOOP_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_host_integration_core_api_noop_response_new(); + +CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_host_integration_core_api_noop_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_types_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( + CoreTestsPigeonTestAllTypes* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_error_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse, + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new(); + +CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse, + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_THROW_FLUTTER_ERROR_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_int_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_INT_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( + int64_t return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_double_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( + double return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_bool_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( + gboolean return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_string_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( + const gchar* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_object_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_OBJECT_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_list_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_map_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse, + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_CLASS_WRAPPER_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new( + CoreTestsPigeonTestAllClassesWrapper* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_enum_response, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( + CoreTestsPigeonTestAnEnum return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NAMED_DEFAULT_STRING_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new( + const gchar* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_DEFAULT_DOUBLE_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new( + double return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_required_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_REQUIRED_INT_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new( + int64_t return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_EXTRACT_NESTED_NULLABLE_STRING_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new( + const gchar* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_CREATE_NESTED_NULLABLE_STRING_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new( + CoreTestsPigeonTestAllClassesWrapper* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse, + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new( + CoreTestsPigeonTestAllNullableTypes* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new( + int64_t* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new( + double* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new( + gboolean* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new( + const gchar* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new( + const uint8_t* return_value, size_t return_value_length); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_OBJECT_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new( + FlValue* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new( + CoreTestsPigeonTestAnEnum* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse, + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_NULLABLE_INT_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new( + int64_t* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse, + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NAMED_NULLABLE_STRING_RESPONSE, GObject) + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new( + const gchar* return_value); + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, + core_tests_pigeon_test_host_integration_core_api, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API, GObject) + +typedef struct { + CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* (*noop)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* ( + *echo_all_types)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* (*throw_error)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* ( + *throw_error_from_void)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* ( + *throw_flutter_error)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* (*echo_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* (*echo_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* (*echo_bool)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* (*echo_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* ( + *echo_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* (*echo_object)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* (*echo_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* (*echo_map)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* ( + *echo_class_wrapper)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllClassesWrapper* wrapper, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* (*echo_enum)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* ( + *echo_named_default_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* ( + *echo_optional_default_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* ( + *echo_required_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t an_int, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* ( + *echo_all_nullable_types)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* ( + *echo_all_nullable_types_without_recursion)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* ( + *extract_nested_nullable_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* ( + *create_nested_nullable_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* nullable_string, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* ( + *send_multiple_nullable_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* ( + *send_multiple_nullable_types_without_recursion)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* ( + *echo_nullable_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t* a_nullable_int, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* ( + *echo_nullable_double)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + double* a_nullable_double, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* ( + *echo_nullable_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* ( + *echo_nullable_string)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* a_nullable_string, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* ( + *echo_nullable_uint8_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* ( + *echo_nullable_object)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_object, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* ( + *echo_nullable_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_list, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* ( + *echo_nullable_map)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_map, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* ( + *echo_nullable_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* ( + *echo_optional_nullable_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* a_nullable_int, + gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* ( + *echo_named_nullable_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* a_nullable_string, gpointer user_data); + void (*noop_async)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t an_int, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean a_bool, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_uint8_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_object)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_map)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*throw_async_error)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*throw_async_error_from_void)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*throw_async_flutter_error)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_all_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_all_nullable_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_all_nullable_types_without_recursion)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_bool)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_uint8_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_object)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_map)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*echo_async_nullable_enum)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_noop)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_throw_error)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_throw_error_from_void)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_all_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_all_nullable_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_send_multiple_nullable_types)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_all_nullable_types_without_recursion)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_send_multiple_nullable_types_without_recursion)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_bool)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_uint8_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_map)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_enum)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_bool)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_double)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_uint8_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_map)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_echo_nullable_enum)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + void (*call_flutter_small_api_echo_string)( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); +} CoreTestsPigeonTestHostIntegrationCoreApiVTable; + +CoreTestsPigeonTestHostIntegrationCoreApi* +core_tests_pigeon_test_host_integration_core_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, + gpointer user_data, GDestroyNotify user_data_free_func); + +void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value, size_t return_value_length); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllTypes* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value, size_t return_value_length); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllTypes* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypes* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value, size_t return_value_length); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gboolean* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + int64_t* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, double* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const uint8_t* return_value, size_t return_value_length); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +// The core interface that the Dart platform_test code implements for host +// integration tests to call into. +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApi, + core_tests_pigeon_test_flutter_integration_core_api, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API, + GObject) + +CoreTestsPigeonTestFlutterIntegrationCoreApi* +core_tests_pigeon_test_flutter_integration_core_api_new( + FlBinaryMessenger* messenger); + +// A no-op function taking no arguments and returning no value, to sanity +// test basic calling. +void core_tests_pigeon_test_flutter_integration_core_api_noop( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error); + +// Responds with an error from an async function returning a value. +void core_tests_pigeon_test_flutter_integration_core_api_throw_error( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error); + +// Responds with an error from an async void function. +void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error); + +// Returns the passed object, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllTypes** return_value, GError** error); + +// Returns the passed object, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); + +// Returns passed in arguments of multiple types. +// +// Tests multiple-arity FlutterApi handling. +void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); + +// Returns the passed object, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, + GError** error); + +// Returns passed in arguments of multiple types. +// +// Tests multiple-arity FlutterApi handling. +void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, + GError** error); + +// Returns the passed boolean, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean a_bool, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gboolean* return_value, GError** error); + +// Returns the passed int, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_int( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t an_int, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + int64_t* return_value, GError** error); + +// Returns the passed double, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_double( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double a_double, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + double* return_value, GError** error); + +// Returns the passed string, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error); + +// Returns the passed byte list, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + uint8_t** return_value, size_t* return_value_length, GError** error); + +// Returns the passed list, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error); + +// Returns the passed map, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_map( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error); + +// Returns the passed enum to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAnEnum* return_value, GError** error); + +// Returns the passed boolean, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_bool, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gboolean** return_value, GError** error); + +// Returns the passed int, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t* an_int, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + int64_t** return_value, GError** error); + +// Returns the passed double, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + double** return_value, GError** error); + +// Returns the passed string, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error); + +// Returns the passed byte list, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + uint8_t** return_value, size_t* return_value_length, GError** error); + +// Returns the passed list, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_list, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error); + +// Returns the passed map, to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + FlValue** return_value, GError** error); + +// Returns the passed enum to test serialization and deserialization. +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestAnEnum** return_value, GError** error); + +// A no-op function taking no arguments and returning no value, to sanity +// test basic asynchronous calling. +void core_tests_pigeon_test_flutter_integration_core_api_noop_async( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error); + +// Returns the passed in generic Object asynchronously. +void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + gchar** return_value, GError** error); + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApiNoopResponse, + core_tests_pigeon_test_host_trivial_api_noop_response, + CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API_NOOP_RESPONSE, + GObject) + +CoreTestsPigeonTestHostTrivialApiNoopResponse* +core_tests_pigeon_test_host_trivial_api_noop_response_new(); + +CoreTestsPigeonTestHostTrivialApiNoopResponse* +core_tests_pigeon_test_host_trivial_api_noop_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApi, + core_tests_pigeon_test_host_trivial_api, + CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API, GObject) + +typedef struct { + CoreTestsPigeonTestHostTrivialApiNoopResponse* (*noop)( + CoreTestsPigeonTestHostTrivialApi* self, gpointer user_data); +} CoreTestsPigeonTestHostTrivialApiVTable; + +CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func); + +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, + core_tests_pigeon_test_host_small_api, + CORE_TESTS_PIGEON_TEST, HOST_SMALL_API, GObject) + +typedef struct { + void (*echo)(CoreTestsPigeonTestHostSmallApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); + void (*void_void)(CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data); +} CoreTestsPigeonTestHostSmallApiVTable; + +CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( + FlBinaryMessenger* messenger, + const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func); + +void core_tests_pigeon_test_host_small_api_respond_echo( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value); + +void core_tests_pigeon_test_host_small_api_respond_error_echo( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +void core_tests_pigeon_test_host_small_api_respond_void_void( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle); + +void core_tests_pigeon_test_host_small_api_respond_error_void_void( + CoreTestsPigeonTestHostSmallApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details); + +// A simple API called in some unit tests. +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterSmallApi, + core_tests_pigeon_test_flutter_small_api, + CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API, GObject) + +CoreTestsPigeonTestFlutterSmallApi* +core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger); + +void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( + CoreTestsPigeonTestFlutterSmallApi* self, + CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( + CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + CoreTestsPigeonTestTestMessage** return_value, GError** error); + +void core_tests_pigeon_test_flutter_small_api_echo_string( + CoreTestsPigeonTestFlutterSmallApi* self, const gchar* a_string, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data); + +gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + gchar** return_value, GError** error); + +G_END_DECLS + +#endif // PIGEON_CORE_TESTS_GEN_H_ From 42c7c42535771bf0c416d1d5e08cb1ca503ebf12 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 16 Apr 2024 12:12:52 -0400 Subject: [PATCH 039/127] Add the new generator type to integration test plumbing --- .../shared_test_plugin_code/lib/integration_tests.dart | 3 +++ .../test_plugin/example/integration_test/test.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index caa448cac366..a0a0c2458224 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -18,6 +18,9 @@ enum TargetGenerator { /// The Windows C++ generator. cpp, + /// The Linux GObject generator. + gobject, + /// The Android Java generator. java, diff --git a/packages/pigeon/platform_tests/test_plugin/example/integration_test/test.dart b/packages/pigeon/platform_tests/test_plugin/example/integration_test/test.dart index bfbe0b7085a6..535e39206dd8 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/integration_test/test.dart +++ b/packages/pigeon/platform_tests/test_plugin/example/integration_test/test.dart @@ -15,6 +15,9 @@ TargetGenerator _getTarget() { if (Platform.isIOS || Platform.isMacOS) { return TargetGenerator.swift; } + if (Platform.isLinux) { + return TargetGenerator.gobject; + } if (Platform.isWindows) { return TargetGenerator.cpp; } From c17b9a9b436981ee0c9eeb8d9b6a9d6c6ba27633 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 09:44:33 +1200 Subject: [PATCH 040/127] Allocate nullable primitives, fix returning them --- packages/pigeon/lib/gobject_generator.dart | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index d03b4b43faad..3e5d34263b65 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -464,10 +464,6 @@ class GObjectSourceGenerator extends StructuredGenerator { if (_isNumericListType(field.type)) { indent.writeln('size_t ${fieldName}_length;'); } - if (_isNullablePrimitiveType(field.type)) { - indent.writeln( - '${_getType(module, field.type, isOutput: true, primitive: true)} ${fieldName}_value;'); - } } }); @@ -515,10 +511,16 @@ class GObjectSourceGenerator extends StructuredGenerator { lengthVariableName: '${fieldName}_length'); if (_isNullablePrimitiveType(field.type)) { - indent.writeln( - 'self->${fieldName}_value = $value != nullptr ? *$value : ${_getDefaultValue(module, field.type, primitive: true)};'); - indent.writeln( - 'self->$fieldName = $value != nullptr ? &self->${fieldName}_value : nullptr;'); + final String primitiveType = + _getType(module, field.type, primitive: true); + indent.writeScoped('if ($value != nullptr) {', '}', () { + indent.writeln( + 'self->$fieldName = static_cast<$primitiveType*>(malloc(sizeof($primitiveType)));'); + indent.writeln('*self->$fieldName = *$value;'); + }); + indent.writeScoped('else {', '}', () { + indent.writeln('self->$fieldName = nullptr;'); + }); } else { indent.writeln('self->$fieldName = $value;'); } @@ -717,8 +719,22 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final String returnValue = _fromFlValue(module, method.returnType, 'r'); - indent.writeln( - '*return_value = ${_referenceValue(method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); + if (_isNullablePrimitiveType(method.returnType)) { + final String primitiveType = + _getType(module, method.returnType, primitive: true); + indent.writeScoped( + 'if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) {', '}', () { + indent.writeln( + '*return_value = static_cast<$primitiveType*>(malloc(sizeof($primitiveType)));'); + indent.writeln('**return_value = $returnValue;'); + }); + indent.writeScoped('else {', '}', () { + indent.writeln('*return_value = nullptr;'); + }); + } else { + indent.writeln( + '*return_value = ${_referenceValue(method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); + } if (_isNumericListType(method.returnType)) { indent.writeln('*return_value_length = fl_value_get_length(r);'); } @@ -1385,6 +1401,8 @@ String? _getClearFunction(TypeDeclaration type, String variableName) { return 'g_clear_pointer(&$variableName, fl_value_unref)'; } else if (type.baseName == 'String') { return 'g_clear_pointer(&$variableName, g_free)'; + } else if (_isNullablePrimitiveType(type)) { + return 'g_clear_pointer(&$variableName, g_free)'; } else { return null; } From 21f896547def1d173402a0221ba2d31565e1b747 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 11:31:53 +1200 Subject: [PATCH 041/127] Update test --- packages/pigeon/test/gobject_generator_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 2ea55c7d079b..0c6543660d39 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -673,7 +673,7 @@ void main() { expect( code, contains( - ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, fl_value_get_bool(value0), fl_value_get_int(value1), fl_value_get_string(value2), value3, value4, TEST_PACKAGE_PARAMETER_OBJECT(fl_value_get_custom_value_object(value5)), TEST_PACKAGE_OBJECT(fl_value_get_custom_value_object(value6)), self->user_data);')); + ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, a_bool, an_int, a_string, a_list, a_map, an_object, a_generic_object, self->user_data);')); } }); From f5764cdae2f0bbf92165a6f93f1a0c82cc9fcf88 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 12:51:52 +1200 Subject: [PATCH 042/127] Implement Linux tests --- .../linux/pigeon/core_tests.gen.cc | 115 ++- .../test_plugin/linux/test_plugin.cc | 715 +++++++++++++++++- 2 files changed, 783 insertions(+), 47 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 9bfaeee87638..67f790cae3f0 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -233,13 +233,9 @@ struct _CoreTestsPigeonTestAllNullableTypes { GObject parent_instance; gboolean* a_nullable_bool; - gboolean a_nullable_bool_value; int64_t* a_nullable_int; - int64_t a_nullable_int_value; int64_t* a_nullable_int64; - int64_t a_nullable_int64_value; double* a_nullable_double; - double a_nullable_double_value; uint8_t* a_nullable_byte_array; size_t a_nullable_byte_array_length; int32_t* a_nullable4_byte_array; @@ -265,6 +261,10 @@ G_DEFINE_TYPE(CoreTestsPigeonTestAllNullableTypes, static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { CoreTestsPigeonTestAllNullableTypes* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(object); + g_clear_pointer(&self->a_nullable_bool, g_free); + g_clear_pointer(&self->a_nullable_int, g_free); + g_clear_pointer(&self->a_nullable_int64, g_free); + g_clear_pointer(&self->a_nullable_double, g_free); g_clear_pointer(&self->a_nullable_list, fl_value_unref); g_clear_pointer(&self->a_nullable_map, fl_value_unref); g_clear_pointer(&self->nullable_nested_list, fl_value_unref); @@ -303,21 +303,30 @@ core_tests_pigeon_test_all_nullable_types_new( CoreTestsPigeonTestAllNullableTypes* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(g_object_new( core_tests_pigeon_test_all_nullable_types_get_type(), nullptr)); - self->a_nullable_bool_value = - a_nullable_bool != nullptr ? *a_nullable_bool : FALSE; - self->a_nullable_bool = - a_nullable_bool != nullptr ? &self->a_nullable_bool_value : nullptr; - self->a_nullable_int_value = a_nullable_int != nullptr ? *a_nullable_int : 0; - self->a_nullable_int = - a_nullable_int != nullptr ? &self->a_nullable_int_value : nullptr; - self->a_nullable_int64_value = - a_nullable_int64 != nullptr ? *a_nullable_int64 : 0; - self->a_nullable_int64 = - a_nullable_int64 != nullptr ? &self->a_nullable_int64_value : nullptr; - self->a_nullable_double_value = - a_nullable_double != nullptr ? *a_nullable_double : 0.0; - self->a_nullable_double = - a_nullable_double != nullptr ? &self->a_nullable_double_value : nullptr; + if (a_nullable_bool != nullptr) { + self->a_nullable_bool = static_cast(malloc(sizeof(gboolean))); + *self->a_nullable_bool = *a_nullable_bool; + } else { + self->a_nullable_bool = nullptr; + } + if (a_nullable_int != nullptr) { + self->a_nullable_int = static_cast(malloc(sizeof(int64_t))); + *self->a_nullable_int = *a_nullable_int; + } else { + self->a_nullable_int = nullptr; + } + if (a_nullable_int64 != nullptr) { + self->a_nullable_int64 = static_cast(malloc(sizeof(int64_t))); + *self->a_nullable_int64 = *a_nullable_int64; + } else { + self->a_nullable_int64 = nullptr; + } + if (a_nullable_double != nullptr) { + self->a_nullable_double = static_cast(malloc(sizeof(double))); + *self->a_nullable_double = *a_nullable_double; + } else { + self->a_nullable_double = nullptr; + } self->a_nullable_byte_array = static_cast( g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; @@ -640,13 +649,9 @@ struct _CoreTestsPigeonTestAllNullableTypesWithoutRecursion { GObject parent_instance; gboolean* a_nullable_bool; - gboolean a_nullable_bool_value; int64_t* a_nullable_int; - int64_t a_nullable_int_value; int64_t* a_nullable_int64; - int64_t a_nullable_int64_value; double* a_nullable_double; - double a_nullable_double_value; uint8_t* a_nullable_byte_array; size_t a_nullable_byte_array_length; int32_t* a_nullable4_byte_array; @@ -673,6 +678,10 @@ static void core_tests_pigeon_test_all_nullable_types_without_recursion_dispose( GObject* object) { CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(object); + g_clear_pointer(&self->a_nullable_bool, g_free); + g_clear_pointer(&self->a_nullable_int, g_free); + g_clear_pointer(&self->a_nullable_int64, g_free); + g_clear_pointer(&self->a_nullable_double, g_free); g_clear_pointer(&self->a_nullable_list, fl_value_unref); g_clear_pointer(&self->a_nullable_map, fl_value_unref); g_clear_pointer(&self->nullable_nested_list, fl_value_unref); @@ -712,21 +721,30 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(g_object_new( core_tests_pigeon_test_all_nullable_types_without_recursion_get_type(), nullptr)); - self->a_nullable_bool_value = - a_nullable_bool != nullptr ? *a_nullable_bool : FALSE; - self->a_nullable_bool = - a_nullable_bool != nullptr ? &self->a_nullable_bool_value : nullptr; - self->a_nullable_int_value = a_nullable_int != nullptr ? *a_nullable_int : 0; - self->a_nullable_int = - a_nullable_int != nullptr ? &self->a_nullable_int_value : nullptr; - self->a_nullable_int64_value = - a_nullable_int64 != nullptr ? *a_nullable_int64 : 0; - self->a_nullable_int64 = - a_nullable_int64 != nullptr ? &self->a_nullable_int64_value : nullptr; - self->a_nullable_double_value = - a_nullable_double != nullptr ? *a_nullable_double : 0.0; - self->a_nullable_double = - a_nullable_double != nullptr ? &self->a_nullable_double_value : nullptr; + if (a_nullable_bool != nullptr) { + self->a_nullable_bool = static_cast(malloc(sizeof(gboolean))); + *self->a_nullable_bool = *a_nullable_bool; + } else { + self->a_nullable_bool = nullptr; + } + if (a_nullable_int != nullptr) { + self->a_nullable_int = static_cast(malloc(sizeof(int64_t))); + *self->a_nullable_int = *a_nullable_int; + } else { + self->a_nullable_int = nullptr; + } + if (a_nullable_int64 != nullptr) { + self->a_nullable_int64 = static_cast(malloc(sizeof(int64_t))); + *self->a_nullable_int64 = *a_nullable_int64; + } else { + self->a_nullable_int64 = nullptr; + } + if (a_nullable_double != nullptr) { + self->a_nullable_double = static_cast(malloc(sizeof(double))); + *self->a_nullable_double = *a_nullable_double; + } else { + self->a_nullable_double = nullptr; + } self->a_nullable_byte_array = static_cast( g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; @@ -12789,7 +12807,12 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( return FALSE; } - *return_value = fl_value_get_bool(r); + if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + *return_value = static_cast(malloc(sizeof(gboolean))); + **return_value = fl_value_get_bool(r); + } else { + *return_value = nullptr; + } return TRUE; } @@ -12820,7 +12843,12 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( return FALSE; } - *return_value = fl_value_get_int(r); + if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + *return_value = static_cast(malloc(sizeof(int64_t))); + **return_value = fl_value_get_int(r); + } else { + *return_value = nullptr; + } return TRUE; } @@ -12852,7 +12880,12 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( return FALSE; } - *return_value = fl_value_get_double(r); + if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + *return_value = static_cast(malloc(sizeof(double))); + **return_value = fl_value_get_double(r); + } else { + *return_value = nullptr; + } return TRUE; } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 140703beb5d6..d0f6a42c3fba 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -10,6 +10,7 @@ #include +#include "pigeon/core_tests.gen.h" #include "test_plugin_private.h" #define TEST_PLUGIN(obj) \ @@ -17,10 +18,701 @@ struct _TestPlugin { GObject parent_instance; + + CoreTestsPigeonTestHostIntegrationCoreApi* host_core_api; + + CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; }; G_DEFINE_TYPE(TestPlugin, test_plugin, g_object_get_type()) +static CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_noop_response_new(); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* +echo_all_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( + everything); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( + "An error", "", nullptr); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* +throw_error_from_void(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( + "An error", "", nullptr); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* +throw_flutter_error(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gpointer user_data) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + return core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( + "code", "message", details); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( + an_int); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( + a_double); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( + a_bool); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( + an_string); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* +echo_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( + a_uint8_list, a_uint8_list_length); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* echo_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( + an_object); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( + a_list); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( + a_map); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* +echo_class_wrapper(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllClassesWrapper* wrapper, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, gpointer user_data) { + return core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( + an_enum); +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* +echo_named_default_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* a_string, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* +echo_optional_default_double(CoreTestsPigeonTestHostIntegrationCoreApi* self, + double a_double, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* +echo_required_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t an_int, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* +echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* +extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllClassesWrapper* wrapper, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* +create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* nullable_string, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* +send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* +echo_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t* a_nullable_int, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* +echo_nullable_double(CoreTestsPigeonTestHostIntegrationCoreApi* self, + double* a_nullable_double, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* +echo_nullable_bool(CoreTestsPigeonTestHostIntegrationCoreApi* self, + gboolean* a_nullable_bool, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* +echo_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* a_nullable_string, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* +echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_nullable_uint8_list, + size_t a_nullable_uint8_list_length, + gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* +echo_nullable_object(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_object, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* +echo_nullable_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_list, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* +echo_nullable_map(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_nullable_map, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* +echo_nullable_enum(CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* +echo_optional_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t* a_nullable_int, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* +echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, + const gchar* a_nullable_string, gpointer user_data) { + // FIXME +} + +static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_noop( + self, response_handle); +} + +static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, + int64_t an_int, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( + self, response_handle, an_int); +} + +static void echo_async_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( + self, response_handle, a_double); +} + +static void echo_async_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( + self, response_handle, a_bool); +} + +static void echo_async_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( + self, response_handle, a_string); +} + +static void echo_async_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( + self, response_handle, a_uint8_list, a_uint8_list_length); +} + +static void echo_async_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( + self, response_handle, a_object); +} + +static void echo_async_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( + self, response_handle, a_list); +} + +static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( + self, response_handle, a_map); +} + +static void echo_async_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( + self, response_handle, an_enum); +} + +static void throw_async_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( + self, response_handle, "code", "message", details); +} + +static void throw_async_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( + self, response_handle, "code", "message", details); +} + +static void throw_async_flutter_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + g_autoptr(FlValue) details = fl_value_new_string("details"); + core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( + self, response_handle, "code", "message", details); +} + +static void echo_async_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( + self, response_handle, everything); +} + +static void echo_async_nullable_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types( + self, response_handle, everything); +} + +static void echo_async_nullable_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types_without_recursion( + self, response_handle, everything); +} + +static void echo_async_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( + self, response_handle, an_int); +} + +static void echo_async_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( + self, response_handle, a_double); +} + +static void echo_async_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( + self, response_handle, a_bool); +} + +static void echo_async_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( + self, response_handle, a_string); +} + +static void echo_async_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( + self, response_handle, a_uint8_list, a_uint8_list_length); +} + +static void echo_async_nullable_object( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( + self, response_handle, a_object); +} + +static void echo_async_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void echo_async_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void echo_async_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_noop( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_throw_error( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_throw_error_from_void( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_all_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_all_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypes* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_send_multiple_nullable_types( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_all_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_send_multiple_nullable_types_without_recursion( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_bool( + CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_int( + CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_double( + CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_uint8_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) { + // FIXME +} + +static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(FLValue) return_value = nullptr; + g_autoptr(GError) error = nullptr; + gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); +} + +static void call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + TestPlugin* self = TEST_PLUGIN(user_data); + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( + self->flutter_core_api, a_list, nullptr, echo_nullable_list_cb, + user_data); +} + +static void call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestAnEnum* an_enum, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static void call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + // FIXME +} + +static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { + .noop = noop, + .echo_all_types = echo_all_types, + .throw_error = throw_error, + .throw_error_from_void = throw_error_from_void, + .throw_flutter_error = throw_flutter_error, + .echo_int = echo_int, + .echo_double = echo_double, + .echo_bool = echo_bool, + .echo_string = echo_string, + .echo_uint8_list = echo_uint8_list, + .echo_object = echo_object, + .echo_list = echo_list, + .echo_map = echo_map, + .echo_class_wrapper = echo_class_wrapper, + .echo_enum = echo_enum, + .echo_named_default_string = echo_named_default_string, + .echo_optional_default_double = echo_optional_default_double, + .echo_required_int = echo_required_int, + .echo_all_nullable_types = echo_all_nullable_types, + .echo_all_nullable_types_without_recursion = + echo_all_nullable_types_without_recursion, + .extract_nested_nullable_string = extract_nested_nullable_string, + .create_nested_nullable_string = create_nested_nullable_string, + .send_multiple_nullable_types = send_multiple_nullable_types, + .send_multiple_nullable_types_without_recursion = + send_multiple_nullable_types_without_recursion, + .echo_nullable_int = echo_nullable_int, + .echo_nullable_double = echo_nullable_double, + .echo_nullable_bool = echo_nullable_bool, + .echo_nullable_string = echo_nullable_string, + .echo_nullable_uint8_list = echo_nullable_uint8_list, + .echo_nullable_object = echo_nullable_object, + .echo_nullable_list = echo_nullable_list, + .echo_nullable_map = echo_nullable_map, + .echo_nullable_enum = echo_nullable_enum, + .echo_optional_nullable_int = echo_optional_nullable_int, + .echo_named_nullable_string = echo_named_nullable_string, + .noop_async = noop_async, + .echo_async_int = echo_async_int, + .echo_async_double = echo_async_double, + .echo_async_bool = echo_async_bool, + .echo_async_string = echo_async_string, + .echo_async_uint8_list = echo_async_uint8_list, + .echo_async_object = echo_async_object, + .echo_async_list = echo_async_list, + .echo_async_map = echo_async_map, + .echo_async_enum = echo_async_enum, + .throw_async_error = throw_async_error, + .throw_async_error_from_void = throw_async_error_from_void, + .throw_async_flutter_error = throw_async_flutter_error, + .echo_async_all_types = echo_async_all_types, + .echo_async_nullable_all_nullable_types = + echo_async_nullable_all_nullable_types, + .echo_async_nullable_all_nullable_types_without_recursion = + echo_async_nullable_all_nullable_types_without_recursion, + .echo_async_nullable_int = echo_async_nullable_int, + .echo_async_nullable_double = echo_async_nullable_double, + .echo_async_nullable_bool = echo_async_nullable_bool, + .echo_async_nullable_string = echo_async_nullable_string, + .echo_async_nullable_uint8_list = echo_async_nullable_uint8_list, + .echo_async_nullable_object = echo_async_nullable_object, + .echo_async_nullable_list = echo_async_nullable_list, + .echo_async_nullable_map = echo_async_nullable_map, + .echo_async_nullable_enum = echo_async_nullable_enum, + .call_flutter_noop = call_flutter_noop, + .call_flutter_throw_error = call_flutter_throw_error, + .call_flutter_throw_error_from_void = call_flutter_throw_error_from_void, + .call_flutter_echo_all_types = call_flutter_echo_all_types, + .call_flutter_echo_all_nullable_types = + call_flutter_echo_all_nullable_types, + .call_flutter_send_multiple_nullable_types = + call_flutter_send_multiple_nullable_types, + .call_flutter_echo_all_nullable_types_without_recursion = + call_flutter_echo_all_nullable_types_without_recursion, + .call_flutter_send_multiple_nullable_types_without_recursion = + call_flutter_send_multiple_nullable_types_without_recursion, + .call_flutter_echo_bool = call_flutter_echo_bool, + .call_flutter_echo_int = call_flutter_echo_int, + .call_flutter_echo_double = call_flutter_echo_double, + .call_flutter_echo_string = call_flutter_echo_string, + .call_flutter_echo_uint8_list = call_flutter_echo_uint8_list, + .call_flutter_echo_list = call_flutter_echo_list, + .call_flutter_echo_map = call_flutter_echo_map, + .call_flutter_echo_enum = call_flutter_echo_enum, + .call_flutter_echo_nullable_bool = call_flutter_echo_nullable_bool, + .call_flutter_echo_nullable_int = call_flutter_echo_nullable_int, + .call_flutter_echo_nullable_double = call_flutter_echo_nullable_double, + .call_flutter_echo_nullable_string = call_flutter_echo_nullable_string, + .call_flutter_echo_nullable_uint8_list = + call_flutter_echo_nullable_uint8_list, + .call_flutter_echo_nullable_list = call_flutter_echo_nullable_list, + .call_flutter_echo_nullable_map = call_flutter_echo_nullable_map, + .call_flutter_echo_nullable_enum = call_flutter_echo_nullable_enum, + .call_flutter_small_api_echo_string = call_flutter_small_api_echo_string}; + // Called when a method call is received from Flutter. static void test_plugin_handle_method_call(TestPlugin* self, FlMethodCall* method_call) { @@ -46,6 +738,9 @@ FlMethodResponse* get_platform_version() { } static void test_plugin_dispose(GObject* object) { + TestPlugin* self = TEST_PLUGIN(object); + g_clear_object(self->host_core_api); + g_clear_object(self->flutter_core_api); G_OBJECT_CLASS(test_plugin_parent_class)->dispose(object); } @@ -55,6 +750,17 @@ static void test_plugin_class_init(TestPluginClass* klass) { static void test_plugin_init(TestPlugin* self) {} +static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { + TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); + + self->host_core_api = core_tests_pigeon_test_host_integration_core_api_new( + messenger, host_core_api_vtable, g_object_ref(self), g_object_unref); + self->flutter_core_api = + core_tests_pigeon_test_flutter_integration_core_api_new(messenger); + + return self; +} + static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, gpointer user_data) { TestPlugin* plugin = TEST_PLUGIN(user_data); @@ -62,15 +768,12 @@ static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, } void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { - TestPlugin* plugin = - TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); + g_autoptr(TestPlugin) plugin = + test_plugin_new(fl_plugin_registrar_get_messenger(registrar)); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); g_autoptr(FlMethodChannel) channel = - fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), - "test_plugin", FL_METHOD_CODEC(codec)); + fl_method_channel_new(messenger, "test_plugin", FL_METHOD_CODEC(codec)); fl_method_channel_set_method_call_handler( channel, method_call_cb, g_object_ref(plugin), g_object_unref); - - g_object_unref(plugin); } From a58df6c74917b68796c97717ed9cdbd859cfdef7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 14:53:35 +1200 Subject: [PATCH 043/127] Fix generated code --- packages/pigeon/lib/gobject_generator.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 3e5d34263b65..7e255fc3e5f5 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1385,8 +1385,8 @@ bool _isNullablePrimitiveType(TypeDeclaration type) { type.baseName == 'double'; } -/// Whether [type] is a type that needs to stay an FLValue* since it can't be -/// expressed as a more concrete type. +// Whether [type] is a type that needs to stay an FlValue* since it can't be +// expressed as a more concrete type. bool _isFlValueWrappedType(TypeDeclaration type) { return type.baseName == 'List' || type.baseName == 'Map' || @@ -1468,7 +1468,9 @@ String _makeFlValue(String module, TypeDeclaration type, String variableName, if (type.isClass) { value = 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; } else if (type.isEnum) { - value = 'fl_value_new_int($variableName)'; + value = type.isNullable + ? 'fl_value_new_int(static_cast(*$variableName))' + : 'fl_value_new_int(static_cast($variableName))'; } else if (_isFlValueWrappedType(type)) { value = 'fl_value_ref($variableName)'; } else if (type.baseName == 'void') { @@ -1483,8 +1485,8 @@ String _makeFlValue(String module, TypeDeclaration type, String variableName, : 'fl_value_new_int($variableName)'; } else if (type.baseName == 'double') { value = type.isNullable - ? 'fl_value_new_double(*$variableName)' - : 'fl_value_new_double($variableName)'; + ? 'fl_value_new_float(*$variableName)' + : 'fl_value_new_float($variableName)'; } else if (type.baseName == 'String') { value = 'fl_value_new_string($variableName)'; } else if (type.baseName == 'Uint8List') { From edc875cfae72377ab18fc14a64f1d6bf494629b8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 15:40:42 +1200 Subject: [PATCH 044/127] Fix generated code --- packages/pigeon/lib/gobject_generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 7e255fc3e5f5..cea01f6ca405 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1525,7 +1525,7 @@ String _fromFlValue(String module, TypeDeclaration type, String variableName) { } else if (type.baseName == 'int') { return 'fl_value_get_int($variableName)'; } else if (type.baseName == 'double') { - return 'fl_value_get_double($variableName)'; + return 'fl_value_get_float($variableName)'; } else if (type.baseName == 'String') { return 'fl_value_get_string($variableName)'; } else if (type.baseName == 'Uint8List') { From f7b98a3d9fd3fa887be80d2793e9b7f357b235bc Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 15:43:43 +1200 Subject: [PATCH 045/127] Fix arg name --- .../test_plugin/linux/test_plugin.cc | 170 +++++++++--------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index d0f6a42c3fba..38a594813c5d 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -27,32 +27,32 @@ struct _TestPlugin { G_DEFINE_TYPE(TestPlugin, test_plugin, g_object_get_type()) static CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_noop_response_new(); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* -echo_all_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_all_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( everything); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( "An error", "", nullptr); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* -throw_error_from_void(CoreTestsPigeonTestHostIntegrationCoreApi* self, +throw_error_from_void(CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( "An error", "", nullptr); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* -throw_flutter_error(CoreTestsPigeonTestHostIntegrationCoreApi* self, +throw_flutter_error(CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); return core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( @@ -60,35 +60,35 @@ throw_flutter_error(CoreTestsPigeonTestHostIntegrationCoreApi* self, } static CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( an_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( a_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( a_bool); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( an_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* -echo_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( @@ -96,60 +96,60 @@ echo_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, } static CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* echo_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( an_object); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( a_list); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( a_map); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* -echo_class_wrapper(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_class_wrapper(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( an_enum); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* -echo_named_default_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_named_default_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* -echo_optional_default_double(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_optional_default_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* -echo_required_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_required_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* -echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, gpointer user_data) { // FIXME @@ -157,28 +157,28 @@ echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* -extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, +extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* -create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, +create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* nullable_string, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* -send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, +send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, gpointer user_data) { @@ -187,38 +187,38 @@ send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* self, static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* -echo_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* -echo_nullable_double(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_nullable_double, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* -echo_nullable_bool(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_bool(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* -echo_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* -echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, gpointer user_data) { @@ -226,49 +226,49 @@ echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* -echo_nullable_object(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_object(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_object, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* -echo_nullable_list(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_list, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* -echo_nullable_map(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_map, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* -echo_nullable_enum(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_nullable_enum(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* -echo_optional_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_optional_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data) { // FIXME } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* -echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* self, +echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data) { // FIXME } -static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* self, +static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_noop( self, response_handle); } -static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, +static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -277,28 +277,28 @@ static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* self, } static void echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( self, response_handle, a_double); } static void echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( self, response_handle, a_bool); } static void echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( self, response_handle, a_string); } static void echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( @@ -306,20 +306,20 @@ static void echo_async_uint8_list( } static void echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( self, response_handle, a_object); } static void echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( self, response_handle, a_list); } -static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* self, +static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -328,7 +328,7 @@ static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* self, } static void echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( @@ -336,7 +336,7 @@ static void echo_async_enum( } static void throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( @@ -344,7 +344,7 @@ static void throw_async_error( } static void throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( @@ -352,7 +352,7 @@ static void throw_async_error_from_void( } static void throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( @@ -360,7 +360,7 @@ static void throw_async_flutter_error( } static void echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( @@ -368,7 +368,7 @@ static void echo_async_all_types( } static void echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types( @@ -376,7 +376,7 @@ static void echo_async_nullable_all_nullable_types( } static void echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types_without_recursion( @@ -384,35 +384,35 @@ static void echo_async_nullable_all_nullable_types_without_recursion( } static void echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( self, response_handle, an_int); } static void echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( self, response_handle, a_double); } static void echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( self, response_handle, a_bool); } static void echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( self, response_handle, a_string); } static void echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( @@ -420,160 +420,160 @@ static void echo_async_nullable_uint8_list( } static void echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( self, response_handle, a_object); } static void echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_nullable_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME @@ -590,7 +590,7 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, } static void call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( @@ -599,20 +599,20 @@ static void call_flutter_echo_nullable_list( } static void call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } static void call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { // FIXME } From 68876e406b0cbe78b49e5cb12cde12af056232ce Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:01:52 +1200 Subject: [PATCH 046/127] Add missing method prefix --- packages/pigeon/lib/gobject_generator.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index cea01f6ca405..4887264ae859 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1064,7 +1064,7 @@ void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, _snakeCaseFromCamelCase(customClassName); indent.newln(); indent.writeScoped( - 'static gboolean write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', + 'static gboolean ${methodPrefix}_write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', '}', () { indent.writeln('uint8_t type = ${customClass.enumeration};'); indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); @@ -1092,7 +1092,7 @@ void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, final String castMacro = _getClassCastMacro(module, customClass.name); indent.writeln( - 'return write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); + 'return ${methodPrefix}_write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); }); } }); @@ -1109,7 +1109,7 @@ void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, _snakeCaseFromCamelCase(customClassName); indent.newln(); indent.writeScoped( - 'static FlValue* read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', + 'static FlValue* ${methodPrefix}_read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', '}', () { indent.writeln( 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); @@ -1142,7 +1142,7 @@ void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, indent.writeln('case ${customClass.enumeration}:'); indent.nest(1, () { indent.writeln( - 'return read_$snakeCustomClassName(codec, buffer, offset, error);'); + 'return ${methodPrefix}_read_$snakeCustomClassName(codec, buffer, offset, error);'); }); } From 1746a970a9f2d4ad07cdcc59276170773629dc59 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:03:25 +1200 Subject: [PATCH 047/127] Update generated code --- packages/pigeon/example/app/linux/messages.g.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index e87249c56b88..ff23182e02dd 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -82,7 +82,8 @@ static FlValue* pigeon_example_package_message_data_to_list( fl_value_append_take(values, self->description != nullptr ? fl_value_new_string(self->description) : fl_value_new_null()); - fl_value_append_take(values, fl_value_new_int(self->code)); + fl_value_append_take(values, + fl_value_new_int(static_cast(self->code))); fl_value_append_take(values, fl_value_ref(self->data)); return values; } @@ -118,7 +119,8 @@ G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiCodec, pigeon_example_package_example_host_api_codec, fl_standard_message_codec_get_type()) -static gboolean write_pigeon_example_package_message_data( +static gboolean +pigeon_example_package_example_host_api_write_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GByteArray* buffer, PigeonExamplePackageMessageData* value, GError** error) { uint8_t type = 128; @@ -134,7 +136,7 @@ static gboolean pigeon_example_package_example_host_api_write_value( if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 128: - return write_pigeon_example_package_message_data( + return pigeon_example_package_example_host_api_write_pigeon_example_package_message_data( codec, buffer, PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( fl_value_get_custom_value_object(value)), @@ -147,7 +149,8 @@ static gboolean pigeon_example_package_example_host_api_write_value( ->write_value(codec, buffer, value, error); } -static FlValue* read_pigeon_example_package_message_data( +static FlValue* +pigeon_example_package_example_host_api_read_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -172,8 +175,8 @@ static FlValue* pigeon_example_package_example_host_api_read_value_of_type( GError** error) { switch (type) { case 128: - return read_pigeon_example_package_message_data(codec, buffer, offset, - error); + return pigeon_example_package_example_host_api_read_pigeon_example_package_message_data( + codec, buffer, offset, error); default: return FL_STANDARD_MESSAGE_CODEC_CLASS( pigeon_example_package_example_host_api_codec_parent_class) From 81b8a0c2e571bde88977e13eedec73e990f0dfa7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:12:25 +1200 Subject: [PATCH 048/127] Fix nullable enums --- packages/pigeon/lib/gobject_generator.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 4887264ae859..d04d355565df 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1337,7 +1337,7 @@ String _getType(String module, TypeDeclaration type, return '${_getClassName(module, type.baseName)}*'; } else if (type.isEnum) { final String name = _getClassName(module, type.baseName); - return type.isNullable ? '$name*' : name; + return type.isNullable && !primitive ? '$name*' : name; } else if (_isFlValueWrappedType(type)) { return 'FlValue*'; } else if (type.baseName == 'void') { @@ -1380,7 +1380,8 @@ bool _isNullablePrimitiveType(TypeDeclaration type) { return false; } - return type.baseName == 'bool' || + return type.isEnum || + type.baseName == 'bool' || type.baseName == 'int' || type.baseName == 'double'; } From e4a6b24e619c74d95dcdb5f50b9691da064a00ba Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:22:09 +1200 Subject: [PATCH 049/127] Fix array length args --- packages/pigeon/lib/gobject_generator.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index d04d355565df..6efff6f6ae88 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -594,6 +594,11 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('$fieldType $fieldName = $fieldValue;'); } args.add(fieldName); + if (_isNumericListType(field.type)) { + indent.writeln( + 'size_t ${fieldName}_length = fl_value_get_length(value$i);'); + args.add('${fieldName}_length'); + } } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); }); @@ -994,13 +999,15 @@ class GObjectSourceGenerator extends StructuredGenerator { final List respondArgs = [ '$className* self', 'FlBasicMessageChannelResponseHandle* response_handle', - if (returnType != 'void') '$returnType return_value' + if (returnType != 'void') '$returnType return_value', + if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeScoped( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')}) {", '}', () { final List returnArgs = [ - if (returnType != 'void') 'return_value' + if (returnType != 'void') 'return_value', + if (_isNumericListType(method.returnType)) 'return_value_length' ]; indent.writeln( 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(${returnArgs.join(', ')});'); From 24c324f2f756b2b17dcd2d779fa4babe6f8d98a6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:08:03 +1200 Subject: [PATCH 050/127] Add another method prefix --- .../pigeon/example/app/linux/messages.g.cc | 24 +++++++++++-------- packages/pigeon/lib/gobject_generator.dart | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index ff23182e02dd..02a8ffec751a 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -395,7 +395,7 @@ struct _PigeonExamplePackageExampleHostApi { G_DEFINE_TYPE(PigeonExamplePackageExampleHostApi, pigeon_example_package_example_host_api, G_TYPE_OBJECT) -static void get_host_language_cb( +static void pigeon_example_package_example_host_api_get_host_language_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = @@ -421,9 +421,9 @@ static void get_host_language_cb( } } -static void add_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void pigeon_example_package_example_host_api_add_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(user_data); @@ -450,7 +450,7 @@ static void add_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void send_message_cb( +static void pigeon_example_package_example_host_api_send_message_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageExampleHostApi* self = @@ -512,18 +512,22 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( "ExampleHostApi.getHostLanguage", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->get_host_language_channel, get_host_language_cb, self, nullptr); + self->get_host_language_channel, + pigeon_example_package_example_host_api_get_host_language_cb, self, + nullptr); self->add_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->add_channel, add_cb, self, - nullptr); + fl_basic_message_channel_set_message_handler( + self->add_channel, pigeon_example_package_example_host_api_add_cb, self, + nullptr); self->send_message_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->send_message_channel, - send_message_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->send_message_channel, + pigeon_example_package_example_host_api_send_message_cb, self, nullptr); return self; } diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 6efff6f6ae88..20f1024977ea 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -859,7 +859,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - 'static void ${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', + 'static void ${methodPrefix}_${methodName}_cb(FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) {', '}', () { _writeCastSelf(indent, module, api.name, 'user_data'); @@ -979,7 +979,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln( 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, "$channelName", FL_MESSAGE_CODEC(codec));'); indent.writeln( - 'fl_basic_message_channel_set_message_handler(self->${methodName}_channel, ${methodName}_cb, self, nullptr);'); + 'fl_basic_message_channel_set_message_handler(self->${methodName}_channel, ${methodPrefix}_${methodName}_cb, self, nullptr);'); } indent.newln(); From 3aaffd70d851d8a48408ce65a925911c9e9c9685 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:26:00 +1200 Subject: [PATCH 051/127] Test fixes --- .../test_plugin/linux/test_plugin.cc | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 38a594813c5d..962976fa801e 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -84,7 +84,7 @@ static CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( - an_string); + a_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* @@ -265,7 +265,7 @@ static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_noop( - self, response_handle); + api, response_handle); } static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, @@ -273,28 +273,28 @@ static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( - self, response_handle, an_int); + api, response_handle, an_int); } static void echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( - self, response_handle, a_double); + api, response_handle, a_double); } static void echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( - self, response_handle, a_bool); + api, response_handle, a_bool); } static void echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( - self, response_handle, a_string); + api, response_handle, a_string); } static void echo_async_uint8_list( @@ -302,21 +302,21 @@ static void echo_async_uint8_list( const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( - self, response_handle, a_uint8_list, a_uint8_list_length); + api, response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( - self, response_handle, a_object); + api, response_handle, an_object); } static void echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( - self, response_handle, a_list); + api, response_handle, a_list); } static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, @@ -324,7 +324,7 @@ static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( - self, response_handle, a_map); + api, response_handle, a_map); } static void echo_async_enum( @@ -332,7 +332,7 @@ static void echo_async_enum( CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( - self, response_handle, an_enum); + api, response_handle, an_enum); } static void throw_async_error( @@ -340,7 +340,7 @@ static void throw_async_error( FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( - self, response_handle, "code", "message", details); + api, response_handle, "code", "message", details); } static void throw_async_error_from_void( @@ -348,7 +348,7 @@ static void throw_async_error_from_void( FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( - self, response_handle, "code", "message", details); + api, response_handle, "code", "message", details); } static void throw_async_flutter_error( @@ -356,7 +356,7 @@ static void throw_async_flutter_error( FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( - self, response_handle, "code", "message", details); + api, response_handle, "code", "message", details); } static void echo_async_all_types( @@ -364,7 +364,7 @@ static void echo_async_all_types( CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( - self, response_handle, everything); + api, response_handle, everything); } static void echo_async_nullable_all_nullable_types( @@ -372,7 +372,7 @@ static void echo_async_nullable_all_nullable_types( CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types( - self, response_handle, everything); + api, response_handle, everything); } static void echo_async_nullable_all_nullable_types_without_recursion( @@ -380,35 +380,35 @@ static void echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types_without_recursion( - self, response_handle, everything); + api, response_handle, everything); } static void echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( - self, response_handle, an_int); + api, response_handle, an_int); } static void echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( - self, response_handle, a_double); + api, response_handle, a_double); } static void echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( - self, response_handle, a_bool); + api, response_handle, a_bool); } static void echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( - self, response_handle, a_string); + api, response_handle, a_string); } static void echo_async_nullable_uint8_list( @@ -416,14 +416,14 @@ static void echo_async_nullable_uint8_list( const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( - self, response_handle, a_uint8_list, a_uint8_list_length); + api, response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( - self, response_handle, a_object); + api, response_handle, an_object); } static void echo_async_nullable_list( From d3b640e7dca8875eed5daea8fecf7cddc5d79225 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 16:54:42 +1200 Subject: [PATCH 052/127] Fix lists in Flutter API --- packages/pigeon/lib/gobject_generator.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 20f1024977ea..2ca9dcc6ce90 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -243,14 +243,19 @@ class GObjectHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _snakeCaseFromCamelCase(method.name); - final List asyncArgs = [ - '$className* self', - for (final Parameter param in method.parameters) - '${_getType(module, param.type)} ${_snakeCaseFromCamelCase(param.name)}', + final List asyncArgs = ['$className* self']; + for (final Parameter param in method.parameters) { + final String paramName = _snakeCaseFromCamelCase(param.name); + asyncArgs.add('${_getType(module, param.type)} $paramName'); + if (_isNumericListType(param.type)) { + asyncArgs.add('size_t ${paramName}_length'); + } + } + asyncArgs.addAll([ 'GCancellable* cancellable', 'GAsyncReadyCallback callback', 'gpointer user_data' - ]; + ]); indent.newln(); addDocumentationComments( indent, method.documentationComments, _docCommentSpec); From ac4ce26926962b2c1111a5309615256e2388a30d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 17 Apr 2024 12:51:52 +1200 Subject: [PATCH 053/127] Implement more Linux tests --- .../linux/include/test_plugin/test_plugin.h | 7 +- .../test_plugin/linux/test_plugin.cc | 227 +++++++++++++----- 2 files changed, 170 insertions(+), 64 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h index 99b50d2368d4..9cb33f32e54e 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/include/test_plugin/test_plugin.h @@ -15,12 +15,7 @@ G_BEGIN_DECLS #define FLUTTER_PLUGIN_EXPORT #endif -typedef struct _TestPlugin TestPlugin; -typedef struct { - GObjectClass parent_class; -} TestPluginClass; - -FLUTTER_PLUGIN_EXPORT GType test_plugin_get_type(); +G_DECLARE_FINAL_TYPE(TestPlugin, test_plugin, TEST, PLUGIN, GObject) FLUTTER_PLUGIN_EXPORT void test_plugin_register_with_registrar( FlPluginRegistrar* registrar); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 962976fa801e..503dba332ea7 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -13,18 +13,19 @@ #include "pigeon/core_tests.gen.h" #include "test_plugin_private.h" -#define TEST_PLUGIN(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), test_plugin_get_type(), TestPlugin)) - struct _TestPlugin { GObject parent_instance; CoreTestsPigeonTestHostIntegrationCoreApi* host_core_api; + CoreTestsPigeonTestHostSmallApi* host_small_api; + CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; + + CoreTestsPigeonTestFlutterSmallApi* flutter_small_api; }; -G_DEFINE_TYPE(TestPlugin, test_plugin, g_object_get_type()) +G_DEFINE_TYPE(TestPlugin, test_plugin, G_TYPE_OBJECT) static CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { @@ -120,7 +121,8 @@ static CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* echo_class_wrapper(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new( + wrapper); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* echo_enum( @@ -133,26 +135,30 @@ static CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* echo_enum( static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* echo_named_default_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new( + a_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* echo_optional_default_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new( + a_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* echo_required_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new( + an_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new( + everything); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* @@ -160,21 +166,35 @@ echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new( + everything); } static CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { - // FIXME + CoreTestsPigeonTestAllNullableTypes* types = + core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types( + wrapper); + return core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new( + core_tests_pigeon_test_all_nullable_types_get_a_nullable_string(types)); } static CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* nullable_string, gpointer user_data) { - // FIXME + // FIXME: Make new_full? + g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = + core_tests_pigeon_test_all_nullable_types_new( + nullptr, nullptr, nullptr, nullptr, nullptr, 0, nullptr, 0, nullptr, + 0, nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, + nullable_string, nullptr, nullptr); + g_autoptr(CoreTestsPigeonTestAllClassesWrapper) wrapper = + core_tests_pigeon_test_all_classes_wrapper_new(types, nullptr, nullptr); + return core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new( + wrapper); } static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* @@ -182,7 +202,13 @@ send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, gpointer user_data) { - // FIXME + g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = + core_tests_pigeon_test_all_nullable_types_new( + a_nullable_bool, a_nullable_int, nullptr, nullptr, nullptr, 0, + nullptr, 0, nullptr, 0, nullptr, 0, nullptr, nullptr, nullptr, + nullptr, nullptr, nullptr, a_nullable_string, nullptr, nullptr); + return core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new( + types); } static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* @@ -190,31 +216,41 @@ send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, gpointer user_data) { - // FIXME + g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) types = + core_tests_pigeon_test_all_nullable_types_without_recursion_new( + a_nullable_bool, a_nullable_int, nullptr, nullptr, nullptr, 0, + nullptr, 0, nullptr, 0, nullptr, 0, nullptr, nullptr, nullptr, + nullptr, nullptr, nullptr, a_nullable_string, nullptr); + return core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( + types); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* echo_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new( + a_nullable_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* echo_nullable_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_nullable_double, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new( + a_nullable_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* echo_nullable_bool(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new( + a_nullable_bool); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* echo_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new( + a_nullable_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* @@ -222,49 +258,56 @@ echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new( + a_nullable_uint8_list, a_nullable_uint8_list_length); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* echo_nullable_object(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_object, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new( + a_nullable_object); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* echo_nullable_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_list, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new( + a_nullable_list); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* echo_nullable_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_map, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new( + a_nullable_map); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* echo_nullable_enum(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new( + an_enum); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* echo_optional_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new( + a_nullable_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data) { - // FIXME + return core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new( + a_nullable_string); } static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_echo_async_noop( + core_tests_pigeon_test_host_integration_core_api_respond_noop_async( api, response_handle); } @@ -298,8 +341,8 @@ static void echo_async_string( } static void echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_uint8_list, size_t a_uint8_list_length, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, + size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( api, response_handle, a_uint8_list, a_uint8_list_length); @@ -371,7 +414,7 @@ static void echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types( + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( api, response_handle, everything); } @@ -379,7 +422,7 @@ static void echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_nullable_types_without_recursion( + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( api, response_handle, everything); } @@ -412,8 +455,8 @@ static void echo_async_nullable_string( } static void echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_uint8_list, size_t a_uint8_list_length, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, + size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( api, response_handle, a_uint8_list, a_uint8_list_length); @@ -429,26 +472,30 @@ static void echo_async_nullable_object( static void echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( + api, response_handle, a_list); } static void echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( + api, response_handle, a_map); } static void echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( + api, response_handle, an_enum); } static void call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( + api, response_handle); } static void call_flutter_throw_error( @@ -501,74 +548,98 @@ static void call_flutter_send_multiple_nullable_types_without_recursion( static void call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( + api, response_handle, a_bool); } static void call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( + api, response_handle, an_int); } static void call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( + api, response_handle, a_double); } static void call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( + api, response_handle, a_string); } static void call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( + api, response_handle, a_list, a_list_length); } static void call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( + api, response_handle, a_list); } static void call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( + api, response_handle, a_map); } static void call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( + api, response_handle, an_enum); } static void call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( + api, response_handle, a_bool); } static void call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( + api, response_handle, an_int); } static void call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( + api, response_handle, a_double); } static void call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( + api, response_handle, a_string); +} + +static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autofree uint8_t* return_value = nullptr; + size_t return_value_length; + g_autoptr(GError) error = nullptr; + // gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &return_value_length, &error); // FIXME } @@ -576,17 +647,24 @@ static void call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( + self->flutter_core_api, a_list, a_list_length, nullptr, + echo_nullable_uint8_list_cb, user_data); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( + api, response_handle, a_list, a_list_length); } static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { - g_autoptr(FLValue) return_value = nullptr; + g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + // gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + // FIXME } static void call_flutter_echo_nullable_list( @@ -611,10 +689,23 @@ static void call_flutter_echo_nullable_enum( // FIXME } +static void echo_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // gboolean r = + core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &return_value, + &error); + // FIXME +} + static void call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + core_tests_pigeon_test_flutter_small_api_echo_string( + self->flutter_small_api, a_string, nullptr, echo_string_cb, self); } static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { @@ -713,6 +804,17 @@ static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { .call_flutter_echo_nullable_enum = call_flutter_echo_nullable_enum, .call_flutter_small_api_echo_string = call_flutter_small_api_echo_string}; +static void echo(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) {} + +static void void_void(CoreTestsPigeonTestHostSmallApi* api, + FlBasicMessageChannelResponseHandle* response_handle, + gpointer user_data) {} + +static CoreTestsPigeonTestHostSmallApiVTable host_small_api_vtable = { + .echo = echo, .void_void = void_void}; + // Called when a method call is received from Flutter. static void test_plugin_handle_method_call(TestPlugin* self, FlMethodCall* method_call) { @@ -739,8 +841,12 @@ FlMethodResponse* get_platform_version() { static void test_plugin_dispose(GObject* object) { TestPlugin* self = TEST_PLUGIN(object); - g_clear_object(self->host_core_api); - g_clear_object(self->flutter_core_api); + + g_clear_object(&self->host_core_api); + g_clear_object(&self->host_small_api); + g_clear_object(&self->flutter_core_api); + g_clear_object(&self->flutter_small_api); + G_OBJECT_CLASS(test_plugin_parent_class)->dispose(object); } @@ -754,9 +860,13 @@ static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); self->host_core_api = core_tests_pigeon_test_host_integration_core_api_new( - messenger, host_core_api_vtable, g_object_ref(self), g_object_unref); + messenger, &host_core_api_vtable, g_object_ref(self), g_object_unref); + self->host_small_api = core_tests_pigeon_test_host_small_api_new( + messenger, &host_small_api_vtable, g_object_ref(self), g_object_unref); self->flutter_core_api = core_tests_pigeon_test_flutter_integration_core_api_new(messenger); + self->flutter_small_api = + core_tests_pigeon_test_flutter_small_api_new(messenger); return self; } @@ -773,7 +883,8 @@ void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); g_autoptr(FlMethodChannel) channel = - fl_method_channel_new(messenger, "test_plugin", FL_METHOD_CODEC(codec)); + fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), + "test_plugin", FL_METHOD_CODEC(codec)); fl_method_channel_set_method_call_handler( channel, method_call_cb, g_object_ref(plugin), g_object_unref); } From 92d68fabbfaf534db461a31aefd958a8da040419 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 18 Apr 2024 13:33:23 +1200 Subject: [PATCH 054/127] Mangle reserved method and field names --- packages/pigeon/lib/gobject_generator.dart | 59 ++++++++++++++-------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 2ca9dcc6ce90..9823a4f9233c 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -181,7 +181,6 @@ class GObjectHeaderGenerator extends StructuredGenerator { }) { final String module = _getModule(generatorOptions, dartPackageName); final String className = _getClassName(module, classDefinition.name); - final String methodPrefix = _getMethodPrefix(module, classDefinition.name); indent.newln(); @@ -192,7 +191,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List constructorArgs = []; for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String type = _getType(module, field.type); constructorArgs.add('$type $fieldName'); if (_isNumericListType(field.type)) { @@ -203,7 +202,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { "$className* ${methodPrefix}_new(${constructorArgs.join(', ')});"); for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String returnType = _getType(module, field.type); indent.newln(); @@ -241,7 +240,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger);'); for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final List asyncArgs = ['$className* self']; for (final Parameter param in method.parameters) { @@ -343,7 +342,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.writeScoped('typedef struct {', '} $vtableName;', () { for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -372,7 +371,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { Indent indent, String module, Api api, Method method) { final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final String returnType = _getType(module, method.returnType); indent.newln(); @@ -463,7 +462,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectStruct(indent, module, classDefinition.name, () { indent.newln(); for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String fieldType = _getType(module, field.type, isOutput: true); indent.writeln('$fieldType $fieldName;'); if (_isNumericListType(field.type)) { @@ -479,7 +478,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeDispose(indent, module, classDefinition.name, () { bool haveSelf = false; for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String? clear = _getClearFunction(field.type, 'self->$fieldName'); if (clear != null) { if (!haveSelf) { @@ -499,10 +498,10 @@ class GObjectSourceGenerator extends StructuredGenerator { final List constructorArgs = []; for (final NamedType field in classDefinition.fields) { - final String name = _snakeCaseFromCamelCase(field.name); - constructorArgs.add('${_getType(module, field.type)} $name'); + final String fieldName = _getFieldName(field.name); + constructorArgs.add('${_getType(module, field.type)} $fieldName'); if (_isNumericListType(field.type)) { - constructorArgs.add('size_t ${name}_length'); + constructorArgs.add('size_t ${fieldName}_length'); } } indent.newln(); @@ -511,7 +510,7 @@ class GObjectSourceGenerator extends StructuredGenerator { () { _writeObjectNew(indent, module, classDefinition.name); for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String value = _referenceValue(field.type, fieldName, lengthVariableName: '${fieldName}_length'); @@ -537,7 +536,7 @@ class GObjectSourceGenerator extends StructuredGenerator { }); for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String returnType = _getType(module, field.type); indent.newln(); @@ -562,7 +561,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'static FlValue* ${methodPrefix}_to_list($className* self) {', '}', () { indent.writeln('FlValue* values = fl_value_new_list();'); for (final NamedType field in classDefinition.fields) { - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); indent.writeln( 'fl_value_append_take(values, ${_makeFlValue(module, field.type, 'self->$fieldName', lengthVariableName: 'self->${fieldName}_length')});'); } @@ -576,7 +575,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final List args = []; for (int i = 0; i < classDefinition.fields.length; i++) { final NamedType field = classDefinition.fields[i]; - final String fieldName = _snakeCaseFromCamelCase(field.name); + final String fieldName = _getFieldName(field.name); final String fieldType = _getType(module, field.type); String fieldValue = _fromFlValue(module, field.type, 'value$i'); indent @@ -668,7 +667,7 @@ class GObjectSourceGenerator extends StructuredGenerator { }); for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final List asyncArgs = ['$className* self']; for (final Parameter param in method.parameters) { @@ -849,7 +848,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); indent.writeln('FlBasicMessageChannel* ${methodName}_channel;'); } }); @@ -858,7 +857,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeDefineType(indent, module, api.name); for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -948,7 +947,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); indent.writeln('g_clear_object(&self->${methodName}_channel);'); } }); @@ -978,7 +977,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new();'); } for (final Method method in api.methods) { - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final String channelName = makeChannelName(api, method, dartPackageName); indent.writeln( @@ -994,7 +993,7 @@ class GObjectSourceGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { final String returnType = _getType(module, method.returnType); - final String methodName = _snakeCaseFromCamelCase(method.name); + final String methodName = _getMethodName(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); final String responseMethodPrefix = @@ -1316,6 +1315,24 @@ String _getClassName(String module, String name) { return '$module$name'; } +// Returns the name to use for a class field with [name]. +String _getFieldName(String name) { + final List reservedNames = ["type"]; + if (reservedNames.contains(name)) { + name += '_'; + } + return _snakeCaseFromCamelCase(name); +} + +// Returns the name to user for a class method with [name] +String _getMethodName(String name) { + final List reservedNames = ["new", "get_type"]; + if (reservedNames.contains(name)) { + name += '_'; + } + return _snakeCaseFromCamelCase(name); +} + /// Return the name of the VTable structure to use for API requests. String _getVTableName(String module, String name) { final String className = _getClassName(module, name); From 53c3e7470b1e08a2c487d5786e674b973de3b759 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 18 Apr 2024 13:43:02 +1200 Subject: [PATCH 055/127] Move vtable code into section that gets documented --- packages/pigeon/example/README.md | 5 +++++ packages/pigeon/example/app/linux/my_application.cc | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 14d108d4f544..0524a8ef7594 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -235,6 +235,11 @@ static void handle_send_message( pigeon_example_package_example_host_api_respond_send_message( object, response_handle, TRUE); } + +static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { + .get_host_language = handle_get_host_language, + .add = handle_add, + .send_message = handle_send_message}; ``` ## FlutterApi Example diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index da6828c2ab89..8aa406a0eab6 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -59,6 +59,11 @@ static void handle_send_message( pigeon_example_package_example_host_api_respond_send_message( object, response_handle, TRUE); } + +static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { + .get_host_language = handle_get_host_language, + .add = handle_add, + .send_message = handle_send_message}; // #enddocregion vtable // #docregion flutter-method-callback @@ -123,10 +128,6 @@ static void my_application_activate(GApplication* application) { FlBinaryMessenger* messenger = fl_engine_get_binary_messenger(fl_view_get_engine(view)); - static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { - .get_host_language = handle_get_host_language, - .add = handle_add, - .send_message = handle_send_message}; self->example_host_api = pigeon_example_package_example_host_api_new( messenger, &example_host_api_vtable, self, nullptr); From c86c5d1c2f7507178c103d0ab62ef6a02fcedd21 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 18 Apr 2024 13:51:29 +1200 Subject: [PATCH 056/127] Fix analyze issues --- packages/pigeon/lib/gobject_generator.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 9823a4f9233c..fec26c319b49 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1317,7 +1317,7 @@ String _getClassName(String module, String name) { // Returns the name to use for a class field with [name]. String _getFieldName(String name) { - final List reservedNames = ["type"]; + final List reservedNames = ['type']; if (reservedNames.contains(name)) { name += '_'; } @@ -1326,7 +1326,7 @@ String _getFieldName(String name) { // Returns the name to user for a class method with [name] String _getMethodName(String name) { - final List reservedNames = ["new", "get_type"]; + final List reservedNames = ['new', 'get_type']; if (reservedNames.contains(name)) { name += '_'; } From b5fc3766f8dd088935109e3f04ea40bd8aa0aa91 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 18 Apr 2024 15:21:20 +1200 Subject: [PATCH 057/127] Connect up more Linux tests --- .../test_plugin/linux/test_plugin.cc | 558 ++++++++++++++++-- 1 file changed, 506 insertions(+), 52 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 503dba332ea7..7459e9f8784e 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -23,10 +23,33 @@ struct _TestPlugin { CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; CoreTestsPigeonTestFlutterSmallApi* flutter_small_api; + + GCancellable* cancellable; }; G_DEFINE_TYPE(TestPlugin, test_plugin, G_TYPE_OBJECT) +typedef struct { + TestPlugin* self; + FlBasicMessageChannelResponseHandle* response_handle; +} CallbackData; + +static CallbackData* callback_data_new( + TestPlugin* self, FlBasicMessageChannelResponseHandle* response_handle) { + CallbackData* data = g_new0(CallbackData, 1); + data->self = g_object_ref(self); + data->response_handle = g_object_ref(response_handle); + return data; +} + +static void callback_data_free(CallbackData* data) { + g_object_unref(data->self); + g_object_unref(data->response_handle); + free(data); +} + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(CallbackData, callback_data_free) + static CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_noop_response_new(); @@ -491,156 +514,535 @@ static void echo_async_nullable_enum( api, response_handle, an_enum); } +static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_noop_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( + data->self->host_core_api, data->response_handle); +} + static void call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( - api, response_handle); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_noop( + self->flutter_core_api, nullptr, noop_cb, + callback_data_new(self, response_handle)); +} + +static void throw_error_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(FlValue) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_throw_error( + self->flutter_core_api, nullptr, throw_error_cb, + callback_data_new(self, response_handle)); +} + +static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( + data->self->host_core_api, data->response_handle); } static void call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( + self->flutter_core_api, nullptr, throw_error_from_void_cb, + callback_data_new(self, response_handle)); +} + +static void echo_all_types_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(CoreTestsPigeonTestAllTypes) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( + self->flutter_core_api, everything, self->cancellable, echo_all_types_cb, + callback_data_new(self, response_handle)); +} + +static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( + self->flutter_core_api, everything, self->cancellable, + echo_all_nullable_types_cb, callback_data_new(self, response_handle)); +} + +static void send_multiple_nullable_types_cb(GObject* object, + GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( + self->flutter_core_api, a_nullable_bool, a_nullable_int, + a_nullable_string, self->cancellable, send_multiple_nullable_types_cb, + callback_data_new(self, response_handle)); +} + +static void echo_all_nullable_types_without_recursion_cb(GObject* object, + GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = + nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( + self->flutter_core_api, everything, self->cancellable, + echo_all_nullable_types_without_recursion_cb, + callback_data_new(self, response_handle)); +} + +static void send_multiple_nullable_types_without_recursion_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = + nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( + self->flutter_core_api, a_nullable_bool, a_nullable_int, + a_nullable_string, self->cancellable, + send_multiple_nullable_types_without_recursion_cb, + callback_data_new(self, response_handle)); +} + +static void echo_bool_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + gboolean return_value; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - api, response_handle, a_bool); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_bool( + self->flutter_core_api, a_bool, self->cancellable, echo_bool_cb, + callback_data_new(self, response_handle)); +} + +static void echo_int_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + int64_t return_value; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - api, response_handle, an_int); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_int( + self->flutter_core_api, an_int, self->cancellable, echo_int_cb, + callback_data_new(self, response_handle)); +} + +static void echo_double_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + double return_value; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - api, response_handle, a_double); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_double( + self->flutter_core_api, a_double, self->cancellable, echo_double_cb, + callback_data_new(self, response_handle)); +} + +static void echo_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - api, response_handle, a_string); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_string( + self->flutter_core_api, a_string, self->cancellable, echo_string_cb, + callback_data_new(self, response_handle)); +} + +static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree uint8_t* return_value = nullptr; + size_t return_value_length; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &return_value_length, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( + data->self->host_core_api, data->response_handle, return_value, + return_value_length); } static void call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( - api, response_handle, a_list, a_list_length); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( + self->flutter_core_api, a_list, a_list_length, self->cancellable, + echo_uint8_list_cb, callback_data_new(self, response_handle)); +} + +static void echo_list_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(FlValue) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - api, response_handle, a_list); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_list( + self->flutter_core_api, a_list, self->cancellable, echo_list_cb, + callback_data_new(self, response_handle)); +} + +static void echo_map_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(FlValue) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - api, response_handle, a_map); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_map( + self->flutter_core_api, a_map, self->cancellable, echo_map_cb, + callback_data_new(self, response_handle)); +} + +static void echo_enum_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + CoreTestsPigeonTestAnEnum return_value; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - api, response_handle, an_enum); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_enum( + self->flutter_core_api, an_enum, self->cancellable, echo_enum_cb, + callback_data_new(self, response_handle)); +} + +static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree gboolean* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - api, response_handle, a_bool); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( + self->flutter_core_api, a_bool, self->cancellable, echo_nullable_bool_cb, + callback_data_new(self, response_handle)); +} + +static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree int64_t* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - api, response_handle, an_int); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( + self->flutter_core_api, an_int, self->cancellable, echo_nullable_int_cb, + callback_data_new(self, response_handle)); +} + +static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree double* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - api, response_handle, a_double); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( + self->flutter_core_api, a_double, self->cancellable, + echo_nullable_double_cb, callback_data_new(self, response_handle)); +} + +static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - api, response_handle, a_string); + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( + self->flutter_core_api, a_string, self->cancellable, + echo_nullable_string_cb, callback_data_new(self, response_handle)); } static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + g_autofree uint8_t* return_value = nullptr; size_t return_value_length; g_autoptr(GError) error = nullptr; - // gboolean r = + // FIXME gboolean r = core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, &return_value, &return_value_length, &error); - // FIXME + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( + data->self->host_core_api, data->response_handle, return_value, + return_value_length); } static void call_flutter_echo_nullable_uint8_list( @@ -648,64 +1050,111 @@ static void call_flutter_echo_nullable_uint8_list( size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( - self->flutter_core_api, a_list, a_list_length, nullptr, - echo_nullable_uint8_list_cb, user_data); - core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( - api, response_handle, a_list, a_list_length); + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( + self->flutter_core_api, a_list, a_list_length, self->cancellable, + echo_nullable_uint8_list_cb, callback_data_new(self, response_handle)); } static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // gboolean r = + // FIXME gboolean r = core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, &return_value, &error); - // FIXME + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( - self->flutter_core_api, a_list, nullptr, echo_nullable_list_cb, - user_data); + self->flutter_core_api, a_list, self->cancellable, echo_nullable_list_cb, + callback_data_new(self, response_handle)); +} + +static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autoptr(FlValue) return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( + self->flutter_core_api, a_map, self->cancellable, echo_nullable_map_cb, + callback_data_new(self, response_handle)); +} + +static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + + g_autofree CoreTestsPigeonTestAnEnum* return_value = nullptr; + g_autoptr(GError) error = nullptr; + // FIXME gboolean r = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error); + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { - // FIXME + TestPlugin* self = TEST_PLUGIN(user_data); + + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( + self->flutter_core_api, an_enum, self->cancellable, echo_nullable_enum_cb, + callback_data_new(self, response_handle)); } -static void echo_string_cb(GObject* object, GAsyncResult* result, - gpointer user_data) { +static void small_api_echo_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - // gboolean r = + // FIXME gboolean r = core_tests_pigeon_test_flutter_small_api_echo_string_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &return_value, &error); - // FIXME + + core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( + data->self->host_core_api, data->response_handle, return_value); } static void call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); + core_tests_pigeon_test_flutter_small_api_echo_string( - self->flutter_small_api, a_string, nullptr, echo_string_cb, self); + self->flutter_small_api, a_string, self->cancellable, + small_api_echo_string_cb, callback_data_new(self, response_handle)); } static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { @@ -842,10 +1291,13 @@ FlMethodResponse* get_platform_version() { static void test_plugin_dispose(GObject* object) { TestPlugin* self = TEST_PLUGIN(object); + g_cancellable_cancel(self->cancellable); + g_clear_object(&self->host_core_api); g_clear_object(&self->host_small_api); g_clear_object(&self->flutter_core_api); g_clear_object(&self->flutter_small_api); + g_clear_object(&self->cancellable); G_OBJECT_CLASS(test_plugin_parent_class)->dispose(object); } @@ -854,7 +1306,9 @@ static void test_plugin_class_init(TestPluginClass* klass) { G_OBJECT_CLASS(klass)->dispose = test_plugin_dispose; } -static void test_plugin_init(TestPlugin* self) {} +static void test_plugin_init(TestPlugin* self) { + self->cancellable = g_cancellable_new(); +} static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); From e8c71d30f2ca055ae590e422fc907b3696f719bb Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 19 Apr 2024 14:47:57 +1200 Subject: [PATCH 058/127] Update generated code --- packages/pigeon/lib/gobject_generator.dart | 1 - .../linux/pigeon/core_tests.gen.cc | 1022 +++++++++++------ .../test_plugin/linux/pigeon/core_tests.gen.h | 8 +- 3 files changed, 651 insertions(+), 380 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index fec26c319b49..77b3e73ce07b 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -460,7 +460,6 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeObjectStruct(indent, module, classDefinition.name, () { - indent.newln(); for (final NamedType field in classDefinition.fields) { final String fieldName = _getFieldName(field.name); final String fieldType = _getType(module, field.type, isOutput: true); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 67f790cae3f0..07821914a35f 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -173,7 +173,7 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_append_take(values, fl_value_new_bool(self->a_bool)); fl_value_append_take(values, fl_value_new_int(self->an_int)); fl_value_append_take(values, fl_value_new_int(self->an_int64)); - fl_value_append_take(values, fl_value_new_double(self->a_double)); + fl_value_append_take(values, fl_value_new_float(self->a_double)); fl_value_append_take( values, fl_value_new_uint8_list(self->a_byte_array, self->a_byte_array_length)); @@ -188,7 +188,8 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); fl_value_append_take(values, fl_value_ref(self->a_list)); fl_value_append_take(values, fl_value_ref(self->a_map)); - fl_value_append_take(values, fl_value_new_int(self->an_enum)); + fl_value_append_take(values, + fl_value_new_int(static_cast(self->an_enum))); fl_value_append_take(values, fl_value_new_string(self->a_string)); fl_value_append_take(values, fl_value_ref(self->an_object)); return values; @@ -203,15 +204,19 @@ core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { FlValue* value2 = fl_value_get_list_value(values, 2); int64_t an_int64 = fl_value_get_int(value2); FlValue* value3 = fl_value_get_list_value(values, 3); - double a_double = fl_value_get_double(value3); + double a_double = fl_value_get_float(value3); FlValue* value4 = fl_value_get_list_value(values, 4); const uint8_t* a_byte_array = fl_value_get_uint8_list(value4); + size_t a_byte_array_length = fl_value_get_length(value4); FlValue* value5 = fl_value_get_list_value(values, 5); const int32_t* a4_byte_array = fl_value_get_int32_list(value5); + size_t a4_byte_array_length = fl_value_get_length(value5); FlValue* value6 = fl_value_get_list_value(values, 6); const int64_t* a8_byte_array = fl_value_get_int64_list(value6); + size_t a8_byte_array_length = fl_value_get_length(value6); FlValue* value7 = fl_value_get_list_value(values, 7); const double* a_float_array = fl_value_get_float_list(value7); + size_t a_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); FlValue* a_list = value8; FlValue* value9 = fl_value_get_list_value(values, 9); @@ -224,8 +229,9 @@ core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { FlValue* value12 = fl_value_get_list_value(values, 12); FlValue* an_object = value12; return core_tests_pigeon_test_all_types_new( - a_bool, an_int, an_int64, a_double, a_byte_array, a4_byte_array, - a8_byte_array, a_float_array, a_list, a_map, an_enum, a_string, + a_bool, an_int, an_int64, a_double, a_byte_array, a_byte_array_length, + a4_byte_array, a4_byte_array_length, a8_byte_array, a8_byte_array_length, + a_float_array, a_float_array_length, a_list, a_map, an_enum, a_string, an_object); } @@ -270,6 +276,7 @@ static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { g_clear_pointer(&self->nullable_nested_list, fl_value_unref); g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); + g_clear_pointer(&self->a_nullable_enum, g_free); g_clear_pointer(&self->a_nullable_string, g_free); g_clear_pointer(&self->a_nullable_object, fl_value_unref); g_clear_object(&self->all_nullable_types); @@ -345,7 +352,13 @@ core_tests_pigeon_test_all_nullable_types_new( self->nullable_map_with_annotations = g_object_ref(nullable_map_with_annotations); self->nullable_map_with_object = g_object_ref(nullable_map_with_object); - self->a_nullable_enum = a_nullable_enum; + if (a_nullable_enum != nullptr) { + self->a_nullable_enum = static_cast( + malloc(sizeof(CoreTestsPigeonTestAnEnum))); + *self->a_nullable_enum = *a_nullable_enum; + } else { + self->a_nullable_enum = nullptr; + } self->a_nullable_string = g_strdup(a_nullable_string); self->a_nullable_object = g_object_ref(a_nullable_object); self->all_nullable_types = g_object_ref(all_nullable_types); @@ -496,7 +509,7 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_double != nullptr - ? fl_value_new_double(*self->a_nullable_double) + ? fl_value_new_float(*self->a_nullable_double) : fl_value_new_null()); fl_value_append_take( values, self->a_nullable_byte_array != nullptr @@ -535,9 +548,11 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_enum != nullptr - ? fl_value_new_int(self->a_nullable_enum) - : fl_value_new_null()); + fl_value_append_take( + values, + self->a_nullable_enum != nullptr + ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -579,7 +594,7 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { double* a_nullable_double = nullptr; double a_nullable_double_value; if (fl_value_get_type(value3) != FL_VALUE_TYPE_NULL) { - a_nullable_double_value = fl_value_get_double(value3); + a_nullable_double_value = fl_value_get_float(value3); a_nullable_double = &a_nullable_double_value; } FlValue* value4 = fl_value_get_list_value(values, 4); @@ -587,21 +602,25 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { fl_value_get_type(value4) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_uint8_list(value4); + size_t a_nullable_byte_array_length = fl_value_get_length(value4); FlValue* value5 = fl_value_get_list_value(values, 5); const int32_t* a_nullable4_byte_array = fl_value_get_type(value5) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_int32_list(value5); + size_t a_nullable4_byte_array_length = fl_value_get_length(value5); FlValue* value6 = fl_value_get_list_value(values, 6); const int64_t* a_nullable8_byte_array = fl_value_get_type(value6) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_int64_list(value6); + size_t a_nullable8_byte_array_length = fl_value_get_length(value6); FlValue* value7 = fl_value_get_list_value(values, 7); const double* a_nullable_float_array = fl_value_get_type(value7) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_float_list(value7); + size_t a_nullable_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); FlValue* a_nullable_list = fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; @@ -618,10 +637,13 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { FlValue* nullable_map_with_object = fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; FlValue* value13 = fl_value_get_list_value(values, 13); - CoreTestsPigeonTestAnEnum* a_nullable_enum = - fl_value_get_type(value13) == FL_VALUE_TYPE_NULL - ? nullptr - : static_cast(fl_value_get_int(value13)); + CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; + CoreTestsPigeonTestAnEnum a_nullable_enum_value; + if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + a_nullable_enum_value = + static_cast(fl_value_get_int(value13)); + a_nullable_enum = &a_nullable_enum_value; + } FlValue* value14 = fl_value_get_list_value(values, 14); const gchar* a_nullable_string = fl_value_get_type(value14) == FL_VALUE_TYPE_NULL @@ -638,9 +660,11 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { fl_value_get_custom_value_object(value16)); return core_tests_pigeon_test_all_nullable_types_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, - a_nullable_byte_array, a_nullable4_byte_array, a_nullable8_byte_array, - a_nullable_float_array, a_nullable_list, a_nullable_map, - nullable_nested_list, nullable_map_with_annotations, + a_nullable_byte_array, a_nullable_byte_array_length, + a_nullable4_byte_array, a_nullable4_byte_array_length, + a_nullable8_byte_array, a_nullable8_byte_array_length, + a_nullable_float_array, a_nullable_float_array_length, a_nullable_list, + a_nullable_map, nullable_nested_list, nullable_map_with_annotations, nullable_map_with_object, a_nullable_enum, a_nullable_string, a_nullable_object, all_nullable_types); } @@ -687,6 +711,7 @@ static void core_tests_pigeon_test_all_nullable_types_without_recursion_dispose( g_clear_pointer(&self->nullable_nested_list, fl_value_unref); g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); + g_clear_pointer(&self->a_nullable_enum, g_free); g_clear_pointer(&self->a_nullable_string, g_free); g_clear_pointer(&self->a_nullable_object, fl_value_unref); G_OBJECT_CLASS( @@ -763,7 +788,13 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->nullable_map_with_annotations = g_object_ref(nullable_map_with_annotations); self->nullable_map_with_object = g_object_ref(nullable_map_with_object); - self->a_nullable_enum = a_nullable_enum; + if (a_nullable_enum != nullptr) { + self->a_nullable_enum = static_cast( + malloc(sizeof(CoreTestsPigeonTestAnEnum))); + *self->a_nullable_enum = *a_nullable_enum; + } else { + self->a_nullable_enum = nullptr; + } self->a_nullable_string = g_strdup(a_nullable_string); self->a_nullable_object = g_object_ref(a_nullable_object); return self; @@ -932,7 +963,7 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_double != nullptr - ? fl_value_new_double(*self->a_nullable_double) + ? fl_value_new_float(*self->a_nullable_double) : fl_value_new_null()); fl_value_append_take( values, self->a_nullable_byte_array != nullptr @@ -971,9 +1002,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_enum != nullptr - ? fl_value_new_int(self->a_nullable_enum) - : fl_value_new_null()); + fl_value_append_take( + values, + self->a_nullable_enum != nullptr + ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -1012,7 +1045,7 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( double* a_nullable_double = nullptr; double a_nullable_double_value; if (fl_value_get_type(value3) != FL_VALUE_TYPE_NULL) { - a_nullable_double_value = fl_value_get_double(value3); + a_nullable_double_value = fl_value_get_float(value3); a_nullable_double = &a_nullable_double_value; } FlValue* value4 = fl_value_get_list_value(values, 4); @@ -1020,21 +1053,25 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( fl_value_get_type(value4) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_uint8_list(value4); + size_t a_nullable_byte_array_length = fl_value_get_length(value4); FlValue* value5 = fl_value_get_list_value(values, 5); const int32_t* a_nullable4_byte_array = fl_value_get_type(value5) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_int32_list(value5); + size_t a_nullable4_byte_array_length = fl_value_get_length(value5); FlValue* value6 = fl_value_get_list_value(values, 6); const int64_t* a_nullable8_byte_array = fl_value_get_type(value6) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_int64_list(value6); + size_t a_nullable8_byte_array_length = fl_value_get_length(value6); FlValue* value7 = fl_value_get_list_value(values, 7); const double* a_nullable_float_array = fl_value_get_type(value7) == FL_VALUE_TYPE_NULL ? nullptr : fl_value_get_float_list(value7); + size_t a_nullable_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); FlValue* a_nullable_list = fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; @@ -1051,10 +1088,13 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( FlValue* nullable_map_with_object = fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; FlValue* value13 = fl_value_get_list_value(values, 13); - CoreTestsPigeonTestAnEnum* a_nullable_enum = - fl_value_get_type(value13) == FL_VALUE_TYPE_NULL - ? nullptr - : static_cast(fl_value_get_int(value13)); + CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; + CoreTestsPigeonTestAnEnum a_nullable_enum_value; + if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + a_nullable_enum_value = + static_cast(fl_value_get_int(value13)); + a_nullable_enum = &a_nullable_enum_value; + } FlValue* value14 = fl_value_get_list_value(values, 14); const gchar* a_nullable_string = fl_value_get_type(value14) == FL_VALUE_TYPE_NULL @@ -1065,9 +1105,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; return core_tests_pigeon_test_all_nullable_types_without_recursion_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, - a_nullable_byte_array, a_nullable4_byte_array, a_nullable8_byte_array, - a_nullable_float_array, a_nullable_list, a_nullable_map, - nullable_nested_list, nullable_map_with_annotations, + a_nullable_byte_array, a_nullable_byte_array_length, + a_nullable4_byte_array, a_nullable4_byte_array_length, + a_nullable8_byte_array, a_nullable8_byte_array_length, + a_nullable_float_array, a_nullable_float_array_length, a_nullable_list, + a_nullable_map, nullable_nested_list, nullable_map_with_annotations, nullable_map_with_object, a_nullable_enum, a_nullable_string, a_nullable_object); } @@ -1253,7 +1295,8 @@ G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiCodec, core_tests_pigeon_test_host_integration_core_api_codec, fl_standard_message_codec_get_type()) -static gboolean write_core_tests_pigeon_test_all_classes_wrapper( +static gboolean +core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { uint8_t type = 128; @@ -1263,7 +1306,8 @@ static gboolean write_core_tests_pigeon_test_all_classes_wrapper( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_all_nullable_types( +static gboolean +core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypes* value, GError** error) { uint8_t type = 129; @@ -1274,7 +1318,7 @@ static gboolean write_core_tests_pigeon_test_all_nullable_types( } static gboolean -write_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, GError** error) { @@ -1286,7 +1330,8 @@ write_core_tests_pigeon_test_all_nullable_types_without_recursion( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_all_types( +static gboolean +core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllTypes* value, GError** error) { uint8_t type = 131; @@ -1295,7 +1340,8 @@ static gboolean write_core_tests_pigeon_test_all_types( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_test_message( +static gboolean +core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestTestMessage* value, GError** error) { uint8_t type = 132; @@ -1311,31 +1357,31 @@ static gboolean core_tests_pigeon_test_host_integration_core_api_write_value( if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 128: - return write_core_tests_pigeon_test_all_classes_wrapper( + return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( fl_value_get_custom_value_object(value)), error); case 129: - return write_core_tests_pigeon_test_all_nullable_types( + return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value)), error); case 130: - return write_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value)), error); case 131: - return write_core_tests_pigeon_test_all_types( + return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value)), error); case 132: - return write_core_tests_pigeon_test_test_message( + return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_test_message( codec, buffer, CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( fl_value_get_custom_value_object(value)), @@ -1348,7 +1394,8 @@ static gboolean core_tests_pigeon_test_host_integration_core_api_write_value( ->write_value(codec, buffer, value, error); } -static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( +static FlValue* +core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1368,7 +1415,8 @@ static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( return fl_value_new_custom_object_take(128, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_all_nullable_types( +static FlValue* +core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1389,7 +1437,7 @@ static FlValue* read_core_tests_pigeon_test_all_nullable_types( } static FlValue* -read_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1410,7 +1458,8 @@ read_core_tests_pigeon_test_all_nullable_types_without_recursion( return fl_value_new_custom_object_take(130, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_all_types( +static FlValue* +core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1430,7 +1479,8 @@ static FlValue* read_core_tests_pigeon_test_all_types( return fl_value_new_custom_object_take(131, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_test_message( +static FlValue* +core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1456,20 +1506,20 @@ core_tests_pigeon_test_host_integration_core_api_read_value_of_type( GError** error) { switch (type) { case 128: - return read_core_tests_pigeon_test_all_classes_wrapper(codec, buffer, - offset, error); + return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( + codec, buffer, offset, error); case 129: - return read_core_tests_pigeon_test_all_nullable_types(codec, buffer, - offset, error); + return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( + codec, buffer, offset, error); case 130: - return read_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, offset, error); case 131: - return read_core_tests_pigeon_test_all_types(codec, buffer, offset, - error); + return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_types( + codec, buffer, offset, error); case 132: - return read_core_tests_pigeon_test_test_message(codec, buffer, offset, - error); + return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_test_message( + codec, buffer, offset, error); default: return FL_STANDARD_MESSAGE_CODEC_CLASS( core_tests_pigeon_test_host_integration_core_api_codec_parent_class) @@ -1911,7 +1961,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( core_tests_pigeon_test_host_integration_core_api_echo_double_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_double(return_value)); + fl_value_append_take(self->value, fl_value_new_float(return_value)); return self; } @@ -2404,7 +2454,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_int(return_value)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -2533,7 +2584,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_re core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_double(return_value)); + fl_value_append_take(self->value, fl_value_new_float(return_value)); return self; } @@ -3129,7 +3180,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_double(*return_value) + ? fl_value_new_float(*return_value) : fl_value_new_null()); return self; } @@ -3587,9 +3638,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_int(return_value) - : fl_value_new_null()); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -3925,7 +3977,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new( core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_double(return_value)); + fl_value_append_take(self->value, fl_value_new_float(return_value)); return self; } @@ -4409,7 +4461,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_int(return_value)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -4989,7 +5042,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_double(*return_value) + ? fl_value_new_float(*return_value) : fl_value_new_null()); return self; } @@ -5496,9 +5549,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_respon core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_int(return_value) - : fl_value_new_null()); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -6292,7 +6346,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_respon core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_double(return_value)); + fl_value_append_take(self->value, fl_value_new_float(return_value)); return self; } @@ -6644,7 +6698,8 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, fl_value_new_int(return_value)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -6865,7 +6920,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_doub nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_double(*return_value) + ? fl_value_new_float(*return_value) : fl_value_new_null()); return self; } @@ -7236,9 +7291,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, return_value != nullptr - ? fl_value_new_int(return_value) - : fl_value_new_null()); + fl_value_append_take( + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -7431,9 +7487,9 @@ struct _CoreTestsPigeonTestHostIntegrationCoreApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, core_tests_pigeon_test_host_integration_core_api, G_TYPE_OBJECT) -static void noop_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_noop_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7457,7 +7513,7 @@ static void noop_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_all_types_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7487,9 +7543,9 @@ static void echo_all_types_cb( } } -static void throw_error_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_throw_error_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7513,7 +7569,8 @@ static void throw_error_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void throw_error_from_void_cb( +static void +core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7540,7 +7597,8 @@ static void throw_error_from_void_cb( } } -static void throw_flutter_error_cb( +static void +core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7566,9 +7624,9 @@ static void throw_flutter_error_cb( } } -static void echo_int_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_int_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7594,9 +7652,9 @@ static void echo_int_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_double_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_double_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7605,7 +7663,7 @@ static void echo_double_cb(FlBasicMessageChannel* channel, FlValue* message_, } FlValue* value0 = fl_value_get_list_value(message_, 0); - double a_double = fl_value_get_double(value0); + double a_double = fl_value_get_float(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse) response = self->vtable->echo_double(self, a_double, self->user_data); if (response == nullptr) { @@ -7622,9 +7680,9 @@ static void echo_double_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_bool_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_bool_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7650,9 +7708,9 @@ static void echo_bool_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_string_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_string_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7678,7 +7736,7 @@ static void echo_string_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_uint8_list_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7708,9 +7766,9 @@ static void echo_uint8_list_cb( } } -static void echo_object_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_object_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7736,9 +7794,9 @@ static void echo_object_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_list_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7764,9 +7822,9 @@ static void echo_list_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_map_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_map_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7792,7 +7850,8 @@ static void echo_map_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_class_wrapper_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7823,9 +7882,9 @@ static void echo_class_wrapper_cb( } } -static void echo_enum_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_echo_enum_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -7852,7 +7911,8 @@ static void echo_enum_cb(FlBasicMessageChannel* channel, FlValue* message_, } } -static void echo_named_default_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7883,7 +7943,8 @@ static void echo_named_default_string_cb( } } -static void echo_optional_default_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7895,7 +7956,7 @@ static void echo_optional_default_double_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - double a_double = fl_value_get_double(value0); + double a_double = fl_value_get_float(value0); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse) response = self->vtable->echo_optional_default_double(self, a_double, @@ -7914,7 +7975,8 @@ static void echo_optional_default_double_cb( } } -static void echo_required_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7942,7 +8004,8 @@ static void echo_required_int_cb( } } -static void echo_all_nullable_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -7975,7 +8038,8 @@ static void echo_all_nullable_types_cb( } } -static void echo_all_nullable_types_without_recursion_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8008,7 +8072,8 @@ static void echo_all_nullable_types_without_recursion_cb( } } -static void extract_nested_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8041,7 +8106,8 @@ static void extract_nested_nullable_string_cb( } } -static void create_nested_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8072,7 +8138,8 @@ static void create_nested_nullable_string_cb( } } -static void send_multiple_nullable_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8118,7 +8185,8 @@ static void send_multiple_nullable_types_cb( } } -static void send_multiple_nullable_types_without_recursion_cb( +static void +core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8164,7 +8232,8 @@ static void send_multiple_nullable_types_without_recursion_cb( } } -static void echo_nullable_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8198,7 +8267,8 @@ static void echo_nullable_int_cb( } } -static void echo_nullable_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8213,7 +8283,7 @@ static void echo_nullable_double_cb( double* a_nullable_double = nullptr; double a_nullable_double_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - a_nullable_double_value = fl_value_get_double(value0); + a_nullable_double_value = fl_value_get_float(value0); a_nullable_double = &a_nullable_double_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse) @@ -8233,7 +8303,8 @@ static void echo_nullable_double_cb( } } -static void echo_nullable_bool_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8267,7 +8338,8 @@ static void echo_nullable_bool_cb( } } -static void echo_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8297,7 +8369,8 @@ static void echo_nullable_string_cb( } } -static void echo_nullable_uint8_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8330,7 +8403,8 @@ static void echo_nullable_uint8_list_cb( } } -static void echo_nullable_object_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8360,7 +8434,8 @@ static void echo_nullable_object_cb( } } -static void echo_nullable_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8389,7 +8464,8 @@ static void echo_nullable_list_cb( } } -static void echo_nullable_map_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8418,7 +8494,8 @@ static void echo_nullable_map_cb( } } -static void echo_nullable_enum_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8429,8 +8506,13 @@ static void echo_nullable_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum* an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum* an_enum = nullptr; + CoreTestsPigeonTestAnEnum an_enum_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + an_enum_value = + static_cast(fl_value_get_int(value0)); + an_enum = &an_enum_value; + } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse) response = self->vtable->echo_nullable_enum(self, an_enum, self->user_data); @@ -8448,7 +8530,8 @@ static void echo_nullable_enum_cb( } } -static void echo_optional_nullable_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8484,7 +8567,8 @@ static void echo_optional_nullable_int_cb( } } -static void echo_named_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8515,9 +8599,9 @@ static void echo_named_nullable_string_cb( } } -static void noop_async_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_integration_core_api_noop_async_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); @@ -8528,7 +8612,7 @@ static void noop_async_cb(FlBasicMessageChannel* channel, FlValue* message_, self->vtable->noop_async(self, response_handle, self->user_data); } -static void echo_async_int_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8543,7 +8627,8 @@ static void echo_async_int_cb( self->vtable->echo_async_int(self, an_int, response_handle, self->user_data); } -static void echo_async_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8554,12 +8639,12 @@ static void echo_async_double_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - double a_double = fl_value_get_double(value0); + double a_double = fl_value_get_float(value0); self->vtable->echo_async_double(self, a_double, response_handle, self->user_data); } -static void echo_async_bool_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8574,7 +8659,8 @@ static void echo_async_bool_cb( self->vtable->echo_async_bool(self, a_bool, response_handle, self->user_data); } -static void echo_async_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8590,7 +8676,8 @@ static void echo_async_string_cb( self->user_data); } -static void echo_async_uint8_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8608,7 +8695,8 @@ static void echo_async_uint8_list_cb( response_handle, self->user_data); } -static void echo_async_object_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8624,7 +8712,7 @@ static void echo_async_object_cb( self->user_data); } -static void echo_async_list_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8639,7 +8727,7 @@ static void echo_async_list_cb( self->vtable->echo_async_list(self, a_list, response_handle, self->user_data); } -static void echo_async_map_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8654,7 +8742,7 @@ static void echo_async_map_cb( self->vtable->echo_async_map(self, a_map, response_handle, self->user_data); } -static void echo_async_enum_cb( +static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8671,7 +8759,8 @@ static void echo_async_enum_cb( self->user_data); } -static void throw_async_error_cb( +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8684,7 +8773,8 @@ static void throw_async_error_cb( self->vtable->throw_async_error(self, response_handle, self->user_data); } -static void throw_async_error_from_void_cb( +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8699,7 +8789,8 @@ static void throw_async_error_from_void_cb( self->user_data); } -static void throw_async_flutter_error_cb( +static void +core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8714,7 +8805,8 @@ static void throw_async_flutter_error_cb( self->user_data); } -static void echo_async_all_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8732,7 +8824,8 @@ static void echo_async_all_types_cb( self->user_data); } -static void echo_async_nullable_all_nullable_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8751,7 +8844,8 @@ static void echo_async_nullable_all_nullable_types_cb( self, everything, response_handle, self->user_data); } -static void echo_async_nullable_all_nullable_types_without_recursion_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8771,7 +8865,8 @@ static void echo_async_nullable_all_nullable_types_without_recursion_cb( self, everything, response_handle, self->user_data); } -static void echo_async_nullable_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8793,7 +8888,8 @@ static void echo_async_nullable_int_cb( self->user_data); } -static void echo_async_nullable_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8808,14 +8904,15 @@ static void echo_async_nullable_double_cb( double* a_double = nullptr; double a_double_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - a_double_value = fl_value_get_double(value0); + a_double_value = fl_value_get_float(value0); a_double = &a_double_value; } self->vtable->echo_async_nullable_double(self, a_double, response_handle, self->user_data); } -static void echo_async_nullable_bool_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8837,7 +8934,8 @@ static void echo_async_nullable_bool_cb( self->user_data); } -static void echo_async_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8854,7 +8952,8 @@ static void echo_async_nullable_string_cb( self->user_data); } -static void echo_async_nullable_uint8_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8873,7 +8972,8 @@ static void echo_async_nullable_uint8_list_cb( self->user_data); } -static void echo_async_nullable_object_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8890,7 +8990,8 @@ static void echo_async_nullable_object_cb( self->user_data); } -static void echo_async_nullable_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8907,7 +9008,8 @@ static void echo_async_nullable_list_cb( self->user_data); } -static void echo_async_nullable_map_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8924,7 +9026,8 @@ static void echo_async_nullable_map_cb( self->user_data); } -static void echo_async_nullable_enum_cb( +static void +core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8936,13 +9039,19 @@ static void echo_async_nullable_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum* an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum* an_enum = nullptr; + CoreTestsPigeonTestAnEnum an_enum_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + an_enum_value = + static_cast(fl_value_get_int(value0)); + an_enum = &an_enum_value; + } self->vtable->echo_async_nullable_enum(self, an_enum, response_handle, self->user_data); } -static void call_flutter_noop_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8955,7 +9064,8 @@ static void call_flutter_noop_cb( self->vtable->call_flutter_noop(self, response_handle, self->user_data); } -static void call_flutter_throw_error_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8970,7 +9080,8 @@ static void call_flutter_throw_error_cb( self->user_data); } -static void call_flutter_throw_error_from_void_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -8985,7 +9096,8 @@ static void call_flutter_throw_error_from_void_cb( self->user_data); } -static void call_flutter_echo_all_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9003,7 +9115,8 @@ static void call_flutter_echo_all_types_cb( self->user_data); } -static void call_flutter_echo_all_nullable_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9022,7 +9135,8 @@ static void call_flutter_echo_all_nullable_types_cb( self, everything, response_handle, self->user_data); } -static void call_flutter_send_multiple_nullable_types_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9054,7 +9168,8 @@ static void call_flutter_send_multiple_nullable_types_cb( self->user_data); } -static void call_flutter_echo_all_nullable_types_without_recursion_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9074,7 +9189,8 @@ static void call_flutter_echo_all_nullable_types_without_recursion_cb( self, everything, response_handle, self->user_data); } -static void call_flutter_send_multiple_nullable_types_without_recursion_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9108,7 +9224,8 @@ static void call_flutter_send_multiple_nullable_types_without_recursion_cb( self->user_data); } -static void call_flutter_echo_bool_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9125,7 +9242,8 @@ static void call_flutter_echo_bool_cb( self->user_data); } -static void call_flutter_echo_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9142,7 +9260,8 @@ static void call_flutter_echo_int_cb( self->user_data); } -static void call_flutter_echo_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9154,12 +9273,13 @@ static void call_flutter_echo_double_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - double a_double = fl_value_get_double(value0); + double a_double = fl_value_get_float(value0); self->vtable->call_flutter_echo_double(self, a_double, response_handle, self->user_data); } -static void call_flutter_echo_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9176,7 +9296,8 @@ static void call_flutter_echo_string_cb( self->user_data); } -static void call_flutter_echo_uint8_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9194,7 +9315,8 @@ static void call_flutter_echo_uint8_list_cb( response_handle, self->user_data); } -static void call_flutter_echo_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9211,7 +9333,8 @@ static void call_flutter_echo_list_cb( self->user_data); } -static void call_flutter_echo_map_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9228,7 +9351,8 @@ static void call_flutter_echo_map_cb( self->user_data); } -static void call_flutter_echo_enum_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9246,7 +9370,8 @@ static void call_flutter_echo_enum_cb( self->user_data); } -static void call_flutter_echo_nullable_bool_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9268,7 +9393,8 @@ static void call_flutter_echo_nullable_bool_cb( self->user_data); } -static void call_flutter_echo_nullable_int_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9290,7 +9416,8 @@ static void call_flutter_echo_nullable_int_cb( self->user_data); } -static void call_flutter_echo_nullable_double_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9305,14 +9432,15 @@ static void call_flutter_echo_nullable_double_cb( double* a_double = nullptr; double a_double_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - a_double_value = fl_value_get_double(value0); + a_double_value = fl_value_get_float(value0); a_double = &a_double_value; } self->vtable->call_flutter_echo_nullable_double( self, a_double, response_handle, self->user_data); } -static void call_flutter_echo_nullable_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9329,7 +9457,8 @@ static void call_flutter_echo_nullable_string_cb( self, a_string, response_handle, self->user_data); } -static void call_flutter_echo_nullable_uint8_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9347,7 +9476,8 @@ static void call_flutter_echo_nullable_uint8_list_cb( self, a_list, a_list_length, response_handle, self->user_data); } -static void call_flutter_echo_nullable_list_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9364,7 +9494,8 @@ static void call_flutter_echo_nullable_list_cb( self->user_data); } -static void call_flutter_echo_nullable_map_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9381,7 +9512,8 @@ static void call_flutter_echo_nullable_map_cb( self->user_data); } -static void call_flutter_echo_nullable_enum_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9393,13 +9525,19 @@ static void call_flutter_echo_nullable_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum* an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum* an_enum = nullptr; + CoreTestsPigeonTestAnEnum an_enum_value; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + an_enum_value = + static_cast(fl_value_get_int(value0)); + an_enum = &an_enum_value; + } self->vtable->call_flutter_echo_nullable_enum(self, an_enum, response_handle, self->user_data); } -static void call_flutter_small_api_echo_string_cb( +static void +core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -9547,114 +9685,143 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->noop_channel, noop_cb, - self, nullptr); + fl_basic_message_channel_set_message_handler( + self->noop_channel, + core_tests_pigeon_test_host_integration_core_api_noop_cb, self, nullptr); self->echo_all_types_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAllTypes", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_all_types_channel, echo_all_types_cb, self, nullptr); + self->echo_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, self, + nullptr); self->throw_error_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.throwError", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->throw_error_channel, - throw_error_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->throw_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_error_cb, self, + nullptr); self->throw_error_from_void_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwErrorFromVoid", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_error_from_void_channel, throw_error_from_void_cb, self, - nullptr); + self->throw_error_from_void_channel, + core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb, + self, nullptr); self->throw_flutter_error_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwFlutterError", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_flutter_error_channel, throw_flutter_error_cb, self, nullptr); + self->throw_flutter_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb, + self, nullptr); self->echo_int_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoInt", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_int_channel, - echo_int_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_int_cb, self, + nullptr); self->echo_double_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoDouble", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_double_channel, - echo_double_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_double_cb, self, + nullptr); self->echo_bool_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoBool", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_bool_channel, - echo_bool_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, self, + nullptr); self->echo_string_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoString", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_string_channel, - echo_string_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_string_cb, self, + nullptr); self->echo_uint8_list_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoUint8List", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_uint8_list_channel, echo_uint8_list_cb, self, nullptr); + self->echo_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, self, + nullptr); self->echo_object_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoObject", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_object_channel, - echo_object_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_object_cb, self, + nullptr); self->echo_list_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoList", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_list_channel, - echo_list_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_list_cb, self, + nullptr); self->echo_map_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoMap", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_map_channel, - echo_map_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_map_cb, self, + nullptr); self->echo_class_wrapper_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoClassWrapper", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_class_wrapper_channel, echo_class_wrapper_cb, self, nullptr); + self->echo_class_wrapper_channel, + core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb, + self, nullptr); self->echo_enum_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoEnum", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_enum_channel, - echo_enum_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, self, + nullptr); self->echo_named_default_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNamedDefaultString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_named_default_string_channel, echo_named_default_string_cb, + self->echo_named_default_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb, self, nullptr); self->echo_optional_default_double_channel = fl_basic_message_channel_new( messenger, @@ -9663,22 +9830,26 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_optional_default_double_channel, - echo_optional_default_double_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb, + self, nullptr); self->echo_required_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoRequiredInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_required_int_channel, echo_required_int_cb, self, nullptr); + self->echo_required_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb, + self, nullptr); self->echo_all_nullable_types_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllNullableTypes", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_all_nullable_types_channel, echo_all_nullable_types_cb, self, - nullptr); + self->echo_all_nullable_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb, + self, nullptr); self->echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -9687,7 +9858,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_all_nullable_types_without_recursion_channel, - echo_all_nullable_types_without_recursion_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb, + self, nullptr); self->extract_nested_nullable_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -9695,7 +9867,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->extract_nested_nullable_string_channel, - extract_nested_nullable_string_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb, + self, nullptr); self->create_nested_nullable_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -9703,7 +9876,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->create_nested_nullable_string_channel, - create_nested_nullable_string_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb, + self, nullptr); self->send_multiple_nullable_types_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -9711,7 +9885,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->send_multiple_nullable_types_channel, - send_multiple_nullable_types_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb, + self, nullptr); self->send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -9720,81 +9895,97 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->send_multiple_nullable_types_without_recursion_channel, - send_multiple_nullable_types_without_recursion_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb, + self, nullptr); self->echo_nullable_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_int_channel, echo_nullable_int_cb, self, nullptr); + self->echo_nullable_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb, + self, nullptr); self->echo_nullable_double_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableDouble", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_double_channel, echo_nullable_double_cb, self, - nullptr); + self->echo_nullable_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb, + self, nullptr); self->echo_nullable_bool_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableBool", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_bool_channel, echo_nullable_bool_cb, self, nullptr); + self->echo_nullable_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb, + self, nullptr); self->echo_nullable_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_string_channel, echo_nullable_string_cb, self, - nullptr); + self->echo_nullable_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb, + self, nullptr); self->echo_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableUint8List", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_uint8_list_channel, echo_nullable_uint8_list_cb, self, - nullptr); + self->echo_nullable_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb, + self, nullptr); self->echo_nullable_object_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableObject", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_object_channel, echo_nullable_object_cb, self, - nullptr); + self->echo_nullable_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb, + self, nullptr); self->echo_nullable_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableList", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_list_channel, echo_nullable_list_cb, self, nullptr); + self->echo_nullable_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb, + self, nullptr); self->echo_nullable_map_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableMap", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_map_channel, echo_nullable_map_cb, self, nullptr); + self->echo_nullable_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb, + self, nullptr); self->echo_nullable_enum_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableEnum", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_enum_channel, echo_nullable_enum_cb, self, nullptr); + self->echo_nullable_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb, + self, nullptr); self->echo_optional_nullable_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoOptionalNullableInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_optional_nullable_int_channel, echo_optional_nullable_int_cb, + self->echo_optional_nullable_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb, self, nullptr); self->echo_named_nullable_string_channel = fl_basic_message_channel_new( messenger, @@ -9802,93 +9993,116 @@ core_tests_pigeon_test_host_integration_core_api_new( "echoNamedNullableString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_named_nullable_string_channel, echo_named_nullable_string_cb, + self->echo_named_nullable_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb, self, nullptr); self->noop_async_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.noopAsync", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->noop_async_channel, - noop_async_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->noop_async_channel, + core_tests_pigeon_test_host_integration_core_api_noop_async_cb, self, + nullptr); self->echo_async_int_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAsyncInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_int_channel, echo_async_int_cb, self, nullptr); + self->echo_async_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, self, + nullptr); self->echo_async_double_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncDouble", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_double_channel, echo_async_double_cb, self, nullptr); + self->echo_async_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb, + self, nullptr); self->echo_async_bool_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAsyncBool", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_bool_channel, echo_async_bool_cb, self, nullptr); + self->echo_async_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, self, + nullptr); self->echo_async_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_string_channel, echo_async_string_cb, self, nullptr); + self->echo_async_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb, + self, nullptr); self->echo_async_uint8_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncUint8List", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_uint8_list_channel, echo_async_uint8_list_cb, self, - nullptr); + self->echo_async_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb, + self, nullptr); self->echo_async_object_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncObject", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_object_channel, echo_async_object_cb, self, nullptr); + self->echo_async_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb, + self, nullptr); self->echo_async_list_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAsyncList", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_list_channel, echo_async_list_cb, self, nullptr); + self->echo_async_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, self, + nullptr); self->echo_async_map_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAsyncMap", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_map_channel, echo_async_map_cb, self, nullptr); + self->echo_async_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, self, + nullptr); self->echo_async_enum_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_integration_" "tests.HostIntegrationCoreApi.echoAsyncEnum", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_enum_channel, echo_async_enum_cb, self, nullptr); + self->echo_async_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, self, + nullptr); self->throw_async_error_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncError", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_error_channel, throw_async_error_cb, self, nullptr); + self->throw_async_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, + self, nullptr); self->throw_async_error_from_void_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncErrorFromVoid", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_error_from_void_channel, throw_async_error_from_void_cb, + self->throw_async_error_from_void_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, self, nullptr); self->throw_async_flutter_error_channel = fl_basic_message_channel_new( messenger, @@ -9896,7 +10110,8 @@ core_tests_pigeon_test_host_integration_core_api_new( "throwAsyncFlutterError", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_flutter_error_channel, throw_async_flutter_error_cb, + self->throw_async_flutter_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, self, nullptr); self->echo_async_all_types_channel = fl_basic_message_channel_new( messenger, @@ -9904,8 +10119,9 @@ core_tests_pigeon_test_host_integration_core_api_new( "echoAsyncAllTypes", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_all_types_channel, echo_async_all_types_cb, self, - nullptr); + self->echo_async_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, + self, nullptr); self->echo_async_nullable_all_nullable_types_channel = fl_basic_message_channel_new( messenger, @@ -9914,7 +10130,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_all_nullable_types_channel, - echo_async_nullable_all_nullable_types_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb, + self, nullptr); self->echo_async_nullable_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -9923,23 +10140,25 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_all_nullable_types_without_recursion_channel, - echo_async_nullable_all_nullable_types_without_recursion_cb, self, - nullptr); + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, + self, nullptr); self->echo_async_nullable_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_int_channel, echo_async_nullable_int_cb, self, - nullptr); + self->echo_async_nullable_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, + self, nullptr); self->echo_async_nullable_double_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableDouble", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_double_channel, echo_async_nullable_double_cb, + self->echo_async_nullable_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, self, nullptr); self->echo_async_nullable_bool_channel = fl_basic_message_channel_new( messenger, @@ -9947,15 +10166,17 @@ core_tests_pigeon_test_host_integration_core_api_new( "echoAsyncNullableBool", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_bool_channel, echo_async_nullable_bool_cb, self, - nullptr); + self->echo_async_nullable_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, + self, nullptr); self->echo_async_nullable_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_string_channel, echo_async_nullable_string_cb, + self->echo_async_nullable_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, self, nullptr); self->echo_async_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, @@ -9964,14 +10185,16 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_uint8_list_channel, - echo_async_nullable_uint8_list_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, + self, nullptr); self->echo_async_nullable_object_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableObject", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_object_channel, echo_async_nullable_object_cb, + self->echo_async_nullable_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, self, nullptr); self->echo_async_nullable_list_channel = fl_basic_message_channel_new( messenger, @@ -9979,39 +10202,45 @@ core_tests_pigeon_test_host_integration_core_api_new( "echoAsyncNullableList", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_list_channel, echo_async_nullable_list_cb, self, - nullptr); + self->echo_async_nullable_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, + self, nullptr); self->echo_async_nullable_map_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableMap", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_map_channel, echo_async_nullable_map_cb, self, - nullptr); + self->echo_async_nullable_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, + self, nullptr); self->echo_async_nullable_enum_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableEnum", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_enum_channel, echo_async_nullable_enum_cb, self, - nullptr); + self->echo_async_nullable_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, + self, nullptr); self->call_flutter_noop_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterNoop", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_noop_channel, call_flutter_noop_cb, self, nullptr); + self->call_flutter_noop_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, + self, nullptr); self->call_flutter_throw_error_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterThrowError", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_throw_error_channel, call_flutter_throw_error_cb, self, - nullptr); + self->call_flutter_throw_error_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, + self, nullptr); self->call_flutter_throw_error_from_void_channel = fl_basic_message_channel_new( messenger, @@ -10020,14 +10249,16 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_throw_error_from_void_channel, - call_flutter_throw_error_from_void_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, + self, nullptr); self->call_flutter_echo_all_types_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoAllTypes", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_all_types_channel, call_flutter_echo_all_types_cb, + self->call_flutter_echo_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, self, nullptr); self->call_flutter_echo_all_nullable_types_channel = fl_basic_message_channel_new( @@ -10037,7 +10268,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_all_nullable_types_channel, - call_flutter_echo_all_nullable_types_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, + self, nullptr); self->call_flutter_send_multiple_nullable_types_channel = fl_basic_message_channel_new( messenger, @@ -10046,7 +10278,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_send_multiple_nullable_types_channel, - call_flutter_send_multiple_nullable_types_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb, + self, nullptr); self->call_flutter_echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -10055,7 +10288,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_all_nullable_types_without_recursion_channel, - call_flutter_echo_all_nullable_types_without_recursion_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb, + self, nullptr); self->call_flutter_send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -10064,40 +10298,44 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_send_multiple_nullable_types_without_recursion_channel, - call_flutter_send_multiple_nullable_types_without_recursion_cb, self, - nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, + self, nullptr); self->call_flutter_echo_bool_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoBool", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_bool_channel, call_flutter_echo_bool_cb, self, - nullptr); + self->call_flutter_echo_bool_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, + self, nullptr); self->call_flutter_echo_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoInt", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_int_channel, call_flutter_echo_int_cb, self, - nullptr); + self->call_flutter_echo_int_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, + self, nullptr); self->call_flutter_echo_double_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoDouble", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_double_channel, call_flutter_echo_double_cb, self, - nullptr); + self->call_flutter_echo_double_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, + self, nullptr); self->call_flutter_echo_string_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoString", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_string_channel, call_flutter_echo_string_cb, self, - nullptr); + self->call_flutter_echo_string_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, + self, nullptr); self->call_flutter_echo_uint8_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10105,31 +10343,35 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_uint8_list_channel, - call_flutter_echo_uint8_list_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, + self, nullptr); self->call_flutter_echo_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoList", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_list_channel, call_flutter_echo_list_cb, self, - nullptr); + self->call_flutter_echo_list_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, + self, nullptr); self->call_flutter_echo_map_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoMap", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_map_channel, call_flutter_echo_map_cb, self, - nullptr); + self->call_flutter_echo_map_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, + self, nullptr); self->call_flutter_echo_enum_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoEnum", FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_enum_channel, call_flutter_echo_enum_cb, self, - nullptr); + self->call_flutter_echo_enum_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, + self, nullptr); self->call_flutter_echo_nullable_bool_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10137,7 +10379,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_bool_channel, - call_flutter_echo_nullable_bool_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, + self, nullptr); self->call_flutter_echo_nullable_int_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10145,7 +10388,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_int_channel, - call_flutter_echo_nullable_int_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, + self, nullptr); self->call_flutter_echo_nullable_double_channel = fl_basic_message_channel_new( messenger, @@ -10154,7 +10398,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_double_channel, - call_flutter_echo_nullable_double_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, + self, nullptr); self->call_flutter_echo_nullable_string_channel = fl_basic_message_channel_new( messenger, @@ -10163,7 +10408,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_string_channel, - call_flutter_echo_nullable_string_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, + self, nullptr); self->call_flutter_echo_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, @@ -10172,7 +10418,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_uint8_list_channel, - call_flutter_echo_nullable_uint8_list_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, + self, nullptr); self->call_flutter_echo_nullable_list_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10180,7 +10427,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_list_channel, - call_flutter_echo_nullable_list_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, + self, nullptr); self->call_flutter_echo_nullable_map_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10188,7 +10436,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_map_channel, - call_flutter_echo_nullable_map_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, + self, nullptr); self->call_flutter_echo_nullable_enum_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10196,7 +10445,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_enum_channel, - call_flutter_echo_nullable_enum_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, + self, nullptr); self->call_flutter_small_api_echo_string_channel = fl_basic_message_channel_new( messenger, @@ -10205,7 +10455,8 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_small_api_echo_string_channel, - call_flutter_small_api_echo_string_cb, self, nullptr); + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_cb, + self, nullptr); return self; } @@ -10378,11 +10629,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, FlBasicMessageChannelResponseHandle* response_handle, - const uint8_t* return_value) { + const uint8_t* return_value, size_t return_value_length) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new( - return_value); + return_value, return_value_length); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond(self->echo_async_uint8_list_channel, response_handle, response->value, @@ -10904,12 +11155,12 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, FlBasicMessageChannelResponseHandle* response_handle, - const uint8_t* return_value) { + const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new( - return_value); + return_value, return_value_length); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond( self->echo_async_nullable_uint8_list_channel, response_handle, @@ -11511,12 +11762,12 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, FlBasicMessageChannelResponseHandle* response_handle, - const uint8_t* return_value) { + const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new( - return_value); + return_value, return_value_length); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond( self->call_flutter_echo_uint8_list_channel, response_handle, @@ -11797,12 +12048,12 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, FlBasicMessageChannelResponseHandle* response_handle, - const uint8_t* return_value) { + const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new( - return_value); + return_value, return_value_length); g_autoptr(GError) error = nullptr; if (!fl_basic_message_channel_respond( self->call_flutter_echo_nullable_uint8_list_channel, response_handle, @@ -11987,7 +12238,8 @@ G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec, core_tests_pigeon_test_flutter_integration_core_api_codec, fl_standard_message_codec_get_type()) -static gboolean write_core_tests_pigeon_test_all_classes_wrapper( +static gboolean +core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { uint8_t type = 128; @@ -11997,7 +12249,8 @@ static gboolean write_core_tests_pigeon_test_all_classes_wrapper( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_all_nullable_types( +static gboolean +core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypes* value, GError** error) { uint8_t type = 129; @@ -12008,7 +12261,7 @@ static gboolean write_core_tests_pigeon_test_all_nullable_types( } static gboolean -write_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, GError** error) { @@ -12020,7 +12273,8 @@ write_core_tests_pigeon_test_all_nullable_types_without_recursion( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_all_types( +static gboolean +core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllTypes* value, GError** error) { uint8_t type = 131; @@ -12029,7 +12283,8 @@ static gboolean write_core_tests_pigeon_test_all_types( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean write_core_tests_pigeon_test_test_message( +static gboolean +core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestTestMessage* value, GError** error) { uint8_t type = 132; @@ -12045,31 +12300,31 @@ static gboolean core_tests_pigeon_test_flutter_integration_core_api_write_value( if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 128: - return write_core_tests_pigeon_test_all_classes_wrapper( + return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( fl_value_get_custom_value_object(value)), error); case 129: - return write_core_tests_pigeon_test_all_nullable_types( + return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value)), error); case 130: - return write_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value)), error); case 131: - return write_core_tests_pigeon_test_all_types( + return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value)), error); case 132: - return write_core_tests_pigeon_test_test_message( + return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_test_message( codec, buffer, CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( fl_value_get_custom_value_object(value)), @@ -12082,7 +12337,8 @@ static gboolean core_tests_pigeon_test_flutter_integration_core_api_write_value( ->write_value(codec, buffer, value, error); } -static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( +static FlValue* +core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -12102,7 +12358,8 @@ static FlValue* read_core_tests_pigeon_test_all_classes_wrapper( return fl_value_new_custom_object_take(128, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_all_nullable_types( +static FlValue* +core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -12123,7 +12380,7 @@ static FlValue* read_core_tests_pigeon_test_all_nullable_types( } static FlValue* -read_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -12144,7 +12401,8 @@ read_core_tests_pigeon_test_all_nullable_types_without_recursion( return fl_value_new_custom_object_take(130, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_all_types( +static FlValue* +core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -12164,7 +12422,8 @@ static FlValue* read_core_tests_pigeon_test_all_types( return fl_value_new_custom_object_take(131, G_OBJECT(value)); } -static FlValue* read_core_tests_pigeon_test_test_message( +static FlValue* +core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -12190,20 +12449,20 @@ core_tests_pigeon_test_flutter_integration_core_api_read_value_of_type( GError** error) { switch (type) { case 128: - return read_core_tests_pigeon_test_all_classes_wrapper(codec, buffer, - offset, error); + return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( + codec, buffer, offset, error); case 129: - return read_core_tests_pigeon_test_all_nullable_types(codec, buffer, - offset, error); + return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( + codec, buffer, offset, error); case 130: - return read_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, offset, error); case 131: - return read_core_tests_pigeon_test_all_types(codec, buffer, offset, - error); + return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_types( + codec, buffer, offset, error); case 132: - return read_core_tests_pigeon_test_test_message(codec, buffer, offset, - error); + return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_test_message( + codec, buffer, offset, error); default: return FL_STANDARD_MESSAGE_CODEC_CLASS( core_tests_pigeon_test_flutter_integration_core_api_codec_parent_class) @@ -12609,7 +12868,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_double( GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_double(a_double)); + fl_value_append_take(args, fl_value_new_float(a_double)); fl_method_channel_invoke_method(self->channel, "echoDouble", args, cancellable, callback, user_data); } @@ -12628,7 +12887,7 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( return FALSE; } - *return_value = fl_value_get_double(r); + *return_value = fl_value_get_float(r); return TRUE; } @@ -12757,7 +13016,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_int(an_enum)); + fl_value_append_take(args, fl_value_new_int(static_cast(an_enum))); fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, callback, user_data); } @@ -12858,9 +13117,8 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, a_double != nullptr - ? fl_value_new_double(*a_double) - : fl_value_new_null()); + fl_value_append_take(args, a_double != nullptr ? fl_value_new_float(*a_double) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoNullableDouble", args, cancellable, callback, user_data); } @@ -12882,7 +13140,7 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { *return_value = static_cast(malloc(sizeof(double))); - **return_value = fl_value_get_double(r); + **return_value = fl_value_get_float(r); } else { *return_value = nullptr; } @@ -13022,8 +13280,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, an_enum != nullptr ? fl_value_new_int(an_enum) - : fl_value_new_null()); + fl_value_append_take(args, + an_enum != nullptr + ? fl_value_new_int(static_cast(*an_enum)) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, cancellable, callback, user_data); } @@ -13043,7 +13303,14 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( return FALSE; } - *return_value = static_cast(fl_value_get_int(r)); + if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + *return_value = static_cast( + malloc(sizeof(CoreTestsPigeonTestAnEnum))); + **return_value = + static_cast(fl_value_get_int(r)); + } else { + *return_value = nullptr; + } return TRUE; } @@ -13172,9 +13439,9 @@ struct _CoreTestsPigeonTestHostTrivialApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostTrivialApi, core_tests_pigeon_test_host_trivial_api, G_TYPE_OBJECT) -static void noop_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_trivial_api_noop_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(user_data); @@ -13237,8 +13504,9 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->noop_channel, noop_cb, - self, nullptr); + fl_basic_message_channel_set_message_handler( + self->noop_channel, core_tests_pigeon_test_host_trivial_api_noop_cb, self, + nullptr); return self; } @@ -13377,9 +13645,9 @@ struct _CoreTestsPigeonTestHostSmallApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApi, core_tests_pigeon_test_host_small_api, G_TYPE_OBJECT) -static void echo_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_small_api_echo_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(user_data); @@ -13392,9 +13660,9 @@ static void echo_cb(FlBasicMessageChannel* channel, FlValue* message_, self->vtable->echo(self, a_string, response_handle, self->user_data); } -static void void_void_cb(FlBasicMessageChannel* channel, FlValue* message_, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void core_tests_pigeon_test_host_small_api_void_void_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(user_data); @@ -13445,14 +13713,16 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->echo_channel, echo_cb, - self, nullptr); + fl_basic_message_channel_set_message_handler( + self->echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, self, + nullptr); self->void_void_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid", FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler(self->void_void_channel, - void_void_cb, self, nullptr); + fl_basic_message_channel_set_message_handler( + self->void_void_channel, + core_tests_pigeon_test_host_small_api_void_void_cb, self, nullptr); return self; } @@ -13527,7 +13797,8 @@ G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApiCodec, core_tests_pigeon_test_flutter_small_api_codec, fl_standard_message_codec_get_type()) -static gboolean write_core_tests_pigeon_test_test_message( +static gboolean +core_tests_pigeon_test_flutter_small_api_write_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestTestMessage* value, GError** error) { uint8_t type = 128; @@ -13543,7 +13814,7 @@ static gboolean core_tests_pigeon_test_flutter_small_api_write_value( if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 128: - return write_core_tests_pigeon_test_test_message( + return core_tests_pigeon_test_flutter_small_api_write_core_tests_pigeon_test_test_message( codec, buffer, CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( fl_value_get_custom_value_object(value)), @@ -13556,7 +13827,8 @@ static gboolean core_tests_pigeon_test_flutter_small_api_write_value( ->write_value(codec, buffer, value, error); } -static FlValue* read_core_tests_pigeon_test_test_message( +static FlValue* +core_tests_pigeon_test_flutter_small_api_read_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -13581,8 +13853,8 @@ static FlValue* core_tests_pigeon_test_flutter_small_api_read_value_of_type( GError** error) { switch (type) { case 128: - return read_core_tests_pigeon_test_test_message(codec, buffer, offset, - error); + return core_tests_pigeon_test_flutter_small_api_read_core_tests_pigeon_test_test_message( + codec, buffer, offset, error); default: return FL_STANDARD_MESSAGE_CODEC_CLASS( core_tests_pigeon_test_flutter_small_api_codec_parent_class) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index 1a114b4d09ac..f8b86f7b0ced 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -1713,8 +1713,8 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( // Returns the passed byte list, to test serialization and deserialization. void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, - GCancellable* cancellable, GAsyncReadyCallback callback, - gpointer user_data); + size_t a_list_length, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( @@ -1798,8 +1798,8 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( // Returns the passed byte list, to test serialization and deserialization. void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* a_list, - GCancellable* cancellable, GAsyncReadyCallback callback, - gpointer user_data); + size_t a_list_length, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data); gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( From e52b54a62a8b4ffcbbcd65a77aeb0fed9f086709 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 19 Apr 2024 15:30:12 +1200 Subject: [PATCH 059/127] Handle errors in tests --- .../test_plugin/linux/test_plugin.cc | 275 +++++++++++------- 1 file changed, 175 insertions(+), 100 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 7459e9f8784e..560a77dacdae 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -518,10 +518,13 @@ static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_noop_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_noop_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( data->self->host_core_api, data->response_handle); @@ -543,10 +546,13 @@ static void throw_error_cb(GObject* object, GAsyncResult* result, g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( data->self->host_core_api, data->response_handle, return_value); @@ -567,10 +573,13 @@ static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, g_autoptr(CallbackData) data = static_cast(user_data); g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( data->self->host_core_api, data->response_handle); @@ -592,10 +601,13 @@ static void echo_all_types_cb(GObject* object, GAsyncResult* result, g_autoptr(CoreTestsPigeonTestAllTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( data->self->host_core_api, data->response_handle, return_value); @@ -618,10 +630,13 @@ static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( data->self->host_core_api, data->response_handle, return_value); @@ -645,10 +660,13 @@ static void send_multiple_nullable_types_cb(GObject* object, g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( data->self->host_core_api, data->response_handle, return_value); @@ -674,10 +692,13 @@ static void echo_all_nullable_types_without_recursion_cb(GObject* object, g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( data->self->host_core_api, data->response_handle, return_value); @@ -702,10 +723,13 @@ static void send_multiple_nullable_types_without_recursion_cb( g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( data->self->host_core_api, data->response_handle, return_value); @@ -730,10 +754,13 @@ static void echo_bool_cb(GObject* object, GAsyncResult* result, gboolean return_value; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( data->self->host_core_api, data->response_handle, return_value); @@ -755,10 +782,13 @@ static void echo_int_cb(GObject* object, GAsyncResult* result, int64_t return_value; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( data->self->host_core_api, data->response_handle, return_value); @@ -780,10 +810,13 @@ static void echo_double_cb(GObject* object, GAsyncResult* result, double return_value; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( data->self->host_core_api, data->response_handle, return_value); @@ -805,10 +838,13 @@ static void echo_string_cb(GObject* object, GAsyncResult* result, g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( data->self->host_core_api, data->response_handle, return_value); @@ -831,10 +867,13 @@ static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, g_autofree uint8_t* return_value = nullptr; size_t return_value_length; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &return_value_length, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &return_value_length, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( data->self->host_core_api, data->response_handle, return_value, @@ -858,10 +897,13 @@ static void echo_list_cb(GObject* object, GAsyncResult* result, g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( data->self->host_core_api, data->response_handle, return_value); @@ -883,10 +925,13 @@ static void echo_map_cb(GObject* object, GAsyncResult* result, g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( data->self->host_core_api, data->response_handle, return_value); @@ -908,10 +953,13 @@ static void echo_enum_cb(GObject* object, GAsyncResult* result, CoreTestsPigeonTestAnEnum return_value; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( data->self->host_core_api, data->response_handle, return_value); @@ -934,10 +982,13 @@ static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, g_autofree gboolean* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( data->self->host_core_api, data->response_handle, return_value); @@ -959,10 +1010,13 @@ static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, g_autofree int64_t* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( data->self->host_core_api, data->response_handle, return_value); @@ -984,10 +1038,13 @@ static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, g_autofree double* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( data->self->host_core_api, data->response_handle, return_value); @@ -1009,10 +1066,13 @@ static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( data->self->host_core_api, data->response_handle, return_value); @@ -1035,10 +1095,13 @@ static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, g_autofree uint8_t* return_value = nullptr; size_t return_value_length; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &return_value_length, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &return_value_length, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( data->self->host_core_api, data->response_handle, return_value, @@ -1062,10 +1125,13 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( data->self->host_core_api, data->response_handle, return_value); @@ -1087,10 +1153,13 @@ static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( data->self->host_core_api, data->response_handle, return_value); @@ -1112,10 +1181,13 @@ static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, g_autofree CoreTestsPigeonTestAnEnum* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error); + if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( data->self->host_core_api, data->response_handle, return_value); @@ -1138,10 +1210,13 @@ static void small_api_echo_string_cb(GObject* object, GAsyncResult* result, g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - // FIXME gboolean r = - core_tests_pigeon_test_flutter_small_api_echo_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &return_value, - &error); + if (!core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( data->self->host_core_api, data->response_handle, return_value); From fbdb463cfe0e62f846cce1bf2cc9bd43fe300851 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 19 Apr 2024 16:06:49 +1200 Subject: [PATCH 060/127] Fix usage of fl_value_ref --- packages/pigeon/lib/gobject_generator.dart | 4 +- .../linux/pigeon/core_tests.gen.cc | 42 +++++++++---------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 77b3e73ce07b..581ecb67f101 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1469,8 +1469,10 @@ String _getDefaultValue(String module, TypeDeclaration type, // [lengthVariableName] must be provided for the typed numeric *List types. String _referenceValue(TypeDeclaration type, String variableName, {String? lengthVariableName}) { - if (type.isClass || _isFlValueWrappedType(type)) { + if (type.isClass) { return 'g_object_ref($variableName)'; + } else if (_isFlValueWrappedType(type)) { + return 'fl_value_ref($variableName)'; } else if (type.baseName == 'String') { return 'g_strdup($variableName)'; } else if (type.baseName == 'Uint8List') { diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 07821914a35f..75857adfade8 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -76,11 +76,11 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( self->a_float_array = static_cast( g_memdup2(a_float_array, sizeof(double) * a_float_array_length)); self->a_float_array_length = a_float_array_length; - self->a_list = g_object_ref(a_list); - self->a_map = g_object_ref(a_map); + self->a_list = fl_value_ref(a_list); + self->a_map = fl_value_ref(a_map); self->an_enum = an_enum; self->a_string = g_strdup(a_string); - self->an_object = g_object_ref(an_object); + self->an_object = fl_value_ref(an_object); return self; } @@ -346,12 +346,12 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_float_array = static_cast(g_memdup2( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; - self->a_nullable_list = g_object_ref(a_nullable_list); - self->a_nullable_map = g_object_ref(a_nullable_map); - self->nullable_nested_list = g_object_ref(nullable_nested_list); + self->a_nullable_list = fl_value_ref(a_nullable_list); + self->a_nullable_map = fl_value_ref(a_nullable_map); + self->nullable_nested_list = fl_value_ref(nullable_nested_list); self->nullable_map_with_annotations = - g_object_ref(nullable_map_with_annotations); - self->nullable_map_with_object = g_object_ref(nullable_map_with_object); + fl_value_ref(nullable_map_with_annotations); + self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); if (a_nullable_enum != nullptr) { self->a_nullable_enum = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); @@ -360,7 +360,7 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_enum = nullptr; } self->a_nullable_string = g_strdup(a_nullable_string); - self->a_nullable_object = g_object_ref(a_nullable_object); + self->a_nullable_object = fl_value_ref(a_nullable_object); self->all_nullable_types = g_object_ref(all_nullable_types); return self; } @@ -782,12 +782,12 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->a_nullable_float_array = static_cast(g_memdup2( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; - self->a_nullable_list = g_object_ref(a_nullable_list); - self->a_nullable_map = g_object_ref(a_nullable_map); - self->nullable_nested_list = g_object_ref(nullable_nested_list); + self->a_nullable_list = fl_value_ref(a_nullable_list); + self->a_nullable_map = fl_value_ref(a_nullable_map); + self->nullable_nested_list = fl_value_ref(nullable_nested_list); self->nullable_map_with_annotations = - g_object_ref(nullable_map_with_annotations); - self->nullable_map_with_object = g_object_ref(nullable_map_with_object); + fl_value_ref(nullable_map_with_annotations); + self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); if (a_nullable_enum != nullptr) { self->a_nullable_enum = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); @@ -796,7 +796,7 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->a_nullable_enum = nullptr; } self->a_nullable_string = g_strdup(a_nullable_string); - self->a_nullable_object = g_object_ref(a_nullable_object); + self->a_nullable_object = fl_value_ref(a_nullable_object); return self; } @@ -1255,7 +1255,7 @@ CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( FlValue* test_list) { CoreTestsPigeonTestTestMessage* self = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( g_object_new(core_tests_pigeon_test_test_message_get_type(), nullptr)); - self->test_list = g_object_ref(test_list); + self->test_list = fl_value_ref(test_list); return self; } @@ -12586,7 +12586,7 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( return FALSE; } - *return_value = g_object_ref(r); + *return_value = fl_value_ref(r); return TRUE; } @@ -12977,7 +12977,7 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( return FALSE; } - *return_value = g_object_ref(r); + *return_value = fl_value_ref(r); return TRUE; } @@ -13006,7 +13006,7 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( return FALSE; } - *return_value = g_object_ref(r); + *return_value = fl_value_ref(r); return TRUE; } @@ -13239,7 +13239,7 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( return FALSE; } - *return_value = g_object_ref(r); + *return_value = fl_value_ref(r); return TRUE; } @@ -13270,7 +13270,7 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( return FALSE; } - *return_value = g_object_ref(r); + *return_value = fl_value_ref(r); return TRUE; } From 607cdad39d4935c40fe21e45a489b7860864812d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 19 Apr 2024 16:25:13 +1200 Subject: [PATCH 061/127] Another fl_value_ref case --- packages/pigeon/example/app/linux/messages.g.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 02a8ffec751a..852980e293be 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -44,7 +44,7 @@ PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( self->name = g_strdup(name); self->description = g_strdup(description); self->code = code; - self->data = g_object_ref(data); + self->data = fl_value_ref(data); return self; } From 8a5efbc062f1c6375457f1722284f2782f827ee6 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 18:25:44 +0000 Subject: [PATCH 062/127] Disable each integration test individually as a starting point for bringup --- .../lib/integration_tests.dart | 285 +++++++++--------- 1 file changed, 146 insertions(+), 139 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 251d4a3528ce..5d4dfcceeb0d 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io'; + import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -13,6 +15,11 @@ const int _biggerThanBigInt = 3000000000; const int _regularInt = 42; const double _doublePi = 3.14159; +/// Tests that haven't yet been made to work on Linux. +// TODO(stuartmorgan): Remove this before landing; this is only for the WIP +// development. +final bool _linuxBringup = Platform.isLinux; + /// Possible host languages that test can target. enum TargetGenerator { /// The Windows C++ generator. @@ -297,7 +304,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.noop(), completes); - }); + }, skip: _linuxBringup); testWidgets('all datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -305,7 +312,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllTypes echoObject = await api.echoAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }); + }, skip: _linuxBringup); testWidgets('all nullable datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -315,7 +322,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(recursiveAllNullableTypes); compareAllNullableTypes(echoObject, recursiveAllNullableTypes); - }); + }, skip: _linuxBringup); testWidgets('all null datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -326,7 +333,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllNullableTypes? echoNullFilledClass = await api.echoAllNullableTypes(allTypesNull); compareAllNullableTypes(allTypesNull, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets('Classes with list of null serialize and deserialize correctly', (WidgetTester _) async { @@ -339,7 +346,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(nullableListTypes); compareAllNullableTypes(nullableListTypes, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets('Classes with map of null serialize and deserialize correctly', (WidgetTester _) async { @@ -352,7 +359,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(nullableListTypes); compareAllNullableTypes(nullableListTypes, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets( 'all nullable datatypes without recursion serialize and deserialize correctly', @@ -365,7 +372,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( echoObject, genericAllNullableTypesWithoutRecursion); - }); + }, skip: _linuxBringup); testWidgets( 'all null datatypes without recursion serialize and deserialize correctly', @@ -379,7 +386,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypesWithoutRecursion(allTypesNull); compareAllNullableTypesWithoutRecursion( allTypesNull, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets( 'Classes without recursion with list of null serialize and deserialize correctly', @@ -395,7 +402,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( nullableListTypes, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets( 'Classes without recursion with map of null serialize and deserialize correctly', @@ -413,7 +420,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( nullableListTypes, echoNullFilledClass); - }); + }, skip: _linuxBringup); testWidgets('errors are returned correctly', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -421,7 +428,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwError(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets('errors are returned from void methods correctly', (WidgetTester _) async { @@ -430,7 +437,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwErrorFromVoid(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets('flutter errors are returned correctly', (WidgetTester _) async { @@ -443,7 +450,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { e.code == 'code' && e.message == 'message' && e.details == 'details')); - }); + }, skip: _linuxBringup); testWidgets('nested objects can be sent correctly', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -457,7 +464,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedString = await api.extractNestedNullableString(sentObject); expect(receivedString, sentObject.allNullableTypes.aNullableString); - }); + }, skip: _linuxBringup); testWidgets('nested objects can be received correctly', (WidgetTester _) async { @@ -467,7 +474,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedObject = await api.createNestedNullableString(sentString); expect(receivedObject.allNullableTypes.aNullableString, sentString); - }); + }, skip: _linuxBringup); testWidgets('nested classes can serialize and deserialize correctly', (WidgetTester _) async { @@ -482,7 +489,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedClassWrapper = await api.echoClassWrapper(sentWrapper); compareAllClassesWrapper(sentWrapper, receivedClassWrapper); - }); + }, skip: _linuxBringup); testWidgets('nested null classes can serialize and deserialize correctly', (WidgetTester _) async { @@ -496,7 +503,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedClassWrapper = await api.echoClassWrapper(sentWrapper); compareAllClassesWrapper(sentWrapper, receivedClassWrapper); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple types serialize and deserialize correctly', @@ -511,7 +518,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoObject.aNullableInt, aNullableInt); expect(echoObject.aNullableBool, aNullableBool); expect(echoObject.aNullableString, aNullableString); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly', @@ -523,7 +530,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoNullFilledClass.aNullableInt, null); expect(echoNullFilledClass.aNullableBool, null); expect(echoNullFilledClass.aNullableString, null); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', @@ -539,7 +546,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoObject.aNullableInt, aNullableInt); expect(echoObject.aNullableBool, aNullableBool); expect(echoObject.aNullableString, aNullableString); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', @@ -551,7 +558,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoNullFilledClass.aNullableInt, null); expect(echoNullFilledClass.aNullableBool, null); expect(echoNullFilledClass.aNullableString, null); - }); + }, skip: _linuxBringup); testWidgets('Int serialize and deserialize correctly', (WidgetTester _) async { @@ -559,7 +566,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Int64 serialize and deserialize correctly', (WidgetTester _) async { @@ -568,7 +575,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int receivedInt = await api.echoInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -577,7 +584,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double receivedDouble = await api.echoDouble(sentDouble); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -587,7 +594,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool receivedBool = await api.echoBool(sentBool); expect(receivedBool, sentBool); } - }); + }, skip: _linuxBringup); testWidgets('strings serialize and deserialize correctly', (WidgetTester _) async { @@ -595,7 +602,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = 'default'; final String receivedString = await api.echoString(sentString); expect(receivedString, sentString); - }); + }, skip: _linuxBringup); testWidgets('Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -616,7 +623,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List receivedUint8List = await api.echoUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }); + }, skip: _linuxBringup); testWidgets('generic Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -629,7 +636,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object receivedInt = await api.echoObject(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -638,7 +645,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!']; final List echoObject = await api.echoList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -651,7 +658,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { }; final Map echoObject = await api.echoMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -660,7 +667,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.two; final AnEnum receivedEnum = await api.echoEnum(sentEnum); expect(receivedEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -669,7 +676,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum receivedEnum = await api.echoEnum(sentEnum); expect(receivedEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('required named parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -677,7 +684,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoRequiredInt(anInt: sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('optional default parameter no arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -686,7 +693,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 3.14; final double receivedDouble = await api.echoOptionalDefaultDouble(); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('optional default parameter with arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -695,7 +702,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double receivedDouble = await api.echoOptionalDefaultDouble(sentDouble); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('named default parameter no arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -703,7 +710,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = 'default'; final String receivedString = await api.echoNamedDefaultString(); expect(receivedString, sentString); - }); + }, skip: _linuxBringup); testWidgets('named default parameter with arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -712,7 +719,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String receivedString = await api.echoNamedDefaultString(aString: sentString); expect(receivedString, sentString); - }); + }, skip: _linuxBringup); testWidgets('Nullable Int serialize and deserialize correctly', (WidgetTester _) async { @@ -721,7 +728,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoNullableInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Nullable Int64 serialize and deserialize correctly', (WidgetTester _) async { @@ -730,7 +737,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int? receivedInt = await api.echoNullableInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Null Ints serialize and deserialize correctly', (WidgetTester _) async { @@ -738,7 +745,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? receivedNullInt = await api.echoNullableInt(null); expect(receivedNullInt, null); - }); + }, skip: _linuxBringup); testWidgets('Nullable Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -747,7 +754,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double? receivedDouble = await api.echoNullableDouble(sentDouble); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('Null Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -755,7 +762,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedNullDouble = await api.echoNullableDouble(null); expect(receivedNullDouble, null); - }); + }, skip: _linuxBringup); testWidgets('Nullable booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -765,7 +772,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoNullableBool(sentBool); expect(receivedBool, sentBool); } - }); + }, skip: _linuxBringup); testWidgets('Null booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -774,7 +781,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const bool? sentBool = null; final bool? receivedBool = await api.echoNullableBool(sentBool); expect(receivedBool, sentBool); - }); + }, skip: _linuxBringup); testWidgets('Nullable strings serialize and deserialize correctly', (WidgetTester _) async { @@ -782,7 +789,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = "I'm a computer"; final String? receivedString = await api.echoNullableString(sentString); expect(receivedString, sentString); - }); + }, skip: _linuxBringup); testWidgets('Null strings serialize and deserialize correctly', (WidgetTester _) async { @@ -790,7 +797,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedNullString = await api.echoNullableString(null); expect(receivedNullString, null); - }); + }, skip: _linuxBringup); testWidgets('Nullable Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -811,7 +818,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoNullableUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }); + }, skip: _linuxBringup); testWidgets('Null Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -820,7 +827,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedNullUint8List = await api.echoNullableUint8List(null); expect(receivedNullUint8List, null); - }); + }, skip: _linuxBringup); testWidgets('generic nullable Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -833,7 +840,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object? receivedInt = await api.echoNullableObject(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Null generic Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -841,7 +848,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Object? receivedNullObject = await api.echoNullableObject(null); expect(receivedNullObject, null); - }); + }, skip: _linuxBringup); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -850,7 +857,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!', null]; final List? echoObject = await api.echoNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -865,7 +872,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -874,7 +881,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('multi word nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -883,7 +890,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -891,7 +898,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoNullableList(null); expect(listEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -899,7 +906,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoNullableMap(null); expect(mapEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -908,7 +915,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('optional nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -916,14 +923,14 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoOptionalNullableInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Null optional nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final int? receivedNullInt = await api.echoOptionalNullableInt(); expect(receivedNullInt, null); - }); + }, skip: _linuxBringup); testWidgets('named nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -931,14 +938,14 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedString = await api.echoNamedNullableString(aNullableString: sentString); expect(receivedString, sentString); - }); + }, skip: _linuxBringup); testWidgets('Null named nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final String? receivedNullString = await api.echoNamedNullableString(); expect(receivedNullString, null); - }); + }, skip: _linuxBringup); }); group('Host async API tests', () { @@ -946,7 +953,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.noopAsync(), completes); - }); + }, skip: _linuxBringup); testWidgets('async errors are returned from non void methods correctly', (WidgetTester _) async { @@ -955,7 +962,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwAsyncError(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets('async errors are returned from void methods correctly', (WidgetTester _) async { @@ -964,7 +971,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwAsyncErrorFromVoid(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets( 'async flutter errors are returned from non void methods correctly', @@ -978,7 +985,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { e.code == 'code' && e.message == 'message' && e.details == 'details')); - }); + }, skip: _linuxBringup); testWidgets('all datatypes async serialize and deserialize correctly', (WidgetTester _) async { @@ -987,7 +994,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllTypes echoObject = await api.echoAsyncAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }); + }, skip: _linuxBringup); testWidgets( 'all nullable async datatypes serialize and deserialize correctly', @@ -998,7 +1005,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { .echoAsyncNullableAllNullableTypes(recursiveAllNullableTypes); compareAllNullableTypes(echoObject, recursiveAllNullableTypes); - }); + }, skip: _linuxBringup); testWidgets('all null datatypes async serialize and deserialize correctly', (WidgetTester _) async { @@ -1009,7 +1016,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllNullableTypes? echoNullFilledClass = await api.echoAsyncNullableAllNullableTypes(allTypesNull); compareAllNullableTypes(echoNullFilledClass, allTypesNull); - }); + }, skip: _linuxBringup); testWidgets( 'all nullable async datatypes without recursion serialize and deserialize correctly', @@ -1022,7 +1029,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( echoObject, genericAllNullableTypesWithoutRecursion); - }); + }, skip: _linuxBringup); testWidgets( 'all null datatypes without recursion async serialize and deserialize correctly', @@ -1036,7 +1043,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { .echoAsyncNullableAllNullableTypesWithoutRecursion(allTypesNull); compareAllNullableTypesWithoutRecursion( echoNullFilledClass, allTypesNull); - }); + }, skip: _linuxBringup); testWidgets('Int async serialize and deserialize correctly', (WidgetTester _) async { @@ -1045,7 +1052,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoAsyncInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Int64 async serialize and deserialize correctly', (WidgetTester _) async { @@ -1054,7 +1061,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int receivedInt = await api.echoAsyncInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1063,7 +1070,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double receivedDouble = await api.echoAsyncDouble(sentDouble); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1073,7 +1080,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool receivedBool = await api.echoAsyncBool(sentBool); expect(receivedBool, sentBool); } - }); + }, skip: _linuxBringup); testWidgets('strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1083,7 +1090,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoObject = await api.echoAsyncString(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1104,7 +1111,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List receivedUint8List = await api.echoAsyncUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }); + }, skip: _linuxBringup); testWidgets('generic Objects async serialize and deserialize correctly', (WidgetTester _) async { @@ -1117,7 +1124,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object receivedInt = await api.echoAsyncObject(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1126,7 +1133,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!']; final List echoObject = await api.echoAsyncList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1140,7 +1147,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map echoObject = await api.echoAsyncMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1149,7 +1156,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum echoEnum = await api.echoAsyncEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1158,7 +1165,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum echoEnum = await api.echoAsyncEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('nullable Int async serialize and deserialize correctly', (WidgetTester _) async { @@ -1167,7 +1174,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoAsyncNullableInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('nullable Int64 async serialize and deserialize correctly', (WidgetTester _) async { @@ -1176,7 +1183,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int? receivedInt = await api.echoAsyncNullableInt(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('nullable Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1186,7 +1193,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedDouble = await api.echoAsyncNullableDouble(sentDouble); expect(receivedDouble, sentDouble); - }); + }, skip: _linuxBringup); testWidgets('nullable booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1196,7 +1203,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoAsyncNullableBool(sentBool); expect(receivedBool, sentBool); } - }); + }, skip: _linuxBringup); testWidgets('nullable strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1206,7 +1213,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.echoAsyncNullableString(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('nullable Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1227,7 +1234,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoAsyncNullableUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }); + }, skip: _linuxBringup); testWidgets( 'nullable generic Objects async serialize and deserialize correctly', @@ -1242,7 +1249,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object? receivedInt = await api.echoAsyncNullableObject(sentInt); expect(receivedInt, sentInt); - }); + }, skip: _linuxBringup); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1252,7 +1259,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoAsyncNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1266,7 +1273,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoAsyncNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1275,7 +1282,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1284,7 +1291,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('null Ints async serialize and deserialize correctly', (WidgetTester _) async { @@ -1292,7 +1299,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? receivedInt = await api.echoAsyncNullableInt(null); expect(receivedInt, null); - }); + }, skip: _linuxBringup); testWidgets('null Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1300,7 +1307,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedDouble = await api.echoAsyncNullableDouble(null); expect(receivedDouble, null); - }); + }, skip: _linuxBringup); testWidgets('null booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1308,7 +1315,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoAsyncNullableBool(null); expect(receivedBool, null); - }); + }, skip: _linuxBringup); testWidgets('null strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1316,7 +1323,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.echoAsyncNullableString(null); expect(echoObject, null); - }); + }, skip: _linuxBringup); testWidgets('null Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1325,7 +1332,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoAsyncNullableUint8List(null); expect(receivedUint8List, null); - }); + }, skip: _linuxBringup); testWidgets( 'null generic Objects async serialize and deserialize correctly', @@ -1333,7 +1340,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final Object? receivedString = await api.echoAsyncNullableObject(null); expect(receivedString, null); - }); + }, skip: _linuxBringup); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1341,7 +1348,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoAsyncNullableList(null); expect(listEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1350,7 +1357,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoAsyncNullableMap(null); expect(mapEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1359,7 +1366,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(null); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); }); group('Host API with suffix', () { @@ -1374,7 +1381,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoStringTwo = await apiWithSuffixTwo.echo(sentString); expect(sentString, echoStringOne); expect(sentString, echoStringTwo); - }); + }, skip: _linuxBringup); testWidgets('multiple instances will have different method channel names', (_) async { @@ -1395,7 +1402,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { } on PlatformException catch (e) { expect(e.message, contains('suffixWithoutHost')); } - }); + }, skip: _linuxBringup); }); // These tests rely on the async Dart->host calls to work correctly, since @@ -1411,7 +1418,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.callFlutterNoop(), completes); - }); + }, skip: _linuxBringup); testWidgets('errors are returned from non void methods correctly', (WidgetTester _) async { @@ -1420,7 +1427,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.callFlutterThrowError(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets('errors are returned from void methods correctly', (WidgetTester _) async { @@ -1429,7 +1436,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.callFlutterThrowErrorFromVoid(); }, throwsA(isA())); - }); + }, skip: _linuxBringup); testWidgets('all datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -1439,7 +1446,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.callFlutterEchoAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple types serialize and deserialize correctly', @@ -1455,7 +1462,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, aNullableInt); expect(compositeObject.aNullableBool, aNullableBool); expect(compositeObject.aNullableString, aNullableString); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly', @@ -1467,7 +1474,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, null); expect(compositeObject.aNullableBool, null); expect(compositeObject.aNullableString, null); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', @@ -1483,7 +1490,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, aNullableInt); expect(compositeObject.aNullableBool, aNullableBool); expect(compositeObject.aNullableString, aNullableString); - }); + }, skip: _linuxBringup); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', @@ -1496,7 +1503,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, null); expect(compositeObject.aNullableBool, null); expect(compositeObject.aNullableString, null); - }); + }, skip: _linuxBringup); testWidgets('booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1506,7 +1513,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool echoObject = await api.callFlutterEchoBool(sentObject); expect(echoObject, sentObject); } - }); + }, skip: _linuxBringup); testWidgets('ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1515,7 +1522,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _regularInt; final int echoObject = await api.callFlutterEchoInt(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1524,7 +1531,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentObject = 2.0694; final double echoObject = await api.callFlutterEchoDouble(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1533,7 +1540,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentObject = 'Hello Dart!'; final String echoObject = await api.callFlutterEchoString(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1555,7 +1562,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List echoObject = await api.callFlutterEchoUint8List(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1565,7 +1572,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List echoObject = await api.callFlutterEchoList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1579,7 +1586,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map echoObject = await api.callFlutterEchoMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1588,7 +1595,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum echoEnum = await api.callFlutterEchoEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1597,7 +1604,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum echoEnum = await api.callFlutterEchoEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('nullable booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1608,7 +1615,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.callFlutterEchoNullableBool(sentObject); expect(echoObject, sentObject); } - }); + }, skip: _linuxBringup); testWidgets('null booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1618,7 +1625,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? echoObject = await api.callFlutterEchoNullableBool(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('nullable ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1627,7 +1634,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _regularInt; final int? echoObject = await api.callFlutterEchoNullableInt(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('nullable big ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1636,7 +1643,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _biggerThanBigInt; final int? echoObject = await api.callFlutterEchoNullableInt(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('null ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1644,7 +1651,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? echoObject = await api.callFlutterEchoNullableInt(null); expect(echoObject, null); - }); + }, skip: _linuxBringup); testWidgets('nullable doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1654,7 +1661,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? echoObject = await api.callFlutterEchoNullableDouble(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('null doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1662,7 +1669,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? echoObject = await api.callFlutterEchoNullableDouble(null); expect(echoObject, null); - }); + }, skip: _linuxBringup); testWidgets('nullable strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1672,7 +1679,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.callFlutterEchoNullableString(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('null strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1680,7 +1687,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.callFlutterEchoNullableString(null); expect(echoObject, null); - }); + }, skip: _linuxBringup); testWidgets('nullable Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1701,7 +1708,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? echoObject = await api.callFlutterEchoNullableUint8List(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); testWidgets('null Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1710,7 +1717,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? echoObject = await api.callFlutterEchoNullableUint8List(null); expect(echoObject, null); - }); + }, skip: _linuxBringup); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1720,7 +1727,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.callFlutterEchoNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1729,7 +1736,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.callFlutterEchoNullableList(null); expect(listEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1743,7 +1750,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.callFlutterEchoNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }); + }, skip: _linuxBringup); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1752,7 +1759,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.callFlutterEchoNullableMap(null); expect(mapEquals(echoObject, null), true); - }); + }, skip: _linuxBringup); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1761,7 +1768,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('multi word nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1770,7 +1777,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1779,7 +1786,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }); + }, skip: _linuxBringup); }); group('Flutter API with suffix', () { @@ -1801,7 +1808,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoObject = await api.callFlutterSmallApiEchoString(sentObject); expect(echoObject, sentObject); - }); + }, skip: _linuxBringup); }); } From c73b86be7db06c3607127a8a56c9e3fae73a8e8f Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 18:28:46 +0000 Subject: [PATCH 063/127] Enable one simple test just to see that it works --- .../shared_test_plugin_code/lib/integration_tests.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 5d4dfcceeb0d..7cd66737a891 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -304,7 +304,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.noop(), completes); - }, skip: _linuxBringup); + }); testWidgets('all datatypes serialize and deserialize correctly', (WidgetTester _) async { From 10f4ea5935e889174f2c7a6bbf440239501ca7c5 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 18:45:12 +0000 Subject: [PATCH 064/127] Enable some error-throwing tests, which fail but don't hang --- .../shared_test_plugin_code/lib/integration_tests.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 7cd66737a891..1d0960e011c8 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -428,7 +428,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwError(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets('errors are returned from void methods correctly', (WidgetTester _) async { @@ -437,7 +437,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwErrorFromVoid(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets('flutter errors are returned correctly', (WidgetTester _) async { @@ -450,7 +450,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { e.code == 'code' && e.message == 'message' && e.details == 'details')); - }, skip: _linuxBringup); + }); testWidgets('nested objects can be sent correctly', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); From 91064cc2138c7c26f077d7fbc0cc963919275a05 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 18:53:35 +0000 Subject: [PATCH 065/127] Enable single type sync tests --- .../lib/integration_tests.dart | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 1d0960e011c8..d50889de6c74 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -566,7 +566,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Int64 serialize and deserialize correctly', (WidgetTester _) async { @@ -575,7 +575,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int receivedInt = await api.echoInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -584,7 +584,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double receivedDouble = await api.echoDouble(sentDouble); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -594,7 +594,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool receivedBool = await api.echoBool(sentBool); expect(receivedBool, sentBool); } - }, skip: _linuxBringup); + }); testWidgets('strings serialize and deserialize correctly', (WidgetTester _) async { @@ -602,7 +602,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = 'default'; final String receivedString = await api.echoString(sentString); expect(receivedString, sentString); - }, skip: _linuxBringup); + }); testWidgets('Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -623,7 +623,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List receivedUint8List = await api.echoUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }, skip: _linuxBringup); + }); testWidgets('generic Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -636,7 +636,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object receivedInt = await api.echoObject(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -645,7 +645,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!']; final List echoObject = await api.echoList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -658,7 +658,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { }; final Map echoObject = await api.echoMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -667,7 +667,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.two; final AnEnum receivedEnum = await api.echoEnum(sentEnum); expect(receivedEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -676,7 +676,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum receivedEnum = await api.echoEnum(sentEnum); expect(receivedEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('required named parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -684,7 +684,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoRequiredInt(anInt: sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('optional default parameter no arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -693,7 +693,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 3.14; final double receivedDouble = await api.echoOptionalDefaultDouble(); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('optional default parameter with arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -702,7 +702,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double receivedDouble = await api.echoOptionalDefaultDouble(sentDouble); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('named default parameter no arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -710,7 +710,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = 'default'; final String receivedString = await api.echoNamedDefaultString(); expect(receivedString, sentString); - }, skip: _linuxBringup); + }); testWidgets('named default parameter with arg', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -719,7 +719,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String receivedString = await api.echoNamedDefaultString(aString: sentString); expect(receivedString, sentString); - }, skip: _linuxBringup); + }); testWidgets('Nullable Int serialize and deserialize correctly', (WidgetTester _) async { @@ -728,7 +728,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoNullableInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Nullable Int64 serialize and deserialize correctly', (WidgetTester _) async { @@ -737,7 +737,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int? receivedInt = await api.echoNullableInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Null Ints serialize and deserialize correctly', (WidgetTester _) async { @@ -745,7 +745,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? receivedNullInt = await api.echoNullableInt(null); expect(receivedNullInt, null); - }, skip: _linuxBringup); + }); testWidgets('Nullable Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -754,7 +754,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double? receivedDouble = await api.echoNullableDouble(sentDouble); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('Null Doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -762,7 +762,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedNullDouble = await api.echoNullableDouble(null); expect(receivedNullDouble, null); - }, skip: _linuxBringup); + }); testWidgets('Nullable booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -772,7 +772,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoNullableBool(sentBool); expect(receivedBool, sentBool); } - }, skip: _linuxBringup); + }); testWidgets('Null booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -781,7 +781,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const bool? sentBool = null; final bool? receivedBool = await api.echoNullableBool(sentBool); expect(receivedBool, sentBool); - }, skip: _linuxBringup); + }); testWidgets('Nullable strings serialize and deserialize correctly', (WidgetTester _) async { @@ -789,7 +789,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentString = "I'm a computer"; final String? receivedString = await api.echoNullableString(sentString); expect(receivedString, sentString); - }, skip: _linuxBringup); + }); testWidgets('Null strings serialize and deserialize correctly', (WidgetTester _) async { @@ -797,7 +797,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedNullString = await api.echoNullableString(null); expect(receivedNullString, null); - }, skip: _linuxBringup); + }); testWidgets('Nullable Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -818,7 +818,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoNullableUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }, skip: _linuxBringup); + }); testWidgets('Null Uint8List serialize and deserialize correctly', (WidgetTester _) async { @@ -827,7 +827,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedNullUint8List = await api.echoNullableUint8List(null); expect(receivedNullUint8List, null); - }, skip: _linuxBringup); + }); testWidgets('generic nullable Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -840,7 +840,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object? receivedInt = await api.echoNullableObject(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Null generic Objects serialize and deserialize correctly', (WidgetTester _) async { @@ -848,7 +848,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Object? receivedNullObject = await api.echoNullableObject(null); expect(receivedNullObject, null); - }, skip: _linuxBringup); + }); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -857,7 +857,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!', null]; final List? echoObject = await api.echoNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -872,7 +872,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -881,7 +881,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('multi word nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -890,7 +890,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -898,7 +898,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoNullableList(null); expect(listEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -906,7 +906,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoNullableMap(null); expect(mapEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -915,7 +915,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.echoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('optional nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -923,14 +923,14 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoOptionalNullableInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Null optional nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final int? receivedNullInt = await api.echoOptionalNullableInt(); expect(receivedNullInt, null); - }, skip: _linuxBringup); + }); testWidgets('named nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -938,14 +938,14 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedString = await api.echoNamedNullableString(aNullableString: sentString); expect(receivedString, sentString); - }, skip: _linuxBringup); + }); testWidgets('Null named nullable parameter', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final String? receivedNullString = await api.echoNamedNullableString(); expect(receivedNullString, null); - }, skip: _linuxBringup); + }); }); group('Host async API tests', () { From 67f7bc58878b046789a3d85f733d0e415be132d7 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 18:59:00 +0000 Subject: [PATCH 066/127] Enable single type async tests --- .../lib/integration_tests.dart | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index d50889de6c74..71c62ca0d329 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -953,7 +953,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.noopAsync(), completes); - }, skip: _linuxBringup); + }); testWidgets('async errors are returned from non void methods correctly', (WidgetTester _) async { @@ -962,7 +962,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwAsyncError(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets('async errors are returned from void methods correctly', (WidgetTester _) async { @@ -971,7 +971,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.throwAsyncErrorFromVoid(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets( 'async flutter errors are returned from non void methods correctly', @@ -985,7 +985,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { e.code == 'code' && e.message == 'message' && e.details == 'details')); - }, skip: _linuxBringup); + }); testWidgets('all datatypes async serialize and deserialize correctly', (WidgetTester _) async { @@ -1052,7 +1052,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int receivedInt = await api.echoAsyncInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Int64 async serialize and deserialize correctly', (WidgetTester _) async { @@ -1061,7 +1061,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int receivedInt = await api.echoAsyncInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1070,7 +1070,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentDouble = 2.0694; final double receivedDouble = await api.echoAsyncDouble(sentDouble); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1080,7 +1080,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool receivedBool = await api.echoAsyncBool(sentBool); expect(receivedBool, sentBool); } - }, skip: _linuxBringup); + }); testWidgets('strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1090,7 +1090,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoObject = await api.echoAsyncString(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1111,7 +1111,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List receivedUint8List = await api.echoAsyncUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }, skip: _linuxBringup); + }); testWidgets('generic Objects async serialize and deserialize correctly', (WidgetTester _) async { @@ -1124,7 +1124,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object receivedInt = await api.echoAsyncObject(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1133,7 +1133,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const List sentObject = [7, 'Hello Dart!']; final List echoObject = await api.echoAsyncList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1147,7 +1147,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map echoObject = await api.echoAsyncMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1156,7 +1156,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum echoEnum = await api.echoAsyncEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1165,7 +1165,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum echoEnum = await api.echoAsyncEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('nullable Int async serialize and deserialize correctly', (WidgetTester _) async { @@ -1174,7 +1174,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _regularInt; final int? receivedInt = await api.echoAsyncNullableInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('nullable Int64 async serialize and deserialize correctly', (WidgetTester _) async { @@ -1183,7 +1183,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentInt = _biggerThanBigInt; final int? receivedInt = await api.echoAsyncNullableInt(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('nullable Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1193,7 +1193,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedDouble = await api.echoAsyncNullableDouble(sentDouble); expect(receivedDouble, sentDouble); - }, skip: _linuxBringup); + }); testWidgets('nullable booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1203,7 +1203,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoAsyncNullableBool(sentBool); expect(receivedBool, sentBool); } - }, skip: _linuxBringup); + }); testWidgets('nullable strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1213,7 +1213,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.echoAsyncNullableString(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('nullable Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1234,7 +1234,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoAsyncNullableUint8List(sentUint8List); expect(receivedUint8List, sentUint8List); - }, skip: _linuxBringup); + }); testWidgets( 'nullable generic Objects async serialize and deserialize correctly', @@ -1249,7 +1249,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const Object sentInt = _regularInt; final Object? receivedInt = await api.echoAsyncNullableObject(sentInt); expect(receivedInt, sentInt); - }, skip: _linuxBringup); + }); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1259,7 +1259,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoAsyncNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1273,7 +1273,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoAsyncNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1282,7 +1282,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1291,7 +1291,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('null Ints async serialize and deserialize correctly', (WidgetTester _) async { @@ -1299,7 +1299,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? receivedInt = await api.echoAsyncNullableInt(null); expect(receivedInt, null); - }, skip: _linuxBringup); + }); testWidgets('null Doubles async serialize and deserialize correctly', (WidgetTester _) async { @@ -1307,7 +1307,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? receivedDouble = await api.echoAsyncNullableDouble(null); expect(receivedDouble, null); - }, skip: _linuxBringup); + }); testWidgets('null booleans async serialize and deserialize correctly', (WidgetTester _) async { @@ -1315,7 +1315,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? receivedBool = await api.echoAsyncNullableBool(null); expect(receivedBool, null); - }, skip: _linuxBringup); + }); testWidgets('null strings async serialize and deserialize correctly', (WidgetTester _) async { @@ -1323,7 +1323,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.echoAsyncNullableString(null); expect(echoObject, null); - }, skip: _linuxBringup); + }); testWidgets('null Uint8List async serialize and deserialize correctly', (WidgetTester _) async { @@ -1332,7 +1332,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? receivedUint8List = await api.echoAsyncNullableUint8List(null); expect(receivedUint8List, null); - }, skip: _linuxBringup); + }); testWidgets( 'null generic Objects async serialize and deserialize correctly', @@ -1340,7 +1340,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); final Object? receivedString = await api.echoAsyncNullableObject(null); expect(receivedString, null); - }, skip: _linuxBringup); + }); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1348,7 +1348,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.echoAsyncNullableList(null); expect(listEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1357,7 +1357,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.echoAsyncNullableMap(null); expect(mapEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1366,7 +1366,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.echoAsyncNullableEnum(null); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); }); group('Host API with suffix', () { From b937812a4a3e43bae1ca0956528c3554fccc29b6 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 24 May 2024 19:14:48 +0000 Subject: [PATCH 067/127] Switch some suites to group disable --- .../lib/integration_tests.dart | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 71c62ca0d329..3fbc00283ef5 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -1381,7 +1381,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoStringTwo = await apiWithSuffixTwo.echo(sentString); expect(sentString, echoStringOne); expect(sentString, echoStringTwo); - }, skip: _linuxBringup); + }); testWidgets('multiple instances will have different method channel names', (_) async { @@ -1402,8 +1402,8 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { } on PlatformException catch (e) { expect(e.message, contains('suffixWithoutHost')); } - }, skip: _linuxBringup); - }); + }); + }, skip: _linuxBringup); // These tests rely on the async Dart->host calls to work correctly, since // the host->Dart call is wrapped in a driving Dart->host call, so any test @@ -1418,7 +1418,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); expect(api.callFlutterNoop(), completes); - }, skip: _linuxBringup); + }); testWidgets('errors are returned from non void methods correctly', (WidgetTester _) async { @@ -1427,7 +1427,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.callFlutterThrowError(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets('errors are returned from void methods correctly', (WidgetTester _) async { @@ -1436,7 +1436,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(() async { await api.callFlutterThrowErrorFromVoid(); }, throwsA(isA())); - }, skip: _linuxBringup); + }); testWidgets('all datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -1446,7 +1446,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.callFlutterEchoAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple types serialize and deserialize correctly', @@ -1462,7 +1462,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, aNullableInt); expect(compositeObject.aNullableBool, aNullableBool); expect(compositeObject.aNullableString, aNullableString); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly', @@ -1474,7 +1474,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, null); expect(compositeObject.aNullableBool, null); expect(compositeObject.aNullableString, null); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', @@ -1490,7 +1490,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, aNullableInt); expect(compositeObject.aNullableBool, aNullableBool); expect(compositeObject.aNullableString, aNullableString); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', @@ -1503,7 +1503,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(compositeObject.aNullableInt, null); expect(compositeObject.aNullableBool, null); expect(compositeObject.aNullableString, null); - }, skip: _linuxBringup); + }); testWidgets('booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1513,7 +1513,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool echoObject = await api.callFlutterEchoBool(sentObject); expect(echoObject, sentObject); } - }, skip: _linuxBringup); + }); testWidgets('ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1522,7 +1522,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _regularInt; final int echoObject = await api.callFlutterEchoInt(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1531,7 +1531,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const double sentObject = 2.0694; final double echoObject = await api.callFlutterEchoDouble(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1540,7 +1540,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const String sentObject = 'Hello Dart!'; final String echoObject = await api.callFlutterEchoString(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1562,7 +1562,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List echoObject = await api.callFlutterEchoUint8List(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1572,7 +1572,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List echoObject = await api.callFlutterEchoList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1586,7 +1586,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map echoObject = await api.callFlutterEchoMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1595,7 +1595,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum echoEnum = await api.callFlutterEchoEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1604,7 +1604,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fortyTwo; final AnEnum echoEnum = await api.callFlutterEchoEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('nullable booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1615,7 +1615,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.callFlutterEchoNullableBool(sentObject); expect(echoObject, sentObject); } - }, skip: _linuxBringup); + }); testWidgets('null booleans serialize and deserialize correctly', (WidgetTester _) async { @@ -1625,7 +1625,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final bool? echoObject = await api.callFlutterEchoNullableBool(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('nullable ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1634,7 +1634,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _regularInt; final int? echoObject = await api.callFlutterEchoNullableInt(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('nullable big ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1643,7 +1643,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const int sentObject = _biggerThanBigInt; final int? echoObject = await api.callFlutterEchoNullableInt(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('null ints serialize and deserialize correctly', (WidgetTester _) async { @@ -1651,7 +1651,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final int? echoObject = await api.callFlutterEchoNullableInt(null); expect(echoObject, null); - }, skip: _linuxBringup); + }); testWidgets('nullable doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1661,7 +1661,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? echoObject = await api.callFlutterEchoNullableDouble(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('null doubles serialize and deserialize correctly', (WidgetTester _) async { @@ -1669,7 +1669,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final double? echoObject = await api.callFlutterEchoNullableDouble(null); expect(echoObject, null); - }, skip: _linuxBringup); + }); testWidgets('nullable strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1679,7 +1679,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.callFlutterEchoNullableString(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('null strings serialize and deserialize correctly', (WidgetTester _) async { @@ -1687,7 +1687,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? echoObject = await api.callFlutterEchoNullableString(null); expect(echoObject, null); - }, skip: _linuxBringup); + }); testWidgets('nullable Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1708,7 +1708,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? echoObject = await api.callFlutterEchoNullableUint8List(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); + }); testWidgets('null Uint8Lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1717,7 +1717,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Uint8List? echoObject = await api.callFlutterEchoNullableUint8List(null); expect(echoObject, null); - }, skip: _linuxBringup); + }); testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1727,7 +1727,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.callFlutterEchoNullableList(sentObject); expect(listEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { @@ -1736,7 +1736,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final List? echoObject = await api.callFlutterEchoNullableList(null); expect(listEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1750,7 +1750,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.callFlutterEchoNullableMap(sentObject); expect(mapEquals(echoObject, sentObject), true); - }, skip: _linuxBringup); + }); testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { @@ -1759,7 +1759,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final Map? echoObject = await api.callFlutterEchoNullableMap(null); expect(mapEquals(echoObject, null), true); - }, skip: _linuxBringup); + }); testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1768,7 +1768,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.three; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('multi word nullable enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1777,7 +1777,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum sentEnum = AnEnum.fourHundredTwentyTwo; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); + }); testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { @@ -1786,8 +1786,8 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { const AnEnum? sentEnum = null; final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); - }, skip: _linuxBringup); - }); + }); + }, skip: _linuxBringup); group('Flutter API with suffix', () { setUp(() { @@ -1808,8 +1808,8 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String echoObject = await api.callFlutterSmallApiEchoString(sentObject); expect(echoObject, sentObject); - }, skip: _linuxBringup); - }); + }); + }, skip: _linuxBringup); } class _FlutterApiTestImplementation implements FlutterIntegrationCoreApi { From 0117910761638f70a321630cb4729ab58d1276b8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 7 Jun 2024 16:55:46 +1200 Subject: [PATCH 068/127] Update GObject code for new general codec API --- .../pigeon/example/app/linux/messages.g.cc | 91 +++-- packages/pigeon/lib/gobject_generator.dart | 336 +++++++++--------- 2 files changed, 227 insertions(+), 200 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 852980e293be..88f26a3debe6 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -106,51 +106,60 @@ pigeon_example_package_message_data_new_from_list(FlValue* values) { return pigeon_example_package_message_data_new(name, description, code, data); } -G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiCodec, - pigeon_example_package_example_host_api_codec, - PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_CODEC, - FlStandardMessageCodec) +G_DECLARE_FINAL_TYPE(PigeonMessageCodec, pigeon_message_codec, PIGEON, + MESSAGE_CODEC, FlStandardMessageCodec) -struct _PigeonExamplePackageExampleHostApiCodec { +struct _PigeonMessageCodec { FlStandardMessageCodec parent_instance; }; -G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiCodec, - pigeon_example_package_example_host_api_codec, +G_DEFINE_TYPE(PigeonMessageCodec, pigeon_message_codec, fl_standard_message_codec_get_type()) -static gboolean -pigeon_example_package_example_host_api_write_pigeon_example_package_message_data( +static gboolean pigeon_message_codec_write_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GByteArray* buffer, PigeonExamplePackageMessageData* value, GError** error) { - uint8_t type = 128; + uint8_t type = 129; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = pigeon_example_package_message_data_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean pigeon_example_package_example_host_api_write_value( +static gboolean pigeon_message_codec_write_pigeon_example_package_code( FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) { + uint8_t type = 130; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + return fl_standard_message_codec_write_value(codec, buffer, value, error); +} + +static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, + GByteArray* buffer, + FlValue* value, + GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { - case 128: - return pigeon_example_package_example_host_api_write_pigeon_example_package_message_data( + case 129: + return pigeon_message_codec_write_pigeon_example_package_message_data( codec, buffer, PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( fl_value_get_custom_value_object(value)), error); + case 130: + return pigeon_message_codec_write_pigeon_example_package_code( + codec, buffer, + reinterpret_cast( + const_cast(fl_value_get_custom_value(value))), + error); } } - return FL_STANDARD_MESSAGE_CODEC_CLASS( - pigeon_example_package_example_host_api_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) ->write_value(codec, buffer, value, error); } -static FlValue* -pigeon_example_package_example_host_api_read_pigeon_example_package_message_data( +static FlValue* pigeon_message_codec_read_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -167,39 +176,45 @@ pigeon_example_package_example_host_api_read_pigeon_example_package_message_data return nullptr; } - return fl_value_new_custom_object_take(128, G_OBJECT(value)); + return fl_value_new_custom_object_take(129, G_OBJECT(value)); } -static FlValue* pigeon_example_package_example_host_api_read_value_of_type( +static FlValue* pigeon_message_codec_read_pigeon_example_package_code( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + return fl_value_new_custom( + 130, fl_standard_message_codec_read_value(codec, buffer, offset, error), + (GDestroyNotify)fl_value_unref); +} + +static FlValue* pigeon_message_codec_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { - case 128: - return pigeon_example_package_example_host_api_read_pigeon_example_package_message_data( + case 129: + return pigeon_message_codec_read_pigeon_example_package_message_data( + codec, buffer, offset, error); + case 130: + return pigeon_message_codec_read_pigeon_example_package_code( codec, buffer, offset, error); default: - return FL_STANDARD_MESSAGE_CODEC_CLASS( - pigeon_example_package_example_host_api_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) ->read_value_of_type(codec, buffer, offset, type, error); } } -static void pigeon_example_package_example_host_api_codec_init( - PigeonExamplePackageExampleHostApiCodec* self) {} +static void pigeon_message_codec_init(PigeonMessageCodec* self) {} -static void pigeon_example_package_example_host_api_codec_class_init( - PigeonExamplePackageExampleHostApiCodecClass* klass) { +static void pigeon_message_codec_class_init(PigeonMessageCodecClass* klass) { FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - pigeon_example_package_example_host_api_write_value; + pigeon_message_codec_write_value; FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - pigeon_example_package_example_host_api_read_value_of_type; + pigeon_message_codec_read_value_of_type; } -static PigeonExamplePackageExampleHostApiCodec* -pigeon_example_package_example_host_api_codec_new() { - PigeonExamplePackageExampleHostApiCodec* self = - PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_CODEC(g_object_new( - pigeon_example_package_example_host_api_codec_get_type(), nullptr)); +static PigeonMessageCodec* pigeon_message_codec_new() { + PigeonMessageCodec* self = PIGEON_MESSAGE_CODEC( + g_object_new(pigeon_message_codec_get_type(), nullptr)); return self; } @@ -504,8 +519,7 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(PigeonExamplePackageExampleHostApiCodec) codec = - pigeon_example_package_example_host_api_codec_new(); + g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); self->get_host_language_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_example_package." @@ -596,7 +610,10 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); - g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); + g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); + g_autoptr(FlStandardMethodCodec) codec = + fl_standard_method_codec_new_with_message_codec( + FL_STANDARD_MESSAGE_CODEC(message_codec)); self->channel = fl_method_channel_new(messenger, "MessageFlutterApi", FL_METHOD_CODEC(codec)); return self; diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 581ecb67f101..c7ce72a18b7d 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -217,6 +217,14 @@ class GObjectHeaderGenerator extends StructuredGenerator { } } + @override + void writeGeneralCodec( + GObjectOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) {} + @override void writeFlutterApi( GObjectOptions generatorOptions, @@ -607,6 +615,165 @@ class GObjectSourceGenerator extends StructuredGenerator { }); } + @override + void writeGeneralCodec( + GObjectOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + final String module = _getModule(generatorOptions, dartPackageName); + final String codecModule = 'Pigeon'; + final String codecClassName = 'MessageCodec'; + + final Iterable customTypes = getEnumeratedTypes(root); + + indent.newln(); + _writeDeclareFinalType(indent, codecModule, codecClassName, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeObjectStruct(indent, codecModule, codecClassName, () {}, + parentClassName: 'FlStandardMessageCodec'); + + indent.newln(); + _writeDefineType(indent, codecModule, codecClassName, + parentType: 'fl_standard_message_codec_get_type()'); + + for (final EnumeratedType customType in customTypes) { + final String customTypeName = _getClassName(module, customType.name); + final String snakeCustomTypeName = + _snakeCaseFromCamelCase(customTypeName); + indent.newln(); + final String valueType = customType.type == CustomTypes.customClass + ? '$customTypeName*' + : 'FlValue*'; + indent.writeScoped( + 'static gboolean pigeon_message_codec_write_$snakeCustomTypeName(FlStandardMessageCodec* codec, GByteArray* buffer, $valueType value, GError** error) {', + '}', () { + indent.writeln('uint8_t type = ${customType.enumeration};'); + indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); + if (customType.type == CustomTypes.customClass) { + indent.writeln( + 'g_autoptr(FlValue) values = ${snakeCustomTypeName}_to_list(value);'); + indent.writeln( + 'return fl_standard_message_codec_write_value(codec, buffer, values, error);'); + } else if (customType.type == CustomTypes.customEnum) { + indent.writeln( + 'return fl_standard_message_codec_write_value(codec, buffer, value, error);'); + } + }); + } + + indent.newln(); + indent.writeScoped( + 'static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', + '}', () { + indent.writeScoped( + 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { + indent.writeScoped('switch (fl_value_get_custom_type(value)) {', '}', + () { + for (final EnumeratedType customType in customTypes) { + indent.writeln('case ${customType.enumeration}:'); + indent.nest(1, () { + final String customTypeName = + _getClassName(module, customType.name); + final String snakeCustomTypeName = + _snakeCaseFromCamelCase(customTypeName); + final String castMacro = + _getClassCastMacro(module, customType.name); + if (customType.type == CustomTypes.customClass) { + indent.writeln( + 'return pigeon_message_codec_write_$snakeCustomTypeName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); + } else if (customType.type == CustomTypes.customEnum) { + indent.writeln( + 'return pigeon_message_codec_write_$snakeCustomTypeName(codec, buffer, reinterpret_cast(const_cast(fl_value_get_custom_value(value))), error);'); + } + }); + } + }); + }); + + indent.newln(); + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class)->write_value(codec, buffer, value, error);'); + }); + + for (final EnumeratedType customType in customTypes) { + final String customTypeName = _getClassName(module, customType.name); + final String snakeCustomTypeName = + _snakeCaseFromCamelCase(customTypeName); + indent.newln(); + indent.writeScoped( + 'static FlValue* pigeon_message_codec_read_$snakeCustomTypeName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', + '}', () { + if (customType.type == CustomTypes.customClass) { + indent.writeln( + 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); + indent.writeScoped('if (values == nullptr) {', '}', () { + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'g_autoptr($customTypeName) value = ${snakeCustomTypeName}_new_from_list(values);'); + indent.writeScoped('if (value == nullptr) {', '}', () { + indent.writeln( + 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); + indent.writeln('return nullptr;'); + }); + indent.newln(); + indent.writeln( + 'return fl_value_new_custom_object_take(${customType.enumeration}, G_OBJECT(value));'); + } else if (customType.type == CustomTypes.customEnum) { + indent.writeln( + 'return fl_value_new_custom(${customType.enumeration}, fl_standard_message_codec_read_value(codec, buffer, offset, error), (GDestroyNotify)fl_value_unref);'); + } + }); + } + + indent.newln(); + indent.writeScoped( + 'static FlValue* pigeon_message_codec_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', + '}', () { + indent.writeScoped('switch (type) {', '}', () { + for (final EnumeratedType customType in customTypes) { + final String customTypeName = _getClassName(module, customType.name); + final String snakeCustomTypeName = + _snakeCaseFromCamelCase(customTypeName); + indent.writeln('case ${customType.enumeration}:'); + indent.nest(1, () { + indent.writeln( + 'return pigeon_message_codec_read_$snakeCustomTypeName(codec, buffer, offset, error);'); + }); + } + + indent.writeln('default:'); + indent.nest(1, () { + indent.writeln( + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); + }); + }); + }); + + indent.newln(); + _writeInit(indent, codecModule, codecClassName, () {}); + + indent.newln(); + _writeClassInit(indent, codecModule, codecClassName, () { + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = pigeon_message_codec_write_value;'); + indent.writeln( + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = pigeon_message_codec_read_value_of_type;'); + }, hasDispose: false); + + indent.newln(); + indent.writeScoped( + 'static PigeonMessageCodec* pigeon_message_codec_new() {', '}', () { + _writeObjectNew(indent, codecModule, codecClassName); + indent.writeln('return self;'); + }); + } + @override void writeFlutterApi( GObjectOptions generatorOptions, @@ -619,12 +786,6 @@ class GObjectSourceGenerator extends StructuredGenerator { final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); final String codecName = '${api.name}Codec'; - final String codecClassName = _getClassName(module, codecName); - final String codecMethodPrefix = '${methodPrefix}_codec'; - - if (getCodecClasses(api, root).isNotEmpty) { - _writeCodec(generatorOptions, root, indent, api, dartPackageName); - } indent.newln(); _writeObjectStruct(indent, module, api.name, () { @@ -651,15 +812,10 @@ class GObjectSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', () { _writeObjectNew(indent, module, api.name); - if (getCodecClasses(api, root).isNotEmpty) { - indent.writeln( - 'g_autoptr($codecClassName) message_codec = ${codecMethodPrefix}_new();'); - indent.writeln( - 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec(FL_STANDARD_MESSAGE_CODEC(message_codec));'); - } else { - indent.writeln( - 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();'); - } + indent.writeln( + 'g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new();'); + indent.writeln( + 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec(FL_STANDARD_MESSAGE_CODEC(message_codec));'); indent.writeln( 'self->channel = fl_method_channel_new(messenger, "${api.name}", FL_METHOD_CODEC(codec));'); indent.writeln('return self;'); @@ -769,12 +925,6 @@ class GObjectSourceGenerator extends StructuredGenerator { final String vtableName = _getVTableName(module, api.name); final String codecName = '${api.name}Codec'; - final String codecClassName = _getClassName(module, codecName); - final String codecMethodPrefix = '${methodPrefix}_codec'; - - if (getCodecClasses(api, root).isNotEmpty) { - _writeCodec(generatorOptions, root, indent, api, dartPackageName); - } for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); @@ -968,13 +1118,8 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('self->user_data_free_func = user_data_free_func;'); indent.newln(); - if (getCodecClasses(api, root).isNotEmpty) { - indent.writeln( - 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); - } else { - indent.writeln( - 'g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new();'); - } + indent.writeln( + 'g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new();'); for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); final String channelName = @@ -1048,141 +1193,6 @@ class GObjectSourceGenerator extends StructuredGenerator { } } -void _writeCodec(GObjectOptions generatorOptions, Root root, Indent indent, - Api api, String dartPackageName) { - final String module = _getModule(generatorOptions, dartPackageName); - final String codecName = '${api.name}Codec'; - final String codecClassName = _getClassName(module, codecName); - final String methodPrefix = _getMethodPrefix(module, api.name); - final String codecMethodPrefix = '${methodPrefix}_codec'; - - indent.newln(); - _writeDeclareFinalType(indent, module, codecName, - parentClassName: 'FlStandardMessageCodec'); - - indent.newln(); - _writeObjectStruct(indent, module, codecName, () {}, - parentClassName: 'FlStandardMessageCodec'); - - indent.newln(); - _writeDefineType(indent, module, codecName, - parentType: 'fl_standard_message_codec_get_type()'); - - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.newln(); - indent.writeScoped( - 'static gboolean ${methodPrefix}_write_$snakeCustomClassName(FlStandardMessageCodec* codec, GByteArray* buffer, $customClassName* value, GError** error) {', - '}', () { - indent.writeln('uint8_t type = ${customClass.enumeration};'); - indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); - indent.writeln( - 'g_autoptr(FlValue) values = ${snakeCustomClassName}_to_list(value);'); - indent.writeln( - 'return fl_standard_message_codec_write_value(codec, buffer, values, error);'); - }); - } - - indent.newln(); - indent.writeScoped( - 'static gboolean ${methodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', - '}', () { - indent.writeScoped( - 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { - indent.writeScoped('switch (fl_value_get_custom_type(value)) {', '}', () { - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - indent.writeln('case ${customClass.enumeration}:'); - indent.nest(1, () { - final String customClassName = - _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - final String castMacro = - _getClassCastMacro(module, customClass.name); - indent.writeln( - 'return ${methodPrefix}_write_$snakeCustomClassName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); - }); - } - }); - }); - - indent.newln(); - indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->write_value(codec, buffer, value, error);'); - }); - - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.newln(); - indent.writeScoped( - 'static FlValue* ${methodPrefix}_read_$snakeCustomClassName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', - '}', () { - indent.writeln( - 'g_autoptr(FlValue) values = fl_standard_message_codec_read_value(codec, buffer, offset, error);'); - indent.writeScoped('if (values == nullptr) {', '}', () { - indent.writeln('return nullptr;'); - }); - indent.newln(); - indent.writeln( - 'g_autoptr($customClassName) value = ${snakeCustomClassName}_new_from_list(values);'); - indent.writeScoped('if (value == nullptr) {', '}', () { - indent.writeln( - 'g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData");'); - indent.writeln('return nullptr;'); - }); - indent.newln(); - indent.writeln( - 'return fl_value_new_custom_object_take(${customClass.enumeration}, G_OBJECT(value));'); - }); - } - - indent.newln(); - indent.writeScoped( - 'static FlValue* ${methodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', - '}', () { - indent.writeScoped('switch (type) {', '}', () { - for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - final String customClassName = _getClassName(module, customClass.name); - final String snakeCustomClassName = - _snakeCaseFromCamelCase(customClassName); - indent.writeln('case ${customClass.enumeration}:'); - indent.nest(1, () { - indent.writeln( - 'return ${methodPrefix}_read_$snakeCustomClassName(codec, buffer, offset, error);'); - }); - } - - indent.writeln('default:'); - indent.nest(1, () { - indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); - }); - }); - }); - - indent.newln(); - _writeInit(indent, module, codecName, () {}); - - indent.newln(); - _writeClassInit(indent, module, codecName, () { - indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${methodPrefix}_write_value;'); - indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = ${methodPrefix}_read_value_of_type;'); - }, hasDispose: false); - - indent.newln(); - indent.writeScoped( - 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { - _writeObjectNew(indent, module, codecName); - indent.writeln('return self;'); - }); -} - // Returns the module name to use. String _getModule(GObjectOptions generatorOptions, String dartPackageName) { return generatorOptions.module ?? _camelCaseFromSnakeCase(dartPackageName); From bbcb8f5d965e0f0f3128ed0072728e7143d55418 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 10 Jun 2024 15:37:22 +1200 Subject: [PATCH 069/127] Fix analyze issues --- packages/pigeon/lib/gobject_generator.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index c7ce72a18b7d..1d0a25a1b5b8 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -623,8 +623,8 @@ class GObjectSourceGenerator extends StructuredGenerator { required String dartPackageName, }) { final String module = _getModule(generatorOptions, dartPackageName); - final String codecModule = 'Pigeon'; - final String codecClassName = 'MessageCodec'; + const String codecModule = 'Pigeon'; + const String codecClassName = 'MessageCodec'; final Iterable customTypes = getEnumeratedTypes(root); @@ -785,7 +785,6 @@ class GObjectSourceGenerator extends StructuredGenerator { final String module = _getModule(generatorOptions, dartPackageName); final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); - final String codecName = '${api.name}Codec'; indent.newln(); _writeObjectStruct(indent, module, api.name, () { @@ -924,8 +923,6 @@ class GObjectSourceGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, api.name); final String vtableName = _getVTableName(module, api.name); - final String codecName = '${api.name}Codec'; - for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); From 9a02193bbde7ff5b9390aea90b882e4164dc54d6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 10 Jun 2024 16:52:02 +1200 Subject: [PATCH 070/127] Update Linux tests to match changes in 2e928d78eafc62dc8b36dfbda2791a53e88c4378 --- .../platform_tests/test_plugin/linux/test_plugin.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 560a77dacdae..ffa11a7086a3 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -212,8 +212,9 @@ create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = core_tests_pigeon_test_all_nullable_types_new( nullptr, nullptr, nullptr, nullptr, nullptr, 0, nullptr, 0, nullptr, - 0, nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - nullable_string, nullptr, nullptr); + 0, nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullable_string, + nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, + nullptr, nullptr); g_autoptr(CoreTestsPigeonTestAllClassesWrapper) wrapper = core_tests_pigeon_test_all_classes_wrapper_new(types, nullptr, nullptr); return core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new( @@ -229,7 +230,8 @@ send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, core_tests_pigeon_test_all_nullable_types_new( a_nullable_bool, a_nullable_int, nullptr, nullptr, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, nullptr, nullptr, - nullptr, nullptr, nullptr, a_nullable_string, nullptr, nullptr); + nullptr, a_nullable_string, nullptr, nullptr, nullptr, nullptr, + nullptr, nullptr, nullptr, nullptr, nullptr); return core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new( types); } @@ -243,7 +245,8 @@ send_multiple_nullable_types_without_recursion( core_tests_pigeon_test_all_nullable_types_without_recursion_new( a_nullable_bool, a_nullable_int, nullptr, nullptr, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, nullptr, nullptr, - nullptr, nullptr, nullptr, a_nullable_string, nullptr); + nullptr, a_nullable_string, nullptr, nullptr, nullptr, nullptr, + nullptr, nullptr, nullptr); return core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( types); } From 8d705c4c2d797d15899057c86a6a1a7b82074163 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 13:14:23 +1200 Subject: [PATCH 071/127] Update generated code --- .../pigeon/example/app/linux/messages.g.cc | 2 +- .../linux/pigeon/core_tests.gen.cc | 1261 ++++++++--------- .../test_plugin/linux/pigeon/core_tests.gen.h | 93 +- 3 files changed, 621 insertions(+), 735 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index 88f26a3debe6..ef7ce05e1a8e 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -514,7 +514,7 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( pigeon_example_package_example_host_api_get_type(), nullptr)); - self->messenger = g_object_ref(messenger); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 3c7539a806fb..dc7574cebfc9 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -22,11 +22,15 @@ struct _CoreTestsPigeonTestAllTypes { size_t a8_byte_array_length; double* a_float_array; size_t a_float_array_length; - FlValue* list; - FlValue* a_map; CoreTestsPigeonTestAnEnum an_enum; gchar* a_string; FlValue* an_object; + FlValue* list; + FlValue* string_list; + FlValue* int_list; + FlValue* double_list; + FlValue* bool_list; + FlValue* map; }; G_DEFINE_TYPE(CoreTestsPigeonTestAllTypes, core_tests_pigeon_test_all_types, @@ -34,10 +38,14 @@ G_DEFINE_TYPE(CoreTestsPigeonTestAllTypes, core_tests_pigeon_test_all_types, static void core_tests_pigeon_test_all_types_dispose(GObject* object) { CoreTestsPigeonTestAllTypes* self = CORE_TESTS_PIGEON_TEST_ALL_TYPES(object); - g_clear_pointer(&self->list, fl_value_unref); - g_clear_pointer(&self->a_map, fl_value_unref); g_clear_pointer(&self->a_string, g_free); g_clear_pointer(&self->an_object, fl_value_unref); + g_clear_pointer(&self->list, fl_value_unref); + g_clear_pointer(&self->string_list, fl_value_unref); + g_clear_pointer(&self->int_list, fl_value_unref); + g_clear_pointer(&self->double_list, fl_value_unref); + g_clear_pointer(&self->bool_list, fl_value_unref); + g_clear_pointer(&self->map, fl_value_unref); G_OBJECT_CLASS(core_tests_pigeon_test_all_types_parent_class) ->dispose(object); } @@ -55,9 +63,10 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( const uint8_t* a_byte_array, size_t a_byte_array_length, const int32_t* a4_byte_array, size_t a4_byte_array_length, const int64_t* a8_byte_array, size_t a8_byte_array_length, - const double* a_float_array, size_t a_float_array_length, FlValue* list, - FlValue* a_map, CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, - FlValue* an_object) { + const double* a_float_array, size_t a_float_array_length, + CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, + FlValue* an_object, FlValue* list, FlValue* string_list, FlValue* int_list, + FlValue* double_list, FlValue* bool_list, FlValue* map) { CoreTestsPigeonTestAllTypes* self = CORE_TESTS_PIGEON_TEST_ALL_TYPES( g_object_new(core_tests_pigeon_test_all_types_get_type(), nullptr)); self->a_bool = a_bool; @@ -76,11 +85,15 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( self->a_float_array = static_cast( g_memdup2(a_float_array, sizeof(double) * a_float_array_length)); self->a_float_array_length = a_float_array_length; - self->list = fl_value_ref(list); - self->a_map = fl_value_ref(a_map); self->an_enum = an_enum; self->a_string = g_strdup(a_string); self->an_object = fl_value_ref(an_object); + self->list = fl_value_ref(list); + self->string_list = fl_value_ref(string_list); + self->int_list = fl_value_ref(int_list); + self->double_list = fl_value_ref(double_list); + self->bool_list = fl_value_ref(bool_list); + self->map = fl_value_ref(map); return self; } @@ -136,35 +149,59 @@ const double* core_tests_pigeon_test_all_types_get_a_float_array( return self->a_float_array; } +CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), + static_cast(0)); + return self->an_enum; +} + +const gchar* core_tests_pigeon_test_all_types_get_a_string( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->a_string; +} + +FlValue* core_tests_pigeon_test_all_types_get_an_object( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->an_object; +} + FlValue* core_tests_pigeon_test_all_types_get_list( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); return self->list; } -FlValue* core_tests_pigeon_test_all_types_get_a_map( +FlValue* core_tests_pigeon_test_all_types_get_string_list( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); - return self->a_map; + return self->string_list; } -CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( +FlValue* core_tests_pigeon_test_all_types_get_int_list( CoreTestsPigeonTestAllTypes* self) { - g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), - static_cast(0)); - return self->an_enum; + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->int_list; } -const gchar* core_tests_pigeon_test_all_types_get_a_string( +FlValue* core_tests_pigeon_test_all_types_get_double_list( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); - return self->a_string; + return self->double_list; } -FlValue* core_tests_pigeon_test_all_types_get_an_object( +FlValue* core_tests_pigeon_test_all_types_get_bool_list( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); - return self->an_object; + return self->bool_list; +} + +FlValue* core_tests_pigeon_test_all_types_get_map( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->map; } static FlValue* core_tests_pigeon_test_all_types_to_list( @@ -186,12 +223,16 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_append_take( values, fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); - fl_value_append_take(values, fl_value_ref(self->list)); - fl_value_append_take(values, fl_value_ref(self->a_map)); fl_value_append_take(values, fl_value_new_int(static_cast(self->an_enum))); fl_value_append_take(values, fl_value_new_string(self->a_string)); fl_value_append_take(values, fl_value_ref(self->an_object)); + fl_value_append_take(values, fl_value_ref(self->list)); + fl_value_append_take(values, fl_value_ref(self->string_list)); + fl_value_append_take(values, fl_value_ref(self->int_list)); + fl_value_append_take(values, fl_value_ref(self->double_list)); + fl_value_append_take(values, fl_value_ref(self->bool_list)); + fl_value_append_take(values, fl_value_ref(self->map)); return values; } @@ -218,21 +259,29 @@ core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { const double* a_float_array = fl_value_get_float_list(value7); size_t a_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); - FlValue* list = value8; + CoreTestsPigeonTestAnEnum an_enum = + static_cast(fl_value_get_int(value8)); FlValue* value9 = fl_value_get_list_value(values, 9); - FlValue* a_map = value9; + const gchar* a_string = fl_value_get_string(value9); FlValue* value10 = fl_value_get_list_value(values, 10); - CoreTestsPigeonTestAnEnum an_enum = - static_cast(fl_value_get_int(value10)); + FlValue* an_object = value10; FlValue* value11 = fl_value_get_list_value(values, 11); - const gchar* a_string = fl_value_get_string(value11); + FlValue* list = value11; FlValue* value12 = fl_value_get_list_value(values, 12); - FlValue* an_object = value12; + FlValue* string_list = value12; + FlValue* value13 = fl_value_get_list_value(values, 13); + FlValue* int_list = value13; + FlValue* value14 = fl_value_get_list_value(values, 14); + FlValue* double_list = value14; + FlValue* value15 = fl_value_get_list_value(values, 15); + FlValue* bool_list = value15; + FlValue* value16 = fl_value_get_list_value(values, 16); + FlValue* map = value16; return core_tests_pigeon_test_all_types_new( a_bool, an_int, an_int64, a_double, a_byte_array, a_byte_array_length, a4_byte_array, a4_byte_array_length, a8_byte_array, a8_byte_array_length, - a_float_array, a_float_array_length, list, a_map, an_enum, a_string, - an_object); + a_float_array, a_float_array_length, an_enum, a_string, an_object, list, + string_list, int_list, double_list, bool_list, map); } struct _CoreTestsPigeonTestAllNullableTypes { @@ -250,8 +299,6 @@ struct _CoreTestsPigeonTestAllNullableTypes { size_t a_nullable8_byte_array_length; double* a_nullable_float_array; size_t a_nullable_float_array_length; - FlValue* a_nullable_list; - FlValue* a_nullable_map; FlValue* nullable_nested_list; FlValue* nullable_map_with_annotations; FlValue* nullable_map_with_object; @@ -259,6 +306,13 @@ struct _CoreTestsPigeonTestAllNullableTypes { gchar* a_nullable_string; FlValue* a_nullable_object; CoreTestsPigeonTestAllNullableTypes* all_nullable_types; + FlValue* list; + FlValue* string_list; + FlValue* int_list; + FlValue* double_list; + FlValue* bool_list; + FlValue* nested_class_list; + FlValue* map; }; G_DEFINE_TYPE(CoreTestsPigeonTestAllNullableTypes, @@ -271,8 +325,6 @@ static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { g_clear_pointer(&self->a_nullable_int, g_free); g_clear_pointer(&self->a_nullable_int64, g_free); g_clear_pointer(&self->a_nullable_double, g_free); - g_clear_pointer(&self->a_nullable_list, fl_value_unref); - g_clear_pointer(&self->a_nullable_map, fl_value_unref); g_clear_pointer(&self->nullable_nested_list, fl_value_unref); g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); @@ -280,6 +332,13 @@ static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { g_clear_pointer(&self->a_nullable_string, g_free); g_clear_pointer(&self->a_nullable_object, fl_value_unref); g_clear_object(&self->all_nullable_types); + g_clear_pointer(&self->list, fl_value_unref); + g_clear_pointer(&self->string_list, fl_value_unref); + g_clear_pointer(&self->int_list, fl_value_unref); + g_clear_pointer(&self->double_list, fl_value_unref); + g_clear_pointer(&self->bool_list, fl_value_unref); + g_clear_pointer(&self->nested_class_list, fl_value_unref); + g_clear_pointer(&self->map, fl_value_unref); G_OBJECT_CLASS(core_tests_pigeon_test_all_nullable_types_parent_class) ->dispose(object); } @@ -301,12 +360,13 @@ core_tests_pigeon_test_all_nullable_types_new( const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, const double* a_nullable_float_array, size_t a_nullable_float_array_length, - FlValue* a_nullable_list, FlValue* a_nullable_map, FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, FlValue* nullable_map_with_object, CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, FlValue* a_nullable_object, - CoreTestsPigeonTestAllNullableTypes* all_nullable_types) { + CoreTestsPigeonTestAllNullableTypes* all_nullable_types, FlValue* list, + FlValue* string_list, FlValue* int_list, FlValue* double_list, + FlValue* bool_list, FlValue* nested_class_list, FlValue* map) { CoreTestsPigeonTestAllNullableTypes* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(g_object_new( core_tests_pigeon_test_all_nullable_types_get_type(), nullptr)); @@ -346,8 +406,6 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_float_array = static_cast(g_memdup2( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; - self->a_nullable_list = fl_value_ref(a_nullable_list); - self->a_nullable_map = fl_value_ref(a_nullable_map); self->nullable_nested_list = fl_value_ref(nullable_nested_list); self->nullable_map_with_annotations = fl_value_ref(nullable_map_with_annotations); @@ -362,6 +420,13 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_string = g_strdup(a_nullable_string); self->a_nullable_object = fl_value_ref(a_nullable_object); self->all_nullable_types = g_object_ref(all_nullable_types); + self->list = fl_value_ref(list); + self->string_list = fl_value_ref(string_list); + self->int_list = fl_value_ref(int_list); + self->double_list = fl_value_ref(double_list); + self->bool_list = fl_value_ref(bool_list); + self->nested_class_list = fl_value_ref(nested_class_list); + self->map = fl_value_ref(map); return self; } @@ -429,20 +494,6 @@ core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array( return self->a_nullable_float_array; } -FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_list( - CoreTestsPigeonTestAllNullableTypes* self) { - g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), - nullptr); - return self->a_nullable_list; -} - -FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_map( - CoreTestsPigeonTestAllNullableTypes* self) { - g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), - nullptr); - return self->a_nullable_map; -} - FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list( CoreTestsPigeonTestAllNullableTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), @@ -495,6 +546,55 @@ core_tests_pigeon_test_all_nullable_types_get_all_nullable_types( return self->all_nullable_types; } +FlValue* core_tests_pigeon_test_all_nullable_types_get_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_string_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->string_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_int_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->int_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_double_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->double_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->bool_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nested_class_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->nested_class_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_get_map( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->map; +} + static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( CoreTestsPigeonTestAllNullableTypes* self) { FlValue* values = fl_value_new_list(); @@ -531,12 +631,6 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( ? fl_value_new_float_list(self->a_nullable_float_array, self->a_nullable_float_array_length) : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_list != nullptr - ? fl_value_ref(self->a_nullable_list) - : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_map != nullptr - ? fl_value_ref(self->a_nullable_map) - : fl_value_new_null()); fl_value_append_take(values, self->nullable_nested_list != nullptr ? fl_value_ref(self->nullable_nested_list) : fl_value_new_null()); @@ -564,6 +658,25 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( ? fl_value_new_custom_object( 0, G_OBJECT(self->all_nullable_types)) : fl_value_new_null()); + fl_value_append_take(values, self->list != nullptr ? fl_value_ref(self->list) + : fl_value_new_null()); + fl_value_append_take(values, self->string_list != nullptr + ? fl_value_ref(self->string_list) + : fl_value_new_null()); + fl_value_append_take(values, self->int_list != nullptr + ? fl_value_ref(self->int_list) + : fl_value_new_null()); + fl_value_append_take(values, self->double_list != nullptr + ? fl_value_ref(self->double_list) + : fl_value_new_null()); + fl_value_append_take(values, self->bool_list != nullptr + ? fl_value_ref(self->bool_list) + : fl_value_new_null()); + fl_value_append_take(values, self->nested_class_list != nullptr + ? fl_value_ref(self->nested_class_list) + : fl_value_new_null()); + fl_value_append_take(values, self->map != nullptr ? fl_value_ref(self->map) + : fl_value_new_null()); return values; } @@ -622,51 +735,67 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { : fl_value_get_float_list(value7); size_t a_nullable_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); - FlValue* a_nullable_list = + FlValue* nullable_nested_list = fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; FlValue* value9 = fl_value_get_list_value(values, 9); - FlValue* a_nullable_map = + FlValue* nullable_map_with_annotations = fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; FlValue* value10 = fl_value_get_list_value(values, 10); - FlValue* nullable_nested_list = + FlValue* nullable_map_with_object = fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; FlValue* value11 = fl_value_get_list_value(values, 11); - FlValue* nullable_map_with_annotations = - fl_value_get_type(value11) == FL_VALUE_TYPE_NULL ? nullptr : value11; - FlValue* value12 = fl_value_get_list_value(values, 12); - FlValue* nullable_map_with_object = - fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; - FlValue* value13 = fl_value_get_list_value(values, 13); CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; - if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + if (fl_value_get_type(value11) != FL_VALUE_TYPE_NULL) { a_nullable_enum_value = - static_cast(fl_value_get_int(value13)); + static_cast(fl_value_get_int(value11)); a_nullable_enum = &a_nullable_enum_value; } - FlValue* value14 = fl_value_get_list_value(values, 14); + FlValue* value12 = fl_value_get_list_value(values, 12); const gchar* a_nullable_string = - fl_value_get_type(value14) == FL_VALUE_TYPE_NULL + fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr - : fl_value_get_string(value14); - FlValue* value15 = fl_value_get_list_value(values, 15); + : fl_value_get_string(value12); + FlValue* value13 = fl_value_get_list_value(values, 13); FlValue* a_nullable_object = - fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; - FlValue* value16 = fl_value_get_list_value(values, 16); + fl_value_get_type(value13) == FL_VALUE_TYPE_NULL ? nullptr : value13; + FlValue* value14 = fl_value_get_list_value(values, 14); CoreTestsPigeonTestAllNullableTypes* all_nullable_types = - fl_value_get_type(value16) == FL_VALUE_TYPE_NULL + fl_value_get_type(value14) == FL_VALUE_TYPE_NULL ? nullptr : CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(value16)); + fl_value_get_custom_value_object(value14)); + FlValue* value15 = fl_value_get_list_value(values, 15); + FlValue* list = + fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + FlValue* value16 = fl_value_get_list_value(values, 16); + FlValue* string_list = + fl_value_get_type(value16) == FL_VALUE_TYPE_NULL ? nullptr : value16; + FlValue* value17 = fl_value_get_list_value(values, 17); + FlValue* int_list = + fl_value_get_type(value17) == FL_VALUE_TYPE_NULL ? nullptr : value17; + FlValue* value18 = fl_value_get_list_value(values, 18); + FlValue* double_list = + fl_value_get_type(value18) == FL_VALUE_TYPE_NULL ? nullptr : value18; + FlValue* value19 = fl_value_get_list_value(values, 19); + FlValue* bool_list = + fl_value_get_type(value19) == FL_VALUE_TYPE_NULL ? nullptr : value19; + FlValue* value20 = fl_value_get_list_value(values, 20); + FlValue* nested_class_list = + fl_value_get_type(value20) == FL_VALUE_TYPE_NULL ? nullptr : value20; + FlValue* value21 = fl_value_get_list_value(values, 21); + FlValue* map = + fl_value_get_type(value21) == FL_VALUE_TYPE_NULL ? nullptr : value21; return core_tests_pigeon_test_all_nullable_types_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, a_nullable_byte_array, a_nullable_byte_array_length, a_nullable4_byte_array, a_nullable4_byte_array_length, a_nullable8_byte_array, a_nullable8_byte_array_length, - a_nullable_float_array, a_nullable_float_array_length, a_nullable_list, - a_nullable_map, nullable_nested_list, nullable_map_with_annotations, + a_nullable_float_array, a_nullable_float_array_length, + nullable_nested_list, nullable_map_with_annotations, nullable_map_with_object, a_nullable_enum, a_nullable_string, - a_nullable_object, all_nullable_types); + a_nullable_object, all_nullable_types, list, string_list, int_list, + double_list, bool_list, nested_class_list, map); } struct _CoreTestsPigeonTestAllNullableTypesWithoutRecursion { @@ -684,14 +813,18 @@ struct _CoreTestsPigeonTestAllNullableTypesWithoutRecursion { size_t a_nullable8_byte_array_length; double* a_nullable_float_array; size_t a_nullable_float_array_length; - FlValue* a_nullable_list; - FlValue* a_nullable_map; FlValue* nullable_nested_list; FlValue* nullable_map_with_annotations; FlValue* nullable_map_with_object; CoreTestsPigeonTestAnEnum* a_nullable_enum; gchar* a_nullable_string; FlValue* a_nullable_object; + FlValue* list; + FlValue* string_list; + FlValue* int_list; + FlValue* double_list; + FlValue* bool_list; + FlValue* map; }; G_DEFINE_TYPE(CoreTestsPigeonTestAllNullableTypesWithoutRecursion, @@ -706,14 +839,18 @@ static void core_tests_pigeon_test_all_nullable_types_without_recursion_dispose( g_clear_pointer(&self->a_nullable_int, g_free); g_clear_pointer(&self->a_nullable_int64, g_free); g_clear_pointer(&self->a_nullable_double, g_free); - g_clear_pointer(&self->a_nullable_list, fl_value_unref); - g_clear_pointer(&self->a_nullable_map, fl_value_unref); g_clear_pointer(&self->nullable_nested_list, fl_value_unref); g_clear_pointer(&self->nullable_map_with_annotations, fl_value_unref); g_clear_pointer(&self->nullable_map_with_object, fl_value_unref); g_clear_pointer(&self->a_nullable_enum, g_free); g_clear_pointer(&self->a_nullable_string, g_free); g_clear_pointer(&self->a_nullable_object, fl_value_unref); + g_clear_pointer(&self->list, fl_value_unref); + g_clear_pointer(&self->string_list, fl_value_unref); + g_clear_pointer(&self->int_list, fl_value_unref); + g_clear_pointer(&self->double_list, fl_value_unref); + g_clear_pointer(&self->bool_list, fl_value_unref); + g_clear_pointer(&self->map, fl_value_unref); G_OBJECT_CLASS( core_tests_pigeon_test_all_nullable_types_without_recursion_parent_class) ->dispose(object); @@ -737,11 +874,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, const double* a_nullable_float_array, size_t a_nullable_float_array_length, - FlValue* a_nullable_list, FlValue* a_nullable_map, FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, FlValue* nullable_map_with_object, CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, - FlValue* a_nullable_object) { + FlValue* a_nullable_object, FlValue* list, FlValue* string_list, + FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* map) { CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(g_object_new( core_tests_pigeon_test_all_nullable_types_without_recursion_get_type(), @@ -782,8 +919,6 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->a_nullable_float_array = static_cast(g_memdup2( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; - self->a_nullable_list = fl_value_ref(a_nullable_list); - self->a_nullable_map = fl_value_ref(a_nullable_map); self->nullable_nested_list = fl_value_ref(nullable_nested_list); self->nullable_map_with_annotations = fl_value_ref(nullable_map_with_annotations); @@ -797,6 +932,12 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( } self->a_nullable_string = g_strdup(a_nullable_string); self->a_nullable_object = fl_value_ref(a_nullable_object); + self->list = fl_value_ref(list); + self->string_list = fl_value_ref(string_list); + self->int_list = fl_value_ref(int_list); + self->double_list = fl_value_ref(double_list); + self->bool_list = fl_value_ref(bool_list); + self->map = fl_value_ref(map); return self; } @@ -876,24 +1017,6 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float return self->a_nullable_float_array; } -FlValue* -core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { - g_return_val_if_fail( - CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), - nullptr); - return self->a_nullable_list; -} - -FlValue* -core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_map( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { - g_return_val_if_fail( - CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), - nullptr); - return self->a_nullable_map; -} - FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { @@ -948,6 +1071,58 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_objec return self->a_nullable_object; } +FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_string_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->string_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_int_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->int_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_double_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->double_list; +} + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_bool_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->bool_list; +} + +FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_map( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES_WITHOUT_RECURSION(self), + nullptr); + return self->map; +} + static FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self) { @@ -985,12 +1160,6 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( ? fl_value_new_float_list(self->a_nullable_float_array, self->a_nullable_float_array_length) : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_list != nullptr - ? fl_value_ref(self->a_nullable_list) - : fl_value_new_null()); - fl_value_append_take(values, self->a_nullable_map != nullptr - ? fl_value_ref(self->a_nullable_map) - : fl_value_new_null()); fl_value_append_take(values, self->nullable_nested_list != nullptr ? fl_value_ref(self->nullable_nested_list) : fl_value_new_null()); @@ -1014,6 +1183,22 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( fl_value_append_take(values, self->a_nullable_object != nullptr ? fl_value_ref(self->a_nullable_object) : fl_value_new_null()); + fl_value_append_take(values, self->list != nullptr ? fl_value_ref(self->list) + : fl_value_new_null()); + fl_value_append_take(values, self->string_list != nullptr + ? fl_value_ref(self->string_list) + : fl_value_new_null()); + fl_value_append_take(values, self->int_list != nullptr + ? fl_value_ref(self->int_list) + : fl_value_new_null()); + fl_value_append_take(values, self->double_list != nullptr + ? fl_value_ref(self->double_list) + : fl_value_new_null()); + fl_value_append_take(values, self->bool_list != nullptr + ? fl_value_ref(self->bool_list) + : fl_value_new_null()); + fl_value_append_take(values, self->map != nullptr ? fl_value_ref(self->map) + : fl_value_new_null()); return values; } @@ -1073,45 +1258,58 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( : fl_value_get_float_list(value7); size_t a_nullable_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); - FlValue* a_nullable_list = + FlValue* nullable_nested_list = fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; FlValue* value9 = fl_value_get_list_value(values, 9); - FlValue* a_nullable_map = + FlValue* nullable_map_with_annotations = fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; FlValue* value10 = fl_value_get_list_value(values, 10); - FlValue* nullable_nested_list = + FlValue* nullable_map_with_object = fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; FlValue* value11 = fl_value_get_list_value(values, 11); - FlValue* nullable_map_with_annotations = - fl_value_get_type(value11) == FL_VALUE_TYPE_NULL ? nullptr : value11; - FlValue* value12 = fl_value_get_list_value(values, 12); - FlValue* nullable_map_with_object = - fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr : value12; - FlValue* value13 = fl_value_get_list_value(values, 13); CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; - if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + if (fl_value_get_type(value11) != FL_VALUE_TYPE_NULL) { a_nullable_enum_value = - static_cast(fl_value_get_int(value13)); + static_cast(fl_value_get_int(value11)); a_nullable_enum = &a_nullable_enum_value; } - FlValue* value14 = fl_value_get_list_value(values, 14); + FlValue* value12 = fl_value_get_list_value(values, 12); const gchar* a_nullable_string = - fl_value_get_type(value14) == FL_VALUE_TYPE_NULL + fl_value_get_type(value12) == FL_VALUE_TYPE_NULL ? nullptr - : fl_value_get_string(value14); - FlValue* value15 = fl_value_get_list_value(values, 15); + : fl_value_get_string(value12); + FlValue* value13 = fl_value_get_list_value(values, 13); FlValue* a_nullable_object = + fl_value_get_type(value13) == FL_VALUE_TYPE_NULL ? nullptr : value13; + FlValue* value14 = fl_value_get_list_value(values, 14); + FlValue* list = + fl_value_get_type(value14) == FL_VALUE_TYPE_NULL ? nullptr : value14; + FlValue* value15 = fl_value_get_list_value(values, 15); + FlValue* string_list = fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + FlValue* value16 = fl_value_get_list_value(values, 16); + FlValue* int_list = + fl_value_get_type(value16) == FL_VALUE_TYPE_NULL ? nullptr : value16; + FlValue* value17 = fl_value_get_list_value(values, 17); + FlValue* double_list = + fl_value_get_type(value17) == FL_VALUE_TYPE_NULL ? nullptr : value17; + FlValue* value18 = fl_value_get_list_value(values, 18); + FlValue* bool_list = + fl_value_get_type(value18) == FL_VALUE_TYPE_NULL ? nullptr : value18; + FlValue* value19 = fl_value_get_list_value(values, 19); + FlValue* map = + fl_value_get_type(value19) == FL_VALUE_TYPE_NULL ? nullptr : value19; return core_tests_pigeon_test_all_nullable_types_without_recursion_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, a_nullable_byte_array, a_nullable_byte_array_length, a_nullable4_byte_array, a_nullable4_byte_array_length, a_nullable8_byte_array, a_nullable8_byte_array_length, - a_nullable_float_array, a_nullable_float_array_length, a_nullable_list, - a_nullable_map, nullable_nested_list, nullable_map_with_annotations, + a_nullable_float_array, a_nullable_float_array_length, + nullable_nested_list, nullable_map_with_annotations, nullable_map_with_object, a_nullable_enum, a_nullable_string, - a_nullable_object); + a_nullable_object, list, string_list, int_list, double_list, bool_list, + map); } struct _CoreTestsPigeonTestAllClassesWrapper { @@ -1282,35 +1480,30 @@ core_tests_pigeon_test_test_message_new_from_list(FlValue* values) { return core_tests_pigeon_test_test_message_new(test_list); } -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiCodec, - core_tests_pigeon_test_host_integration_core_api_codec, - CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_CODEC, - FlStandardMessageCodec) +G_DECLARE_FINAL_TYPE(PigeonMessageCodec, pigeon_message_codec, PIGEON, + MESSAGE_CODEC, FlStandardMessageCodec) -struct _CoreTestsPigeonTestHostIntegrationCoreApiCodec { +struct _PigeonMessageCodec { FlStandardMessageCodec parent_instance; }; -G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiCodec, - core_tests_pigeon_test_host_integration_core_api_codec, +G_DEFINE_TYPE(PigeonMessageCodec, pigeon_message_codec, fl_standard_message_codec_get_type()) -static gboolean -core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( +static gboolean pigeon_message_codec_write_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { - uint8_t type = 128; + CoreTestsPigeonTestAllTypes* value, GError** error) { + uint8_t type = 129; g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_all_classes_wrapper_to_list(value); + g_autoptr(FlValue) values = core_tests_pigeon_test_all_types_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); } static gboolean -core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( +pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypes* value, GError** error) { - uint8_t type = 129; + uint8_t type = 130; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = core_tests_pigeon_test_all_nullable_types_to_list(value); @@ -1318,11 +1511,11 @@ core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_al } static gboolean -core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( +pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, GError** error) { - uint8_t type = 130; + uint8_t type = 131; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( @@ -1331,71 +1524,84 @@ core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_al } static gboolean -core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_types( +pigeon_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllTypes* value, GError** error) { - uint8_t type = 131; + CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { + uint8_t type = 132; g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = core_tests_pigeon_test_all_types_to_list(value); + g_autoptr(FlValue) values = + core_tests_pigeon_test_all_classes_wrapper_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean -core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_test_message( +static gboolean pigeon_message_codec_write_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestTestMessage* value, GError** error) { - uint8_t type = 132; + uint8_t type = 133; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = core_tests_pigeon_test_test_message_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean core_tests_pigeon_test_host_integration_core_api_write_value( +static gboolean pigeon_message_codec_write_core_tests_pigeon_test_an_enum( FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) { + uint8_t type = 134; + g_byte_array_append(buffer, &type, sizeof(uint8_t)); + return fl_standard_message_codec_write_value(codec, buffer, value, error); +} + +static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, + GByteArray* buffer, + FlValue* value, + GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { - case 128: - return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( + case 129: + return pigeon_message_codec_write_core_tests_pigeon_test_all_types( codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( + CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value)), error); - case 129: - return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( + case 130: + return pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value)), error); - case 130: - return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( + case 131: + return pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value)), error); - case 131: - return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_all_types( + case 132: + return pigeon_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_TYPES( + CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( fl_value_get_custom_value_object(value)), error); - case 132: - return core_tests_pigeon_test_host_integration_core_api_write_core_tests_pigeon_test_test_message( + case 133: + return pigeon_message_codec_write_core_tests_pigeon_test_test_message( codec, buffer, CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( fl_value_get_custom_value_object(value)), error); + case 134: + return pigeon_message_codec_write_core_tests_pigeon_test_an_enum( + codec, buffer, + reinterpret_cast( + const_cast(fl_value_get_custom_value(value))), + error); } } - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_host_integration_core_api_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) ->write_value(codec, buffer, value, error); } -static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( +static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1404,19 +1610,19 @@ core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all return nullptr; } - g_autoptr(CoreTestsPigeonTestAllClassesWrapper) value = - core_tests_pigeon_test_all_classes_wrapper_new_from_list(values); + g_autoptr(CoreTestsPigeonTestAllTypes) value = + core_tests_pigeon_test_all_types_new_from_list(values); if (value == nullptr) { g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData"); return nullptr; } - return fl_value_new_custom_object_take(128, G_OBJECT(value)); + return fl_value_new_custom_object_take(129, G_OBJECT(value)); } static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( +pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1433,11 +1639,11 @@ core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all return nullptr; } - return fl_value_new_custom_object_take(129, G_OBJECT(value)); + return fl_value_new_custom_object_take(130, G_OBJECT(value)); } static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( +pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1455,11 +1661,11 @@ core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all return nullptr; } - return fl_value_new_custom_object_take(130, G_OBJECT(value)); + return fl_value_new_custom_object_take(131, G_OBJECT(value)); } static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_types( +pigeon_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1468,19 +1674,18 @@ core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all return nullptr; } - g_autoptr(CoreTestsPigeonTestAllTypes) value = - core_tests_pigeon_test_all_types_new_from_list(values); + g_autoptr(CoreTestsPigeonTestAllClassesWrapper) value = + core_tests_pigeon_test_all_classes_wrapper_new_from_list(values); if (value == nullptr) { g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, "Invalid data received for MessageData"); return nullptr; } - return fl_value_new_custom_object_take(131, G_OBJECT(value)); + return fl_value_new_custom_object_take(132, G_OBJECT(value)); } -static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_test_message( +static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1497,53 +1702,57 @@ core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_tes return nullptr; } - return fl_value_new_custom_object_take(132, G_OBJECT(value)); + return fl_value_new_custom_object_take(133, G_OBJECT(value)); } -static FlValue* -core_tests_pigeon_test_host_integration_core_api_read_value_of_type( +static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_an_enum( + FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, + GError** error) { + return fl_value_new_custom( + 134, fl_standard_message_codec_read_value(codec, buffer, offset, error), + (GDestroyNotify)fl_value_unref); +} + +static FlValue* pigeon_message_codec_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { - case 128: - return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( - codec, buffer, offset, error); case 129: - return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( + return pigeon_message_codec_read_core_tests_pigeon_test_all_types( codec, buffer, offset, error); case 130: - return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( + return pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types( codec, buffer, offset, error); case 131: - return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_all_types( + return pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, offset, error); case 132: - return core_tests_pigeon_test_host_integration_core_api_read_core_tests_pigeon_test_test_message( + return pigeon_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( + codec, buffer, offset, error); + case 133: + return pigeon_message_codec_read_core_tests_pigeon_test_test_message( + codec, buffer, offset, error); + case 134: + return pigeon_message_codec_read_core_tests_pigeon_test_an_enum( codec, buffer, offset, error); default: - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_host_integration_core_api_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) ->read_value_of_type(codec, buffer, offset, type, error); } } -static void core_tests_pigeon_test_host_integration_core_api_codec_init( - CoreTestsPigeonTestHostIntegrationCoreApiCodec* self) {} +static void pigeon_message_codec_init(PigeonMessageCodec* self) {} -static void core_tests_pigeon_test_host_integration_core_api_codec_class_init( - CoreTestsPigeonTestHostIntegrationCoreApiCodecClass* klass) { +static void pigeon_message_codec_class_init(PigeonMessageCodecClass* klass) { FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - core_tests_pigeon_test_host_integration_core_api_write_value; + pigeon_message_codec_write_value; FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - core_tests_pigeon_test_host_integration_core_api_read_value_of_type; + pigeon_message_codec_read_value_of_type; } -static CoreTestsPigeonTestHostIntegrationCoreApiCodec* -core_tests_pigeon_test_host_integration_core_api_codec_new() { - CoreTestsPigeonTestHostIntegrationCoreApiCodec* self = - CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_CODEC(g_object_new( - core_tests_pigeon_test_host_integration_core_api_codec_get_type(), - nullptr)); +static PigeonMessageCodec* pigeon_message_codec_new() { + PigeonMessageCodec* self = PIGEON_MESSAGE_CODEC( + g_object_new(pigeon_message_codec_get_type(), nullptr)); return self; } @@ -9679,8 +9888,7 @@ core_tests_pigeon_test_host_integration_core_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCodec) codec = - core_tests_pigeon_test_host_integration_core_api_codec_new(); + g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); self->noop_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop", @@ -12072,423 +12280,157 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new_error( code, message, details); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_uint8_list_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableUint8List", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, - FlValue* return_value) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new( - return_value); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_list_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableList", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new_error( - code, message, details); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_list_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableList", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, - FlValue* return_value) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new( - return_value); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_map_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableMap", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new_error( - code, message, details); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_map_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableMap", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, - CoreTestsPigeonTestAnEnum* return_value) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new( - return_value); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_enum_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableEnum", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new_error( - code, message, details); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_enum_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterEchoNullableEnum", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, - const gchar* return_value) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new( - return_value); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_small_api_echo_string_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterSmallApiEchoString", error->message); - } -} - -void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { - g_autoptr( - CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) - response = - core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new_error( - code, message, details); - g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_small_api_echo_string_channel, response_handle, - response->value, &error)) { - g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", - "callFlutterSmallApiEchoString", error->message); - } -} - -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec, - core_tests_pigeon_test_flutter_integration_core_api_codec, - CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_CODEC, - FlStandardMessageCodec) - -struct _CoreTestsPigeonTestFlutterIntegrationCoreApiCodec { - FlStandardMessageCodec parent_instance; -}; - -G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec, - core_tests_pigeon_test_flutter_integration_core_api_codec, - fl_standard_message_codec_get_type()) - -static gboolean -core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { - uint8_t type = 128; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_all_classes_wrapper_to_list(value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean -core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllNullableTypes* value, GError** error) { - uint8_t type = 129; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_all_nullable_types_to_list(value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean -core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, - GError** error) { - uint8_t type = 130; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( - value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean -core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_types( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestAllTypes* value, GError** error) { - uint8_t type = 131; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = core_tests_pigeon_test_all_types_to_list(value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean -core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_test_message( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestTestMessage* value, GError** error) { - uint8_t type = 132; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_test_message_to_list(value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean core_tests_pigeon_test_flutter_integration_core_api_write_value( - FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, - GError** error) { - if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { - switch (fl_value_get_custom_type(value)) { - case 128: - return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_classes_wrapper( - codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( - fl_value_get_custom_value_object(value)), - error); - case 129: - return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types( - codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(value)), - error); - case 130: - return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_nullable_types_without_recursion( - codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(value)), - error); - case 131: - return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_all_types( - codec, buffer, - CORE_TESTS_PIGEON_TEST_ALL_TYPES( - fl_value_get_custom_value_object(value)), - error); - case 132: - return core_tests_pigeon_test_flutter_integration_core_api_write_core_tests_pigeon_test_test_message( - codec, buffer, - CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( - fl_value_get_custom_value_object(value)), - error); - } - } - - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_flutter_integration_core_api_codec_parent_class) - ->write_value(codec, buffer, value, error); -} - -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; - } - - g_autoptr(CoreTestsPigeonTestAllClassesWrapper) value = - core_tests_pigeon_test_all_classes_wrapper_new_from_list(values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; - } - - return fl_value_new_custom_object_take(128, G_OBJECT(value)); -} - -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; - } - - g_autoptr(CoreTestsPigeonTestAllNullableTypes) value = - core_tests_pigeon_test_all_nullable_types_new_from_list(values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; - } - - return fl_value_new_custom_object_take(129, G_OBJECT(value)); -} - -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_uint8_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableUint8List", error->message); } +} - g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) value = - core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( - values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableList", error->message); } - - return fl_value_new_custom_object_take(130, G_OBJECT(value)); } -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_types( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_list_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableList", error->message); } +} - g_autoptr(CoreTestsPigeonTestAllTypes) value = - core_tests_pigeon_test_all_types_new_from_list(values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + FlValue* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_map_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableMap", error->message); } - - return fl_value_new_custom_object_take(131, G_OBJECT(value)); } -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_test_message( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_map_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableMap", error->message); } +} - g_autoptr(CoreTestsPigeonTestTestMessage) value = - core_tests_pigeon_test_test_message_new_from_list(values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestAnEnum* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_enum_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableEnum", error->message); } - - return fl_value_new_custom_object_take(132, G_OBJECT(value)); } -static FlValue* -core_tests_pigeon_test_flutter_integration_core_api_read_value_of_type( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, - GError** error) { - switch (type) { - case 128: - return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_classes_wrapper( - codec, buffer, offset, error); - case 129: - return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types( - codec, buffer, offset, error); - case 130: - return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_nullable_types_without_recursion( - codec, buffer, offset, error); - case 131: - return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_all_types( - codec, buffer, offset, error); - case 132: - return core_tests_pigeon_test_flutter_integration_core_api_read_core_tests_pigeon_test_test_message( - codec, buffer, offset, error); - default: - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_flutter_integration_core_api_codec_parent_class) - ->read_value_of_type(codec, buffer, offset, type, error); +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_echo_nullable_enum_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterEchoNullableEnum", error->message); } } -static void core_tests_pigeon_test_flutter_integration_core_api_codec_init( - CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* self) {} - -static void -core_tests_pigeon_test_flutter_integration_core_api_codec_class_init( - CoreTestsPigeonTestFlutterIntegrationCoreApiCodecClass* klass) { - FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - core_tests_pigeon_test_flutter_integration_core_api_write_value; - FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - core_tests_pigeon_test_flutter_integration_core_api_read_value_of_type; +void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, + const gchar* return_value) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new( + return_value); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_small_api_echo_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSmallApiEchoString", error->message); + } } -static CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* -core_tests_pigeon_test_flutter_integration_core_api_codec_new() { - CoreTestsPigeonTestFlutterIntegrationCoreApiCodec* self = - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_CODEC(g_object_new( - core_tests_pigeon_test_flutter_integration_core_api_codec_get_type(), - nullptr)); - return self; +void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( + CoreTestsPigeonTestHostIntegrationCoreApi* self, + FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, + const gchar* message, FlValue* details) { + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) + response = + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new_error( + code, message, details); + g_autoptr(GError) error = nullptr; + if (!fl_basic_message_channel_respond( + self->call_flutter_small_api_echo_string_channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "callFlutterSmallApiEchoString", error->message); + } } struct _CoreTestsPigeonTestFlutterIntegrationCoreApi { @@ -12527,8 +12469,7 @@ core_tests_pigeon_test_flutter_integration_core_api_new( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_flutter_integration_core_api_get_type(), nullptr)); - g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiCodec) message_codec = - core_tests_pigeon_test_flutter_integration_core_api_codec_new(); + g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec( FL_STANDARD_MESSAGE_CODEC(message_codec)); @@ -13499,7 +13440,7 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); self->noop_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop", @@ -13708,7 +13649,7 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); self->echo_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo", @@ -13784,103 +13725,6 @@ void core_tests_pigeon_test_host_small_api_respond_error_void_void( } } -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterSmallApiCodec, - core_tests_pigeon_test_flutter_small_api_codec, - CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API_CODEC, - FlStandardMessageCodec) - -struct _CoreTestsPigeonTestFlutterSmallApiCodec { - FlStandardMessageCodec parent_instance; -}; - -G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApiCodec, - core_tests_pigeon_test_flutter_small_api_codec, - fl_standard_message_codec_get_type()) - -static gboolean -core_tests_pigeon_test_flutter_small_api_write_core_tests_pigeon_test_test_message( - FlStandardMessageCodec* codec, GByteArray* buffer, - CoreTestsPigeonTestTestMessage* value, GError** error) { - uint8_t type = 128; - g_byte_array_append(buffer, &type, sizeof(uint8_t)); - g_autoptr(FlValue) values = - core_tests_pigeon_test_test_message_to_list(value); - return fl_standard_message_codec_write_value(codec, buffer, values, error); -} - -static gboolean core_tests_pigeon_test_flutter_small_api_write_value( - FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, - GError** error) { - if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { - switch (fl_value_get_custom_type(value)) { - case 128: - return core_tests_pigeon_test_flutter_small_api_write_core_tests_pigeon_test_test_message( - codec, buffer, - CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( - fl_value_get_custom_value_object(value)), - error); - } - } - - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_flutter_small_api_codec_parent_class) - ->write_value(codec, buffer, value, error); -} - -static FlValue* -core_tests_pigeon_test_flutter_small_api_read_core_tests_pigeon_test_test_message( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, - GError** error) { - g_autoptr(FlValue) values = - fl_standard_message_codec_read_value(codec, buffer, offset, error); - if (values == nullptr) { - return nullptr; - } - - g_autoptr(CoreTestsPigeonTestTestMessage) value = - core_tests_pigeon_test_test_message_new_from_list(values); - if (value == nullptr) { - g_set_error(error, FL_MESSAGE_CODEC_ERROR, FL_MESSAGE_CODEC_ERROR_FAILED, - "Invalid data received for MessageData"); - return nullptr; - } - - return fl_value_new_custom_object_take(128, G_OBJECT(value)); -} - -static FlValue* core_tests_pigeon_test_flutter_small_api_read_value_of_type( - FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, - GError** error) { - switch (type) { - case 128: - return core_tests_pigeon_test_flutter_small_api_read_core_tests_pigeon_test_test_message( - codec, buffer, offset, error); - default: - return FL_STANDARD_MESSAGE_CODEC_CLASS( - core_tests_pigeon_test_flutter_small_api_codec_parent_class) - ->read_value_of_type(codec, buffer, offset, type, error); - } -} - -static void core_tests_pigeon_test_flutter_small_api_codec_init( - CoreTestsPigeonTestFlutterSmallApiCodec* self) {} - -static void core_tests_pigeon_test_flutter_small_api_codec_class_init( - CoreTestsPigeonTestFlutterSmallApiCodecClass* klass) { - FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - core_tests_pigeon_test_flutter_small_api_write_value; - FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - core_tests_pigeon_test_flutter_small_api_read_value_of_type; -} - -static CoreTestsPigeonTestFlutterSmallApiCodec* -core_tests_pigeon_test_flutter_small_api_codec_new() { - CoreTestsPigeonTestFlutterSmallApiCodec* self = - CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_CODEC(g_object_new( - core_tests_pigeon_test_flutter_small_api_codec_get_type(), nullptr)); - return self; -} - struct _CoreTestsPigeonTestFlutterSmallApi { GObject parent_instance; @@ -13912,8 +13756,7 @@ core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger) { CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(g_object_new( core_tests_pigeon_test_flutter_small_api_get_type(), nullptr)); - g_autoptr(CoreTestsPigeonTestFlutterSmallApiCodec) message_codec = - core_tests_pigeon_test_flutter_small_api_codec_new(); + g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec( FL_STANDARD_MESSAGE_CODEC(message_codec)); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index 6fe069bf346e..aa850ae988a4 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -30,9 +30,10 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( const uint8_t* a_byte_array, size_t a_byte_array_length, const int32_t* a4_byte_array, size_t a4_byte_array_length, const int64_t* a8_byte_array, size_t a8_byte_array_length, - const double* a_float_array, size_t a_float_array_length, FlValue* list, - FlValue* a_map, CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, - FlValue* an_object); + const double* a_float_array, size_t a_float_array_length, + CoreTestsPigeonTestAnEnum an_enum, const gchar* a_string, + FlValue* an_object, FlValue* list, FlValue* string_list, FlValue* int_list, + FlValue* double_list, FlValue* bool_list, FlValue* map); gboolean core_tests_pigeon_test_all_types_get_a_bool( CoreTestsPigeonTestAllTypes* self); @@ -58,19 +59,31 @@ const int64_t* core_tests_pigeon_test_all_types_get_a8_byte_array( const double* core_tests_pigeon_test_all_types_get_a_float_array( CoreTestsPigeonTestAllTypes* self, size_t* length); +CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( + CoreTestsPigeonTestAllTypes* self); + +const gchar* core_tests_pigeon_test_all_types_get_a_string( + CoreTestsPigeonTestAllTypes* self); + +FlValue* core_tests_pigeon_test_all_types_get_an_object( + CoreTestsPigeonTestAllTypes* self); + FlValue* core_tests_pigeon_test_all_types_get_list( CoreTestsPigeonTestAllTypes* self); -FlValue* core_tests_pigeon_test_all_types_get_a_map( +FlValue* core_tests_pigeon_test_all_types_get_string_list( CoreTestsPigeonTestAllTypes* self); -CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( +FlValue* core_tests_pigeon_test_all_types_get_int_list( CoreTestsPigeonTestAllTypes* self); -const gchar* core_tests_pigeon_test_all_types_get_a_string( +FlValue* core_tests_pigeon_test_all_types_get_double_list( CoreTestsPigeonTestAllTypes* self); -FlValue* core_tests_pigeon_test_all_types_get_an_object( +FlValue* core_tests_pigeon_test_all_types_get_bool_list( + CoreTestsPigeonTestAllTypes* self); + +FlValue* core_tests_pigeon_test_all_types_get_map( CoreTestsPigeonTestAllTypes* self); // A class containing all supported nullable types. @@ -86,12 +99,13 @@ core_tests_pigeon_test_all_nullable_types_new( const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, const double* a_nullable_float_array, size_t a_nullable_float_array_length, - FlValue* a_nullable_list, FlValue* a_nullable_map, FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, FlValue* nullable_map_with_object, CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, FlValue* a_nullable_object, - CoreTestsPigeonTestAllNullableTypes* all_nullable_types); + CoreTestsPigeonTestAllNullableTypes* all_nullable_types, FlValue* list, + FlValue* string_list, FlValue* int_list, FlValue* double_list, + FlValue* bool_list, FlValue* nested_class_list, FlValue* map); gboolean* core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool( CoreTestsPigeonTestAllNullableTypes* self); @@ -121,12 +135,6 @@ const double* core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array( CoreTestsPigeonTestAllNullableTypes* self, size_t* length); -FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_list( - CoreTestsPigeonTestAllNullableTypes* self); - -FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_map( - CoreTestsPigeonTestAllNullableTypes* self); - FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list( CoreTestsPigeonTestAllNullableTypes* self); @@ -151,6 +159,27 @@ CoreTestsPigeonTestAllNullableTypes* core_tests_pigeon_test_all_nullable_types_get_all_nullable_types( CoreTestsPigeonTestAllNullableTypes* self); +FlValue* core_tests_pigeon_test_all_nullable_types_get_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_string_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_int_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_double_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_nested_class_list( + CoreTestsPigeonTestAllNullableTypes* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_get_map( + CoreTestsPigeonTestAllNullableTypes* self); + // The primary purpose for this class is to ensure coverage of Swift structs // with nullable items, as the primary [AllNullableTypes] class is being used to // test Swift classes. @@ -167,11 +196,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( const int32_t* a_nullable4_byte_array, size_t a_nullable4_byte_array_length, const int64_t* a_nullable8_byte_array, size_t a_nullable8_byte_array_length, const double* a_nullable_float_array, size_t a_nullable_float_array_length, - FlValue* a_nullable_list, FlValue* a_nullable_map, FlValue* nullable_nested_list, FlValue* nullable_map_with_annotations, FlValue* nullable_map_with_object, CoreTestsPigeonTestAnEnum* a_nullable_enum, const gchar* a_nullable_string, - FlValue* a_nullable_object); + FlValue* a_nullable_object, FlValue* list, FlValue* string_list, + FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* map); gboolean* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_bool( @@ -205,14 +234,6 @@ const double* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float_array( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); -FlValue* -core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - -FlValue* -core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_map( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); @@ -237,6 +258,28 @@ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_object( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); +FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_string_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_int_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_double_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* +core_tests_pigeon_test_all_nullable_types_without_recursion_get_bool_list( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + +FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_map( + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + // A class for testing nested class handling. // // This is needed to test nested nullable and non-nullable classes, From 297df347256556404496e85bbb19fafdb8793dbe Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 13:15:38 +1200 Subject: [PATCH 072/127] Add missing type casts --- packages/pigeon/lib/gobject_generator.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 1d0a25a1b5b8..d58a84a93ad1 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -518,7 +518,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectNew(indent, module, classDefinition.name); for (final NamedType field in classDefinition.fields) { final String fieldName = _getFieldName(field.name); - final String value = _referenceValue(field.type, fieldName, + final String value = _referenceValue(module, field.type, fieldName, lengthVariableName: '${fieldName}_length'); if (_isNullablePrimitiveType(field.type)) { @@ -896,7 +896,7 @@ class GObjectSourceGenerator extends StructuredGenerator { }); } else { indent.writeln( - '*return_value = ${_referenceValue(method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); + '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); } if (_isNumericListType(method.returnType)) { indent.writeln('*return_value_length = fl_value_get_length(r);'); @@ -1109,7 +1109,8 @@ class GObjectSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { _writeObjectNew(indent, module, api.name); - indent.writeln('self->messenger = g_object_ref(messenger);'); + indent.writeln( + 'self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); indent.writeln('self->user_data_free_func = user_data_free_func;'); @@ -1474,10 +1475,11 @@ String _getDefaultValue(String module, TypeDeclaration type, // Returns code to copy the native data type stored in [variableName]. // // [lengthVariableName] must be provided for the typed numeric *List types. -String _referenceValue(TypeDeclaration type, String variableName, +String _referenceValue(String module, TypeDeclaration type, String variableName, {String? lengthVariableName}) { if (type.isClass) { - return 'g_object_ref($variableName)'; + final String castMacro = _getClassCastMacro(module, type.baseName); + return '$castMacro(g_object_ref($variableName))'; } else if (_isFlValueWrappedType(type)) { return 'fl_value_ref($variableName)'; } else if (type.baseName == 'String') { From 215e7c2b46a21afe18bd3d704a60786f108fc619 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 13:25:43 +1200 Subject: [PATCH 073/127] Replace g_memdup2 with g_memdup - the former is not on the CI --- packages/pigeon/lib/gobject_generator.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index d58a84a93ad1..5de86f315af7 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1485,15 +1485,15 @@ String _referenceValue(String module, TypeDeclaration type, String variableName, } else if (type.baseName == 'String') { return 'g_strdup($variableName)'; } else if (type.baseName == 'Uint8List') { - return 'static_cast(g_memdup2($variableName, $lengthVariableName))'; + return 'static_cast(g_memdup($variableName, $lengthVariableName))'; } else if (type.baseName == 'Int32List') { - return 'static_cast(g_memdup2($variableName, sizeof(int32_t) * $lengthVariableName))'; + return 'static_cast(g_memdup($variableName, sizeof(int32_t) * $lengthVariableName))'; } else if (type.baseName == 'Int64List') { - return 'static_cast(g_memdup2($variableName, sizeof(int64_t) * $lengthVariableName))'; + return 'static_cast(g_memdup($variableName, sizeof(int64_t) * $lengthVariableName))'; } else if (type.baseName == 'Float32List') { - return 'static_cast(g_memdup2($variableName, sizeof(float) * $lengthVariableName))'; + return 'static_cast(g_memdup($variableName, sizeof(float) * $lengthVariableName))'; } else if (type.baseName == 'Float64List') { - return 'static_cast(g_memdup2($variableName, sizeof(double) * $lengthVariableName))'; + return 'static_cast(g_memdup($variableName, sizeof(double) * $lengthVariableName))'; } else { return variableName; } From d22bfca2b5f27ecf294381aa11590d04fa23f0a7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 13:40:24 +1200 Subject: [PATCH 074/127] Update generated code --- .../linux/pigeon/core_tests.gen.cc | 72 ++++++++++--------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index dc7574cebfc9..ea1f3296c6ad 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -74,16 +74,16 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( self->an_int64 = an_int64; self->a_double = a_double; self->a_byte_array = - static_cast(g_memdup2(a_byte_array, a_byte_array_length)); + static_cast(g_memdup(a_byte_array, a_byte_array_length)); self->a_byte_array_length = a_byte_array_length; self->a4_byte_array = static_cast( - g_memdup2(a4_byte_array, sizeof(int32_t) * a4_byte_array_length)); + g_memdup(a4_byte_array, sizeof(int32_t) * a4_byte_array_length)); self->a4_byte_array_length = a4_byte_array_length; self->a8_byte_array = static_cast( - g_memdup2(a8_byte_array, sizeof(int64_t) * a8_byte_array_length)); + g_memdup(a8_byte_array, sizeof(int64_t) * a8_byte_array_length)); self->a8_byte_array_length = a8_byte_array_length; self->a_float_array = static_cast( - g_memdup2(a_float_array, sizeof(double) * a_float_array_length)); + g_memdup(a_float_array, sizeof(double) * a_float_array_length)); self->a_float_array_length = a_float_array_length; self->an_enum = an_enum; self->a_string = g_strdup(a_string); @@ -395,15 +395,15 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_double = nullptr; } self->a_nullable_byte_array = static_cast( - g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); + g_memdup(a_nullable_byte_array, a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(g_memdup2( + self->a_nullable4_byte_array = static_cast(g_memdup( a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(g_memdup2( + self->a_nullable8_byte_array = static_cast(g_memdup( a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(g_memdup2( + self->a_nullable_float_array = static_cast(g_memdup( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; self->nullable_nested_list = fl_value_ref(nullable_nested_list); @@ -419,7 +419,8 @@ core_tests_pigeon_test_all_nullable_types_new( } self->a_nullable_string = g_strdup(a_nullable_string); self->a_nullable_object = fl_value_ref(a_nullable_object); - self->all_nullable_types = g_object_ref(all_nullable_types); + self->all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(all_nullable_types)); self->list = fl_value_ref(list); self->string_list = fl_value_ref(string_list); self->int_list = fl_value_ref(int_list); @@ -908,15 +909,15 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->a_nullable_double = nullptr; } self->a_nullable_byte_array = static_cast( - g_memdup2(a_nullable_byte_array, a_nullable_byte_array_length)); + g_memdup(a_nullable_byte_array, a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(g_memdup2( + self->a_nullable4_byte_array = static_cast(g_memdup( a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(g_memdup2( + self->a_nullable8_byte_array = static_cast(g_memdup( a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(g_memdup2( + self->a_nullable_float_array = static_cast(g_memdup( a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; self->nullable_nested_list = fl_value_ref(nullable_nested_list); @@ -1353,10 +1354,12 @@ core_tests_pigeon_test_all_classes_wrapper_new( CoreTestsPigeonTestAllClassesWrapper* self = CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER(g_object_new( core_tests_pigeon_test_all_classes_wrapper_get_type(), nullptr)); - self->all_nullable_types = g_object_ref(all_nullable_types); + self->all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(all_nullable_types)); self->all_nullable_types_without_recursion = - g_object_ref(all_nullable_types_without_recursion); - self->all_types = g_object_ref(all_types); + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + g_object_ref(all_nullable_types_without_recursion)); + self->all_types = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref(all_types)); return self; } @@ -9883,7 +9886,7 @@ core_tests_pigeon_test_host_integration_core_api_new( CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_host_integration_core_api_get_type(), nullptr)); - self->messenger = g_object_ref(messenger); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; @@ -12585,8 +12588,8 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( return FALSE; } - *return_value = g_object_ref( - CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(r))); + *return_value = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref( + CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(r)))); return TRUE; } @@ -12619,8 +12622,9 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_fini return FALSE; } - *return_value = g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(r))); + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(r)))); return TRUE; } @@ -12659,8 +12663,9 @@ core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types return FALSE; } - *return_value = g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(r))); + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(r)))); return TRUE; } @@ -12696,9 +12701,9 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_with return FALSE; } - *return_value = + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(r))); + fl_value_get_custom_value_object(r)))); return TRUE; } @@ -12739,9 +12744,9 @@ core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types return FALSE; } - *return_value = + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(r))); + fl_value_get_custom_value_object(r)))); return TRUE; } @@ -12888,7 +12893,7 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( } *return_value = static_cast( - g_memdup2(fl_value_get_uint8_list(r), fl_value_get_length(r))); + g_memdup(fl_value_get_uint8_list(r), fl_value_get_length(r))); *return_value_length = fl_value_get_length(r); return TRUE; @@ -13148,7 +13153,7 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_fin } *return_value = static_cast( - g_memdup2(fl_value_get_uint8_list(r), fl_value_get_length(r))); + g_memdup(fl_value_get_uint8_list(r), fl_value_get_length(r))); *return_value_length = fl_value_get_length(r); return TRUE; @@ -13435,7 +13440,7 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); - self->messenger = g_object_ref(messenger); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; @@ -13644,7 +13649,7 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( GDestroyNotify user_data_free_func) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); - self->messenger = g_object_ref(messenger); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; @@ -13789,8 +13794,9 @@ gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( return FALSE; } - *return_value = g_object_ref( - CORE_TESTS_PIGEON_TEST_TEST_MESSAGE(fl_value_get_custom_value_object(r))); + *return_value = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + g_object_ref(CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + fl_value_get_custom_value_object(r)))); return TRUE; } From 8152a6b821cd8e18d0dd918c9fc4fc190790d801 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 13:43:48 +1200 Subject: [PATCH 075/127] Add missing casts --- .../pigeon/platform_tests/test_plugin/linux/test_plugin.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index ffa11a7086a3..15298f14244f 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -37,8 +37,9 @@ typedef struct { static CallbackData* callback_data_new( TestPlugin* self, FlBasicMessageChannelResponseHandle* response_handle) { CallbackData* data = g_new0(CallbackData, 1); - data->self = g_object_ref(self); - data->response_handle = g_object_ref(response_handle); + data->self = TEST_PLUGIN(g_object_ref(self)); + data->response_handle = + FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle)); return data; } From 62cd8fb89827044d20240f37383d82f7314ff3ca Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 15:00:29 +1200 Subject: [PATCH 076/127] Codec needs to be namespaced --- packages/pigeon/lib/gobject_generator.dart | 52 +++++++++++++--------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 5de86f315af7..9c4361d1a538 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -13,6 +13,9 @@ const String _commentPrefix = '//'; const DocumentCommentSpecification _docCommentSpec = DocumentCommentSpecification(_commentPrefix); +/// Name for codec class. +const String _codecBaseName = 'MessageCodec'; + /// Options that control how GObject code will be generated. class GObjectOptions { /// Creates a [GObjectOptions] object @@ -623,21 +626,21 @@ class GObjectSourceGenerator extends StructuredGenerator { required String dartPackageName, }) { final String module = _getModule(generatorOptions, dartPackageName); - const String codecModule = 'Pigeon'; - const String codecClassName = 'MessageCodec'; + final String codecClassName = _getClassName(module, _codecBaseName); + final String codecMethodPrefix = _getMethodPrefix(module, _codecBaseName); final Iterable customTypes = getEnumeratedTypes(root); indent.newln(); - _writeDeclareFinalType(indent, codecModule, codecClassName, + _writeDeclareFinalType(indent, module, _codecBaseName, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeObjectStruct(indent, codecModule, codecClassName, () {}, + _writeObjectStruct(indent, module, _codecBaseName, () {}, parentClassName: 'FlStandardMessageCodec'); indent.newln(); - _writeDefineType(indent, codecModule, codecClassName, + _writeDefineType(indent, module, _codecBaseName, parentType: 'fl_standard_message_codec_get_type()'); for (final EnumeratedType customType in customTypes) { @@ -649,7 +652,7 @@ class GObjectSourceGenerator extends StructuredGenerator { ? '$customTypeName*' : 'FlValue*'; indent.writeScoped( - 'static gboolean pigeon_message_codec_write_$snakeCustomTypeName(FlStandardMessageCodec* codec, GByteArray* buffer, $valueType value, GError** error) {', + 'static gboolean ${codecMethodPrefix}_write_$snakeCustomTypeName(FlStandardMessageCodec* codec, GByteArray* buffer, $valueType value, GError** error) {', '}', () { indent.writeln('uint8_t type = ${customType.enumeration};'); indent.writeln('g_byte_array_append(buffer, &type, sizeof(uint8_t));'); @@ -667,7 +670,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - 'static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', + 'static gboolean ${codecMethodPrefix}_write_value(FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) {', '}', () { indent.writeScoped( 'if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) {', '}', () { @@ -684,10 +687,10 @@ class GObjectSourceGenerator extends StructuredGenerator { _getClassCastMacro(module, customType.name); if (customType.type == CustomTypes.customClass) { indent.writeln( - 'return pigeon_message_codec_write_$snakeCustomTypeName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); + 'return ${codecMethodPrefix}_write_$snakeCustomTypeName(codec, buffer, $castMacro(fl_value_get_custom_value_object(value)), error);'); } else if (customType.type == CustomTypes.customEnum) { indent.writeln( - 'return pigeon_message_codec_write_$snakeCustomTypeName(codec, buffer, reinterpret_cast(const_cast(fl_value_get_custom_value(value))), error);'); + 'return ${codecMethodPrefix}_write_$snakeCustomTypeName(codec, buffer, reinterpret_cast(const_cast(fl_value_get_custom_value(value))), error);'); } }); } @@ -696,7 +699,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class)->write_value(codec, buffer, value, error);'); + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->write_value(codec, buffer, value, error);'); }); for (final EnumeratedType customType in customTypes) { @@ -705,7 +708,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _snakeCaseFromCamelCase(customTypeName); indent.newln(); indent.writeScoped( - 'static FlValue* pigeon_message_codec_read_$snakeCustomTypeName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', + 'static FlValue* ${codecMethodPrefix}_read_$snakeCustomTypeName(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) {', '}', () { if (customType.type == CustomTypes.customClass) { indent.writeln( @@ -733,7 +736,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - 'static FlValue* pigeon_message_codec_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', + 'static FlValue* ${codecMethodPrefix}_read_value_of_type(FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) {', '}', () { indent.writeScoped('switch (type) {', '}', () { for (final EnumeratedType customType in customTypes) { @@ -743,33 +746,33 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('case ${customType.enumeration}:'); indent.nest(1, () { indent.writeln( - 'return pigeon_message_codec_read_$snakeCustomTypeName(codec, buffer, offset, error);'); + 'return ${codecMethodPrefix}_read_$snakeCustomTypeName(codec, buffer, offset, error);'); }); } indent.writeln('default:'); indent.nest(1, () { indent.writeln( - 'return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); + 'return FL_STANDARD_MESSAGE_CODEC_CLASS(${codecMethodPrefix}_parent_class)->read_value_of_type(codec, buffer, offset, type, error);'); }); }); }); indent.newln(); - _writeInit(indent, codecModule, codecClassName, () {}); + _writeInit(indent, module, _codecBaseName, () {}); indent.newln(); - _writeClassInit(indent, codecModule, codecClassName, () { + _writeClassInit(indent, module, _codecBaseName, () { indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = pigeon_message_codec_write_value;'); + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = ${codecMethodPrefix}_write_value;'); indent.writeln( - 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = pigeon_message_codec_read_value_of_type;'); + 'FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = ${codecMethodPrefix}_read_value_of_type;'); }, hasDispose: false); indent.newln(); indent.writeScoped( - 'static PigeonMessageCodec* pigeon_message_codec_new() {', '}', () { - _writeObjectNew(indent, codecModule, codecClassName); + 'static $codecClassName* ${codecMethodPrefix}_new() {', '}', () { + _writeObjectNew(indent, module, _codecBaseName); indent.writeln('return self;'); }); } @@ -785,6 +788,8 @@ class GObjectSourceGenerator extends StructuredGenerator { final String module = _getModule(generatorOptions, dartPackageName); final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); + final String codecClassName = _getClassName(module, _codecBaseName); + final String codecMethodPrefix = _getMethodPrefix(module, _codecBaseName); indent.newln(); _writeObjectStruct(indent, module, api.name, () { @@ -812,7 +817,7 @@ class GObjectSourceGenerator extends StructuredGenerator { () { _writeObjectNew(indent, module, api.name); indent.writeln( - 'g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new();'); + 'g_autoptr($codecClassName) message_codec = ${codecMethodPrefix}_new();'); indent.writeln( 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec(FL_STANDARD_MESSAGE_CODEC(message_codec));'); indent.writeln( @@ -923,6 +928,9 @@ class GObjectSourceGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, api.name); final String vtableName = _getVTableName(module, api.name); + final String codecClassName = _getClassName(module, _codecBaseName); + final String codecMethodPrefix = _getMethodPrefix(module, _codecBaseName); + for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -1117,7 +1125,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeln( - 'g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new();'); + 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); final String channelName = From abef09e15f3dae41e62f5caa6663d7a5b605354f Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 15:18:40 +1200 Subject: [PATCH 077/127] Update generated code --- .../linux/pigeon/core_tests.gen.cc | 112 ++++++++++-------- 1 file changed, 65 insertions(+), 47 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index ea1f3296c6ad..661abd500acf 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -1483,17 +1483,21 @@ core_tests_pigeon_test_test_message_new_from_list(FlValue* values) { return core_tests_pigeon_test_test_message_new(test_list); } -G_DECLARE_FINAL_TYPE(PigeonMessageCodec, pigeon_message_codec, PIGEON, - MESSAGE_CODEC, FlStandardMessageCodec) +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestMessageCodec, + core_tests_pigeon_test_message_codec, + CORE_TESTS_PIGEON_TEST, MESSAGE_CODEC, + FlStandardMessageCodec) -struct _PigeonMessageCodec { +struct _CoreTestsPigeonTestMessageCodec { FlStandardMessageCodec parent_instance; }; -G_DEFINE_TYPE(PigeonMessageCodec, pigeon_message_codec, +G_DEFINE_TYPE(CoreTestsPigeonTestMessageCodec, + core_tests_pigeon_test_message_codec, fl_standard_message_codec_get_type()) -static gboolean pigeon_message_codec_write_core_tests_pigeon_test_all_types( +static gboolean +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllTypes* value, GError** error) { uint8_t type = 129; @@ -1503,7 +1507,7 @@ static gboolean pigeon_message_codec_write_core_tests_pigeon_test_all_types( } static gboolean -pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types( +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypes* value, GError** error) { uint8_t type = 130; @@ -1514,7 +1518,7 @@ pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types( } static gboolean -pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* value, GError** error) { @@ -1527,7 +1531,7 @@ pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_rec } static gboolean -pigeon_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestAllClassesWrapper* value, GError** error) { uint8_t type = 132; @@ -1537,7 +1541,8 @@ pigeon_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean pigeon_message_codec_write_core_tests_pigeon_test_test_message( +static gboolean +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GByteArray* buffer, CoreTestsPigeonTestTestMessage* value, GError** error) { uint8_t type = 133; @@ -1547,7 +1552,8 @@ static gboolean pigeon_message_codec_write_core_tests_pigeon_test_test_message( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean pigeon_message_codec_write_core_tests_pigeon_test_an_enum( +static gboolean +core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_an_enum( FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) { uint8_t type = 134; @@ -1555,44 +1561,43 @@ static gboolean pigeon_message_codec_write_core_tests_pigeon_test_an_enum( return fl_standard_message_codec_write_value(codec, buffer, value, error); } -static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, - GByteArray* buffer, - FlValue* value, - GError** error) { +static gboolean core_tests_pigeon_test_message_codec_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 129: - return pigeon_message_codec_write_core_tests_pigeon_test_all_types( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value)), error); case 130: - return pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_nullable_types( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value)), error); case 131: - return pigeon_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value)), error); case 132: - return pigeon_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_all_classes_wrapper( codec, buffer, CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( fl_value_get_custom_value_object(value)), error); case 133: - return pigeon_message_codec_write_core_tests_pigeon_test_test_message( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_test_message( codec, buffer, CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( fl_value_get_custom_value_object(value)), error); case 134: - return pigeon_message_codec_write_core_tests_pigeon_test_an_enum( + return core_tests_pigeon_test_message_codec_write_core_tests_pigeon_test_an_enum( codec, buffer, reinterpret_cast( const_cast(fl_value_get_custom_value(value))), @@ -1600,11 +1605,13 @@ static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, } } - return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_message_codec_parent_class) ->write_value(codec, buffer, value, error); } -static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_all_types( +static FlValue* +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1625,7 +1632,7 @@ static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_all_types( } static FlValue* -pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types( +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_types( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1646,7 +1653,7 @@ pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types( } static FlValue* -pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1668,7 +1675,7 @@ pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recu } static FlValue* -pigeon_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1688,7 +1695,8 @@ pigeon_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( return fl_value_new_custom_object_take(132, G_OBJECT(value)); } -static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_test_message( +static FlValue* +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_test_message( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -1708,7 +1716,8 @@ static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_test_message( return fl_value_new_custom_object_take(133, G_OBJECT(value)); } -static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_an_enum( +static FlValue* +core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_an_enum( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { return fl_value_new_custom( @@ -1716,46 +1725,50 @@ static FlValue* pigeon_message_codec_read_core_tests_pigeon_test_an_enum( (GDestroyNotify)fl_value_unref); } -static FlValue* pigeon_message_codec_read_value_of_type( +static FlValue* core_tests_pigeon_test_message_codec_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { case 129: - return pigeon_message_codec_read_core_tests_pigeon_test_all_types( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_types( codec, buffer, offset, error); case 130: - return pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_types( codec, buffer, offset, error); case 131: - return pigeon_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_types_without_recursion( codec, buffer, offset, error); case 132: - return pigeon_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_classes_wrapper( codec, buffer, offset, error); case 133: - return pigeon_message_codec_read_core_tests_pigeon_test_test_message( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_test_message( codec, buffer, offset, error); case 134: - return pigeon_message_codec_read_core_tests_pigeon_test_an_enum( + return core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_an_enum( codec, buffer, offset, error); default: - return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS( + core_tests_pigeon_test_message_codec_parent_class) ->read_value_of_type(codec, buffer, offset, type, error); } } -static void pigeon_message_codec_init(PigeonMessageCodec* self) {} +static void core_tests_pigeon_test_message_codec_init( + CoreTestsPigeonTestMessageCodec* self) {} -static void pigeon_message_codec_class_init(PigeonMessageCodecClass* klass) { +static void core_tests_pigeon_test_message_codec_class_init( + CoreTestsPigeonTestMessageCodecClass* klass) { FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - pigeon_message_codec_write_value; + core_tests_pigeon_test_message_codec_write_value; FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - pigeon_message_codec_read_value_of_type; + core_tests_pigeon_test_message_codec_read_value_of_type; } -static PigeonMessageCodec* pigeon_message_codec_new() { - PigeonMessageCodec* self = PIGEON_MESSAGE_CODEC( - g_object_new(pigeon_message_codec_get_type(), nullptr)); +static CoreTestsPigeonTestMessageCodec* +core_tests_pigeon_test_message_codec_new() { + CoreTestsPigeonTestMessageCodec* self = CORE_TESTS_PIGEON_TEST_MESSAGE_CODEC( + g_object_new(core_tests_pigeon_test_message_codec_get_type(), nullptr)); return self; } @@ -9891,7 +9904,8 @@ core_tests_pigeon_test_host_integration_core_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); self->noop_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop", @@ -12472,7 +12486,8 @@ core_tests_pigeon_test_flutter_integration_core_api_new( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_flutter_integration_core_api_get_type(), nullptr)); - g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); + g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = + core_tests_pigeon_test_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec( FL_STANDARD_MESSAGE_CODEC(message_codec)); @@ -13445,7 +13460,8 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); self->noop_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop", @@ -13654,7 +13670,8 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); self->echo_channel = fl_basic_message_channel_new( messenger, "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo", @@ -13761,7 +13778,8 @@ core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger) { CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(g_object_new( core_tests_pigeon_test_flutter_small_api_get_type(), nullptr)); - g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); + g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = + core_tests_pigeon_test_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec( FL_STANDARD_MESSAGE_CODEC(message_codec)); From 63cfd337c1ffb25ff4e2d0435dc83eea772834eb Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 15:39:24 +1200 Subject: [PATCH 078/127] Fix missing enumeration --- packages/pigeon/lib/gobject_generator.dart | 20 ++- .../linux/pigeon/core_tests.gen.cc | 143 ++++++++++-------- 2 files changed, 91 insertions(+), 72 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 9c4361d1a538..f1b6cbe8fcf5 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -573,7 +573,7 @@ class GObjectSourceGenerator extends StructuredGenerator { for (final NamedType field in classDefinition.fields) { final String fieldName = _getFieldName(field.name); indent.writeln( - 'fl_value_append_take(values, ${_makeFlValue(module, field.type, 'self->$fieldName', lengthVariableName: 'self->${fieldName}_length')});'); + 'fl_value_append_take(values, ${_makeFlValue(root, module, field.type, 'self->$fieldName', lengthVariableName: 'self->${fieldName}_length')});'); } indent.writeln('return values;'); }); @@ -848,7 +848,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('g_autoptr(FlValue) args = fl_value_new_list();'); for (final Parameter param in method.parameters) { final String name = _snakeCaseFromCamelCase(param.name); - final String value = _makeFlValue(module, param.type, name, + final String value = _makeFlValue(root, module, param.type, name, lengthVariableName: '${name}_length'); indent.writeln('fl_value_append_take(args, $value);'); } @@ -974,7 +974,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectNew(indent, module, responseName); indent.writeln('self->value = fl_value_new_list();'); indent.writeln( - "fl_value_append_take(self->value, ${_makeFlValue(module, method.returnType, 'return_value', lengthVariableName: 'return_value_length')});"); + "fl_value_append_take(self->value, ${_makeFlValue(root, module, method.returnType, 'return_value', lengthVariableName: 'return_value_length')});"); indent.writeln('return self;'); }); @@ -1507,14 +1507,24 @@ String _referenceValue(String module, TypeDeclaration type, String variableName, } } +int _getTypeEnumeration(Root root, TypeDeclaration type) { + return getEnumeratedTypes(root) + .firstWhere((t) => + t.associatedClass == type.associatedClass || + t.associatedEnum == type.associatedEnum) + .enumeration; +} + // Returns code to convert the native data type stored in [variableName] to a FlValue. // // [lengthVariableName] must be provided for the typed numeric *List types. -String _makeFlValue(String module, TypeDeclaration type, String variableName, +String _makeFlValue( + Root root, String module, TypeDeclaration type, String variableName, {String? lengthVariableName}) { final String value; if (type.isClass) { - value = 'fl_value_new_custom_object(0, G_OBJECT($variableName))'; + var enumeration = _getTypeEnumeration(root, type); + value = 'fl_value_new_custom_object($enumeration, G_OBJECT($variableName))'; } else if (type.isEnum) { value = type.isNullable ? 'fl_value_new_int(static_cast(*$variableName))' diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 661abd500acf..444ad2d1f652 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -223,8 +223,8 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_append_take( values, fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); - fl_value_append_take(values, - fl_value_new_int(static_cast(self->an_enum))); + fl_value_append_take( + values, fl_value_new_custom(0, self->an_enum, (GDestroyNotify)g_free)); fl_value_append_take(values, fl_value_new_string(self->a_string)); fl_value_append_take(values, fl_value_ref(self->an_object)); fl_value_append_take(values, fl_value_ref(self->list)); @@ -643,11 +643,11 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take( - values, - self->a_nullable_enum != nullptr - ? fl_value_new_int(static_cast(*self->a_nullable_enum)) - : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_enum != nullptr + ? fl_value_new_custom(0, self->a_nullable_enum, + (GDestroyNotify)g_free) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -655,10 +655,11 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( fl_value_append_take(values, self->a_nullable_object != nullptr ? fl_value_ref(self->a_nullable_object) : fl_value_new_null()); - fl_value_append_take(values, self->all_nullable_types != nullptr - ? fl_value_new_custom_object( - 0, G_OBJECT(self->all_nullable_types)) - : fl_value_new_null()); + fl_value_append_take( + values, + self->all_nullable_types != nullptr + ? fl_value_new_custom_object(129, G_OBJECT(self->all_nullable_types)) + : fl_value_new_null()); fl_value_append_take(values, self->list != nullptr ? fl_value_ref(self->list) : fl_value_new_null()); fl_value_append_take(values, self->string_list != nullptr @@ -1172,11 +1173,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take( - values, - self->a_nullable_enum != nullptr - ? fl_value_new_int(static_cast(*self->a_nullable_enum)) - : fl_value_new_null()); + fl_value_append_take(values, + self->a_nullable_enum != nullptr + ? fl_value_new_custom(0, self->a_nullable_enum, + (GDestroyNotify)g_free) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -1391,15 +1392,16 @@ static FlValue* core_tests_pigeon_test_all_classes_wrapper_to_list( CoreTestsPigeonTestAllClassesWrapper* self) { FlValue* values = fl_value_new_list(); fl_value_append_take(values, fl_value_new_custom_object( - 0, G_OBJECT(self->all_nullable_types))); + 129, G_OBJECT(self->all_nullable_types))); fl_value_append_take( - values, self->all_nullable_types_without_recursion != nullptr - ? fl_value_new_custom_object( - 0, G_OBJECT(self->all_nullable_types_without_recursion)) - : fl_value_new_null()); + values, + self->all_nullable_types_without_recursion != nullptr + ? fl_value_new_custom_object( + 129, G_OBJECT(self->all_nullable_types_without_recursion)) + : fl_value_new_null()); fl_value_append_take( values, self->all_types != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(self->all_types)) + ? fl_value_new_custom_object(129, G_OBJECT(self->all_types)) : fl_value_new_null()); return values; } @@ -1872,7 +1874,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -2618,7 +2620,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -2679,8 +2681,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_append_take( + self->value, + fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); return self; } @@ -2938,7 +2941,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_respons self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -3007,7 +3010,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -3142,7 +3145,7 @@ core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_r nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -3208,7 +3211,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_re nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -3275,7 +3278,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_wi nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -3864,9 +3867,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) + : fl_value_new_null()); return self; } @@ -4686,8 +4690,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_append_take( + self->value, + fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); return self; } @@ -4971,7 +4976,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -5046,7 +5051,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -5122,7 +5127,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -5775,9 +5780,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) + : fl_value_new_null()); return self; } @@ -6061,7 +6067,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_res nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -6136,7 +6142,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -6211,7 +6217,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -6286,7 +6292,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(return_value)) + ? fl_value_new_custom_object(129, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -6361,7 +6367,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(0, G_OBJECT(return_value))); + fl_value_new_custom_object(129, G_OBJECT(return_value))); return self; } @@ -6923,8 +6929,9 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_append_take( + self->value, + fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); return self; } @@ -7517,9 +7524,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) + : fl_value_new_null()); return self; } @@ -12583,7 +12591,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, - fl_value_new_custom_object(0, G_OBJECT(everything))); + fl_value_new_custom_object(129, G_OBJECT(everything))); fl_method_channel_invoke_method(self->channel, "echoAllTypes", args, cancellable, callback, user_data); } @@ -12614,10 +12622,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types CoreTestsPigeonTestAllNullableTypes* everything, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, - everything != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(everything)) - : fl_value_new_null()); + fl_value_append_take( + args, everything != nullptr + ? fl_value_new_custom_object(129, G_OBJECT(everything)) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoAllNullableTypes", args, cancellable, callback, user_data); } @@ -12691,10 +12699,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, - everything != nullptr - ? fl_value_new_custom_object(0, G_OBJECT(everything)) - : fl_value_new_null()); + fl_value_append_take( + args, everything != nullptr + ? fl_value_new_custom_object(129, G_OBJECT(everything)) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoAllNullableTypesWithoutRecursion", args, cancellable, callback, user_data); @@ -12977,7 +12985,8 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_int(static_cast(an_enum))); + fl_value_append_take(args, + fl_value_new_custom(0, an_enum, (GDestroyNotify)g_free)); fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, callback, user_data); } @@ -13241,10 +13250,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, - an_enum != nullptr - ? fl_value_new_int(static_cast(*an_enum)) - : fl_value_new_null()); + fl_value_append_take( + args, an_enum != nullptr + ? fl_value_new_custom(0, an_enum, (GDestroyNotify)g_free) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, cancellable, callback, user_data); } @@ -13793,7 +13802,7 @@ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_custom_object(0, G_OBJECT(msg))); + fl_value_append_take(args, fl_value_new_custom_object(129, G_OBJECT(msg))); fl_method_channel_invoke_method(self->channel, "echoWrappedList", args, cancellable, callback, user_data); } From dc454108d0875c4355d706fe6210d156e89897ea Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 15:43:07 +1200 Subject: [PATCH 079/127] Regen --- .../linux/pigeon/core_tests.gen.cc | 71 +++++++++---------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 444ad2d1f652..3e9cbf5cc9be 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -223,8 +223,8 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_append_take( values, fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); - fl_value_append_take( - values, fl_value_new_custom(0, self->an_enum, (GDestroyNotify)g_free)); + fl_value_append_take(values, + fl_value_new_int(static_cast(self->an_enum))); fl_value_append_take(values, fl_value_new_string(self->a_string)); fl_value_append_take(values, fl_value_ref(self->an_object)); fl_value_append_take(values, fl_value_ref(self->list)); @@ -643,11 +643,11 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take(values, - self->a_nullable_enum != nullptr - ? fl_value_new_custom(0, self->a_nullable_enum, - (GDestroyNotify)g_free) - : fl_value_new_null()); + fl_value_append_take( + values, + self->a_nullable_enum != nullptr + ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -1173,11 +1173,11 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( self->nullable_map_with_object != nullptr ? fl_value_ref(self->nullable_map_with_object) : fl_value_new_null()); - fl_value_append_take(values, - self->a_nullable_enum != nullptr - ? fl_value_new_custom(0, self->a_nullable_enum, - (GDestroyNotify)g_free) - : fl_value_new_null()); + fl_value_append_take( + values, + self->a_nullable_enum != nullptr + ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr ? fl_value_new_string(self->a_nullable_string) @@ -2681,9 +2681,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take( - self->value, - fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -3867,10 +3866,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, - return_value != nullptr - ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) - : fl_value_new_null()); + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -4690,9 +4688,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take( - self->value, - fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -5780,10 +5777,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, - return_value != nullptr - ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) - : fl_value_new_null()); + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -6929,9 +6925,8 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_get_type(), nullptr)); self->value = fl_value_new_list(); - fl_value_append_take( - self->value, - fl_value_new_custom(0, return_value, (GDestroyNotify)g_free)); + fl_value_append_take(self->value, + fl_value_new_int(static_cast(return_value))); return self; } @@ -7524,10 +7519,9 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, - return_value != nullptr - ? fl_value_new_custom(0, return_value, (GDestroyNotify)g_free) - : fl_value_new_null()); + self->value, return_value != nullptr + ? fl_value_new_int(static_cast(*return_value)) + : fl_value_new_null()); return self; } @@ -12985,8 +12979,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, - fl_value_new_custom(0, an_enum, (GDestroyNotify)g_free)); + fl_value_append_take(args, fl_value_new_int(static_cast(an_enum))); fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, callback, user_data); } @@ -13250,10 +13243,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take( - args, an_enum != nullptr - ? fl_value_new_custom(0, an_enum, (GDestroyNotify)g_free) - : fl_value_new_null()); + fl_value_append_take(args, + an_enum != nullptr + ? fl_value_new_int(static_cast(*an_enum)) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, cancellable, callback, user_data); } From 0a3cae7067b45d2fe7316dd2b87894003582d451 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 15:59:34 +1200 Subject: [PATCH 080/127] Replace g_memdup with malloc - works on all versions --- packages/pigeon/lib/gobject_generator.dart | 10 ++-- .../linux/pigeon/core_tests.gen.cc | 47 ++++++++++++------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index f1b6cbe8fcf5..fc9b3a878ebd 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1493,15 +1493,15 @@ String _referenceValue(String module, TypeDeclaration type, String variableName, } else if (type.baseName == 'String') { return 'g_strdup($variableName)'; } else if (type.baseName == 'Uint8List') { - return 'static_cast(g_memdup($variableName, $lengthVariableName))'; + return 'static_cast(memcpy(malloc($lengthVariableName), $variableName, $lengthVariableName))'; } else if (type.baseName == 'Int32List') { - return 'static_cast(g_memdup($variableName, sizeof(int32_t) * $lengthVariableName))'; + return 'static_cast(memcpy(malloc(sizeof(int32_t) * $lengthVariableName), $variableName, sizeof(int32_t) * $lengthVariableName))'; } else if (type.baseName == 'Int64List') { - return 'static_cast(g_memdup($variableName, sizeof(int64_t) * $lengthVariableName))'; + return 'static_cast(memcpy(malloc(sizeof(int64_t) * $lengthVariableName), $variableName, sizeof(int64_t) * $lengthVariableName))'; } else if (type.baseName == 'Float32List') { - return 'static_cast(g_memdup($variableName, sizeof(float) * $lengthVariableName))'; + return 'static_cast(memcpy(malloc(sizeof(float) * $lengthVariableName), $variableName, sizeof(float) * $lengthVariableName))'; } else if (type.baseName == 'Float64List') { - return 'static_cast(g_memdup($variableName, sizeof(double) * $lengthVariableName))'; + return 'static_cast(memcpy(malloc(sizeof(double) * $lengthVariableName), $variableName, sizeof(double) * $lengthVariableName))'; } else { return variableName; } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 3e9cbf5cc9be..ba1701c0a19d 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -73,17 +73,20 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( self->an_int = an_int; self->an_int64 = an_int64; self->a_double = a_double; - self->a_byte_array = - static_cast(g_memdup(a_byte_array, a_byte_array_length)); + self->a_byte_array = static_cast( + memcpy(malloc(a_byte_array_length), a_byte_array, a_byte_array_length)); self->a_byte_array_length = a_byte_array_length; self->a4_byte_array = static_cast( - g_memdup(a4_byte_array, sizeof(int32_t) * a4_byte_array_length)); + memcpy(malloc(sizeof(int32_t) * a4_byte_array_length), a4_byte_array, + sizeof(int32_t) * a4_byte_array_length)); self->a4_byte_array_length = a4_byte_array_length; self->a8_byte_array = static_cast( - g_memdup(a8_byte_array, sizeof(int64_t) * a8_byte_array_length)); + memcpy(malloc(sizeof(int64_t) * a8_byte_array_length), a8_byte_array, + sizeof(int64_t) * a8_byte_array_length)); self->a8_byte_array_length = a8_byte_array_length; self->a_float_array = static_cast( - g_memdup(a_float_array, sizeof(double) * a_float_array_length)); + memcpy(malloc(sizeof(double) * a_float_array_length), a_float_array, + sizeof(double) * a_float_array_length)); self->a_float_array_length = a_float_array_length; self->an_enum = an_enum; self->a_string = g_strdup(a_string); @@ -395,15 +398,19 @@ core_tests_pigeon_test_all_nullable_types_new( self->a_nullable_double = nullptr; } self->a_nullable_byte_array = static_cast( - g_memdup(a_nullable_byte_array, a_nullable_byte_array_length)); + memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, + a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(g_memdup( + self->a_nullable4_byte_array = static_cast(memcpy( + malloc(sizeof(int32_t) * a_nullable4_byte_array_length), a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(g_memdup( + self->a_nullable8_byte_array = static_cast(memcpy( + malloc(sizeof(int64_t) * a_nullable8_byte_array_length), a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(g_memdup( + self->a_nullable_float_array = static_cast(memcpy( + malloc(sizeof(double) * a_nullable_float_array_length), a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; self->nullable_nested_list = fl_value_ref(nullable_nested_list); @@ -910,15 +917,19 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( self->a_nullable_double = nullptr; } self->a_nullable_byte_array = static_cast( - g_memdup(a_nullable_byte_array, a_nullable_byte_array_length)); + memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, + a_nullable_byte_array_length)); self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(g_memdup( + self->a_nullable4_byte_array = static_cast(memcpy( + malloc(sizeof(int32_t) * a_nullable4_byte_array_length), a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(g_memdup( + self->a_nullable8_byte_array = static_cast(memcpy( + malloc(sizeof(int64_t) * a_nullable8_byte_array_length), a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(g_memdup( + self->a_nullable_float_array = static_cast(memcpy( + malloc(sizeof(double) * a_nullable_float_array_length), a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); self->a_nullable_float_array_length = a_nullable_float_array_length; self->nullable_nested_list = fl_value_ref(nullable_nested_list); @@ -12909,8 +12920,9 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( return FALSE; } - *return_value = static_cast( - g_memdup(fl_value_get_uint8_list(r), fl_value_get_length(r))); + *return_value = static_cast(memcpy(malloc(fl_value_get_length(r)), + fl_value_get_uint8_list(r), + fl_value_get_length(r))); *return_value_length = fl_value_get_length(r); return TRUE; @@ -13169,8 +13181,9 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_fin return FALSE; } - *return_value = static_cast( - g_memdup(fl_value_get_uint8_list(r), fl_value_get_length(r))); + *return_value = static_cast(memcpy(malloc(fl_value_get_length(r)), + fl_value_get_uint8_list(r), + fl_value_get_length(r))); *return_value_length = fl_value_get_length(r); return TRUE; From f2816798159fd51be23b25452eec2490cf53c5f6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 16:00:52 +1200 Subject: [PATCH 081/127] Fix analyze issues --- packages/pigeon/lib/gobject_generator.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index fc9b3a878ebd..936f4965726b 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1509,7 +1509,7 @@ String _referenceValue(String module, TypeDeclaration type, String variableName, int _getTypeEnumeration(Root root, TypeDeclaration type) { return getEnumeratedTypes(root) - .firstWhere((t) => + .firstWhere((EnumeratedType t) => t.associatedClass == type.associatedClass || t.associatedEnum == type.associatedEnum) .enumeration; @@ -1523,7 +1523,7 @@ String _makeFlValue( {String? lengthVariableName}) { final String value; if (type.isClass) { - var enumeration = _getTypeEnumeration(root, type); + final int enumeration = _getTypeEnumeration(root, type); value = 'fl_value_new_custom_object($enumeration, G_OBJECT($variableName))'; } else if (type.isEnum) { value = type.isNullable From 68396b949b2f761cea95384787ea7e461bf17a2c Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 16:47:36 +1200 Subject: [PATCH 082/127] Fix enumerations --- packages/pigeon/lib/gobject_generator.dart | 8 +- .../linux/pigeon/core_tests.gen.cc | 109 +++++++++++------- 2 files changed, 72 insertions(+), 45 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 936f4965726b..c23ae6da3a01 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1526,9 +1526,9 @@ String _makeFlValue( final int enumeration = _getTypeEnumeration(root, type); value = 'fl_value_new_custom_object($enumeration, G_OBJECT($variableName))'; } else if (type.isEnum) { - value = type.isNullable - ? 'fl_value_new_int(static_cast(*$variableName))' - : 'fl_value_new_int(static_cast($variableName))'; + final int enumeration = _getTypeEnumeration(root, type); + value = + 'fl_value_new_custom($enumeration, fl_value_new_int(${type.isNullable ? '*$variableName' : '$variableName'}), (GDestroyNotify)fl_value_unref)'; } else if (_isFlValueWrappedType(type)) { value = 'fl_value_ref($variableName)'; } else if (type.baseName == 'void') { @@ -1575,7 +1575,7 @@ String _fromFlValue(String module, TypeDeclaration type, String variableName) { return '$castMacro(fl_value_get_custom_value_object($variableName))'; } else if (type.isEnum) { final String enumName = _getClassName(module, type.baseName); - return 'static_cast<$enumName>(fl_value_get_int($variableName))'; + return 'static_cast<$enumName>(fl_value_get_int(reinterpret_cast(const_cast(fl_value_get_custom_value($variableName)))))'; } else if (_isFlValueWrappedType(type)) { return variableName; } else if (type.baseName == 'bool') { diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index ba1701c0a19d..09fed14579a8 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -227,7 +227,8 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( values, fl_value_new_float_list(self->a_float_array, self->a_float_array_length)); fl_value_append_take(values, - fl_value_new_int(static_cast(self->an_enum))); + fl_value_new_custom(134, fl_value_new_int(self->an_enum), + (GDestroyNotify)fl_value_unref)); fl_value_append_take(values, fl_value_new_string(self->a_string)); fl_value_append_take(values, fl_value_ref(self->an_object)); fl_value_append_take(values, fl_value_ref(self->list)); @@ -262,8 +263,9 @@ core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { const double* a_float_array = fl_value_get_float_list(value7); size_t a_float_array_length = fl_value_get_length(value7); FlValue* value8 = fl_value_get_list_value(values, 8); - CoreTestsPigeonTestAnEnum an_enum = - static_cast(fl_value_get_int(value8)); + CoreTestsPigeonTestAnEnum an_enum = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value8))))); FlValue* value9 = fl_value_get_list_value(values, 9); const gchar* a_string = fl_value_get_string(value9); FlValue* value10 = fl_value_get_list_value(values, 10); @@ -653,7 +655,8 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( fl_value_append_take( values, self->a_nullable_enum != nullptr - ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + ? fl_value_new_custom(134, fl_value_new_int(*self->a_nullable_enum), + (GDestroyNotify)fl_value_unref) : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr @@ -756,8 +759,9 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; if (fl_value_get_type(value11) != FL_VALUE_TYPE_NULL) { - a_nullable_enum_value = - static_cast(fl_value_get_int(value11)); + a_nullable_enum_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value11))))); a_nullable_enum = &a_nullable_enum_value; } FlValue* value12 = fl_value_get_list_value(values, 12); @@ -1187,7 +1191,8 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_to_list( fl_value_append_take( values, self->a_nullable_enum != nullptr - ? fl_value_new_int(static_cast(*self->a_nullable_enum)) + ? fl_value_new_custom(134, fl_value_new_int(*self->a_nullable_enum), + (GDestroyNotify)fl_value_unref) : fl_value_new_null()); fl_value_append_take(values, self->a_nullable_string != nullptr @@ -1283,8 +1288,9 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; if (fl_value_get_type(value11) != FL_VALUE_TYPE_NULL) { - a_nullable_enum_value = - static_cast(fl_value_get_int(value11)); + a_nullable_enum_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value11))))); a_nullable_enum = &a_nullable_enum_value; } FlValue* value12 = fl_value_get_list_value(values, 12); @@ -2693,7 +2699,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_new_custom(134, fl_value_new_int(return_value), + (GDestroyNotify)fl_value_unref)); return self; } @@ -3877,9 +3884,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(134, fl_value_new_int(*return_value), + (GDestroyNotify)fl_value_unref) + : fl_value_new_null()); return self; } @@ -4700,7 +4709,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_new_custom(134, fl_value_new_int(return_value), + (GDestroyNotify)fl_value_unref)); return self; } @@ -5788,9 +5798,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(134, fl_value_new_int(*return_value), + (GDestroyNotify)fl_value_unref) + : fl_value_new_null()); return self; } @@ -6937,7 +6949,8 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_int(static_cast(return_value))); + fl_value_new_custom(134, fl_value_new_int(return_value), + (GDestroyNotify)fl_value_unref)); return self; } @@ -7530,9 +7543,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum nullptr)); self->value = fl_value_new_list(); fl_value_append_take( - self->value, return_value != nullptr - ? fl_value_new_int(static_cast(*return_value)) - : fl_value_new_null()); + self->value, + return_value != nullptr + ? fl_value_new_custom(134, fl_value_new_int(*return_value), + (GDestroyNotify)fl_value_unref) + : fl_value_new_null()); return self; } @@ -8131,8 +8146,9 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum an_enum = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse) response = self->vtable->echo_enum(self, an_enum, self->user_data); if (response == nullptr) { @@ -8747,8 +8763,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb( CoreTestsPigeonTestAnEnum* an_enum = nullptr; CoreTestsPigeonTestAnEnum an_enum_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - an_enum_value = - static_cast(fl_value_get_int(value0)); + an_enum_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); an_enum = &an_enum_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse) @@ -8991,8 +9008,9 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum an_enum = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); self->vtable->echo_async_enum(self, an_enum, response_handle, self->user_data); } @@ -9280,8 +9298,9 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb( CoreTestsPigeonTestAnEnum* an_enum = nullptr; CoreTestsPigeonTestAnEnum an_enum_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - an_enum_value = - static_cast(fl_value_get_int(value0)); + an_enum_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); an_enum = &an_enum_value; } self->vtable->echo_async_nullable_enum(self, an_enum, response_handle, @@ -9602,8 +9621,9 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb( } FlValue* value0 = fl_value_get_list_value(message_, 0); - CoreTestsPigeonTestAnEnum an_enum = - static_cast(fl_value_get_int(value0)); + CoreTestsPigeonTestAnEnum an_enum = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); self->vtable->call_flutter_echo_enum(self, an_enum, response_handle, self->user_data); } @@ -9766,8 +9786,9 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum CoreTestsPigeonTestAnEnum* an_enum = nullptr; CoreTestsPigeonTestAnEnum an_enum_value; if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { - an_enum_value = - static_cast(fl_value_get_int(value0)); + an_enum_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value0))))); an_enum = &an_enum_value; } self->vtable->call_flutter_echo_nullable_enum(self, an_enum, response_handle, @@ -12991,7 +13012,9 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_int(static_cast(an_enum))); + fl_value_append_take(args, + fl_value_new_custom(134, fl_value_new_int(an_enum), + (GDestroyNotify)fl_value_unref)); fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, callback, user_data); } @@ -13010,7 +13033,9 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( return FALSE; } - *return_value = static_cast(fl_value_get_int(r)); + *return_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(r))))); return TRUE; } @@ -13256,10 +13281,11 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, - an_enum != nullptr - ? fl_value_new_int(static_cast(*an_enum)) - : fl_value_new_null()); + fl_value_append_take( + args, an_enum != nullptr + ? fl_value_new_custom(134, fl_value_new_int(*an_enum), + (GDestroyNotify)fl_value_unref) + : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, cancellable, callback, user_data); } @@ -13282,8 +13308,9 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { *return_value = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); - **return_value = - static_cast(fl_value_get_int(r)); + **return_value = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(r))))); } else { *return_value = nullptr; } From eb0df4ec94228fa66676d568a3b255f3888c235d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 17:08:53 +1200 Subject: [PATCH 083/127] Fix analyze --- packages/pigeon/lib/gobject_generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index c23ae6da3a01..8dd42b952b51 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1528,7 +1528,7 @@ String _makeFlValue( } else if (type.isEnum) { final int enumeration = _getTypeEnumeration(root, type); value = - 'fl_value_new_custom($enumeration, fl_value_new_int(${type.isNullable ? '*$variableName' : '$variableName'}), (GDestroyNotify)fl_value_unref)'; + 'fl_value_new_custom($enumeration, fl_value_new_int(${type.isNullable ? '*$variableName' : variableName}), (GDestroyNotify)fl_value_unref)'; } else if (_isFlValueWrappedType(type)) { value = 'fl_value_ref($variableName)'; } else if (type.baseName == 'void') { From 17b7c4396cd215166156ea8957e68c95df9a5cd2 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 17:14:23 +1200 Subject: [PATCH 084/127] Fix null values in errors --- packages/pigeon/lib/gobject_generator.dart | 5 +- .../linux/pigeon/core_tests.gen.cc | 528 ++++++++++++------ 2 files changed, 355 insertions(+), 178 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 8dd42b952b51..27c893df6265 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -987,8 +987,9 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln( 'fl_value_append_take(self->value, fl_value_new_string(code));'); indent.writeln( - 'fl_value_append_take(self->value, fl_value_new_string(message));'); - indent.writeln('fl_value_append(self->value, details);'); + 'fl_value_append_take(self->value, fl_value_new_string(message != nullptr ? message : ""));'); + indent.writeln( + 'fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) : fl_value_new_null());'); indent.writeln('return self;'); }); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 09fed14579a8..f489f1a6f2a0 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -1842,8 +1842,10 @@ core_tests_pigeon_test_host_integration_core_api_noop_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -1905,8 +1907,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new_err nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -1969,8 +1973,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2032,8 +2038,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2097,8 +2105,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_ne nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2157,8 +2167,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_int_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2219,8 +2231,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_double_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2279,8 +2293,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2341,8 +2357,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_string_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2405,8 +2423,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new_er nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2467,8 +2487,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_object_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2527,8 +2549,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_list_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2587,8 +2611,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_map_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2651,8 +2677,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2713,8 +2741,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2778,8 +2808,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_respo nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2843,8 +2875,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_re nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2906,8 +2940,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -2973,8 +3009,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_respons nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3042,8 +3080,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3110,8 +3150,10 @@ core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3176,8 +3218,10 @@ core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_r nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3242,8 +3286,10 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_re nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3309,8 +3355,10 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_wi nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3374,8 +3422,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3440,8 +3490,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3505,8 +3557,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3571,8 +3625,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3638,8 +3694,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3704,8 +3762,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3769,8 +3829,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3834,8 +3896,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3902,8 +3966,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -3969,8 +4035,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4036,8 +4104,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4101,8 +4171,10 @@ core_tests_pigeon_test_host_integration_core_api_noop_async_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4169,8 +4241,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new_err nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4238,8 +4312,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4307,8 +4383,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new_er nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4376,8 +4454,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4447,8 +4527,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4516,8 +4598,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4585,8 +4669,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new_er nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4653,8 +4739,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new_err nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4724,8 +4812,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new_er nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4795,8 +4885,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4865,8 +4957,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_res nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -4938,8 +5032,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_respo nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5008,8 +5104,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_n nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5084,8 +5182,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5160,8 +5260,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5232,8 +5334,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_respons nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5305,8 +5409,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5377,8 +5483,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5450,8 +5558,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5524,8 +5634,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5597,8 +5709,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_resp nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5669,8 +5783,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5741,8 +5857,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_respons nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5816,8 +5934,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5884,8 +6004,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -5956,8 +6078,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6028,8 +6152,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_v nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6100,8 +6226,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_res nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6176,8 +6304,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6250,8 +6380,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6326,8 +6458,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6400,8 +6534,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6470,8 +6606,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6540,8 +6678,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6610,8 +6750,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6680,8 +6822,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_respon nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6752,8 +6896,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_re nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6822,8 +6968,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6892,8 +7040,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -6964,8 +7114,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7038,8 +7190,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7111,8 +7265,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7186,8 +7342,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_doub nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7261,8 +7419,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_stri nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7337,8 +7497,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7411,8 +7573,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7484,8 +7648,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_ nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7561,8 +7727,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -7634,8 +7802,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_str nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -13423,8 +13593,10 @@ core_tests_pigeon_test_host_trivial_api_noop_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -13570,8 +13742,10 @@ core_tests_pigeon_test_host_small_api_echo_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -13629,8 +13803,10 @@ core_tests_pigeon_test_host_small_api_void_void_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } From 49a5e4a19e31e983697d17f405f64b0e0b236abb Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Jun 2024 17:27:40 +1200 Subject: [PATCH 085/127] regen --- .../pigeon/example/app/linux/messages.g.cc | 95 +++++++++++-------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index ef7ce05e1a8e..ee8e3c1c03f8 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -83,7 +83,8 @@ static FlValue* pigeon_example_package_message_data_to_list( ? fl_value_new_string(self->description) : fl_value_new_null()); fl_value_append_take(values, - fl_value_new_int(static_cast(self->code))); + fl_value_new_custom(130, fl_value_new_int(self->code), + (GDestroyNotify)fl_value_unref)); fl_value_append_take(values, fl_value_ref(self->data)); return values; } @@ -99,24 +100,29 @@ pigeon_example_package_message_data_new_from_list(FlValue* values) { ? nullptr : fl_value_get_string(value1); FlValue* value2 = fl_value_get_list_value(values, 2); - PigeonExamplePackageCode code = - static_cast(fl_value_get_int(value2)); + PigeonExamplePackageCode code = static_cast( + fl_value_get_int(reinterpret_cast( + const_cast(fl_value_get_custom_value(value2))))); FlValue* value3 = fl_value_get_list_value(values, 3); FlValue* data = value3; return pigeon_example_package_message_data_new(name, description, code, data); } -G_DECLARE_FINAL_TYPE(PigeonMessageCodec, pigeon_message_codec, PIGEON, - MESSAGE_CODEC, FlStandardMessageCodec) +G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageCodec, + pigeon_example_package_message_codec, + PIGEON_EXAMPLE_PACKAGE, MESSAGE_CODEC, + FlStandardMessageCodec) -struct _PigeonMessageCodec { +struct _PigeonExamplePackageMessageCodec { FlStandardMessageCodec parent_instance; }; -G_DEFINE_TYPE(PigeonMessageCodec, pigeon_message_codec, +G_DEFINE_TYPE(PigeonExamplePackageMessageCodec, + pigeon_example_package_message_codec, fl_standard_message_codec_get_type()) -static gboolean pigeon_message_codec_write_pigeon_example_package_message_data( +static gboolean +pigeon_example_package_message_codec_write_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GByteArray* buffer, PigeonExamplePackageMessageData* value, GError** error) { uint8_t type = 129; @@ -126,7 +132,8 @@ static gboolean pigeon_message_codec_write_pigeon_example_package_message_data( return fl_standard_message_codec_write_value(codec, buffer, values, error); } -static gboolean pigeon_message_codec_write_pigeon_example_package_code( +static gboolean +pigeon_example_package_message_codec_write_pigeon_example_package_code( FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) { uint8_t type = 130; @@ -134,20 +141,19 @@ static gboolean pigeon_message_codec_write_pigeon_example_package_code( return fl_standard_message_codec_write_value(codec, buffer, value, error); } -static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, - GByteArray* buffer, - FlValue* value, - GError** error) { +static gboolean pigeon_example_package_message_codec_write_value( + FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, + GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { case 129: - return pigeon_message_codec_write_pigeon_example_package_message_data( + return pigeon_example_package_message_codec_write_pigeon_example_package_message_data( codec, buffer, PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( fl_value_get_custom_value_object(value)), error); case 130: - return pigeon_message_codec_write_pigeon_example_package_code( + return pigeon_example_package_message_codec_write_pigeon_example_package_code( codec, buffer, reinterpret_cast( const_cast(fl_value_get_custom_value(value))), @@ -155,11 +161,13 @@ static gboolean pigeon_message_codec_write_value(FlStandardMessageCodec* codec, } } - return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS( + pigeon_example_package_message_codec_parent_class) ->write_value(codec, buffer, value, error); } -static FlValue* pigeon_message_codec_read_pigeon_example_package_message_data( +static FlValue* +pigeon_example_package_message_codec_read_pigeon_example_package_message_data( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { g_autoptr(FlValue) values = @@ -179,7 +187,8 @@ static FlValue* pigeon_message_codec_read_pigeon_example_package_message_data( return fl_value_new_custom_object_take(129, G_OBJECT(value)); } -static FlValue* pigeon_message_codec_read_pigeon_example_package_code( +static FlValue* +pigeon_example_package_message_codec_read_pigeon_example_package_code( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { return fl_value_new_custom( @@ -187,34 +196,38 @@ static FlValue* pigeon_message_codec_read_pigeon_example_package_code( (GDestroyNotify)fl_value_unref); } -static FlValue* pigeon_message_codec_read_value_of_type( +static FlValue* pigeon_example_package_message_codec_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { case 129: - return pigeon_message_codec_read_pigeon_example_package_message_data( + return pigeon_example_package_message_codec_read_pigeon_example_package_message_data( codec, buffer, offset, error); case 130: - return pigeon_message_codec_read_pigeon_example_package_code( + return pigeon_example_package_message_codec_read_pigeon_example_package_code( codec, buffer, offset, error); default: - return FL_STANDARD_MESSAGE_CODEC_CLASS(pigeon_message_codec_parent_class) + return FL_STANDARD_MESSAGE_CODEC_CLASS( + pigeon_example_package_message_codec_parent_class) ->read_value_of_type(codec, buffer, offset, type, error); } } -static void pigeon_message_codec_init(PigeonMessageCodec* self) {} +static void pigeon_example_package_message_codec_init( + PigeonExamplePackageMessageCodec* self) {} -static void pigeon_message_codec_class_init(PigeonMessageCodecClass* klass) { +static void pigeon_example_package_message_codec_class_init( + PigeonExamplePackageMessageCodecClass* klass) { FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->write_value = - pigeon_message_codec_write_value; + pigeon_example_package_message_codec_write_value; FL_STANDARD_MESSAGE_CODEC_CLASS(klass)->read_value_of_type = - pigeon_message_codec_read_value_of_type; + pigeon_example_package_message_codec_read_value_of_type; } -static PigeonMessageCodec* pigeon_message_codec_new() { - PigeonMessageCodec* self = PIGEON_MESSAGE_CODEC( - g_object_new(pigeon_message_codec_get_type(), nullptr)); +static PigeonExamplePackageMessageCodec* +pigeon_example_package_message_codec_new() { + PigeonExamplePackageMessageCodec* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_CODEC( + g_object_new(pigeon_example_package_message_codec_get_type(), nullptr)); return self; } @@ -273,8 +286,10 @@ pigeon_example_package_example_host_api_get_host_language_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -327,8 +342,10 @@ pigeon_example_package_example_host_api_add_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -389,8 +406,10 @@ pigeon_example_package_example_host_api_send_message_response_new_error( nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, fl_value_new_string(code)); - fl_value_append_take(self->value, fl_value_new_string(message)); - fl_value_append(self->value, details); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); return self; } @@ -519,7 +538,8 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( self->user_data = user_data; self->user_data_free_func = user_data_free_func; - g_autoptr(PigeonMessageCodec) codec = pigeon_message_codec_new(); + g_autoptr(PigeonExamplePackageMessageCodec) codec = + pigeon_example_package_message_codec_new(); self->get_host_language_channel = fl_basic_message_channel_new(messenger, "dev.flutter.pigeon.pigeon_example_package." @@ -610,7 +630,8 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); - g_autoptr(PigeonMessageCodec) message_codec = pigeon_message_codec_new(); + g_autoptr(PigeonExamplePackageMessageCodec) message_codec = + pigeon_example_package_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec( FL_STANDARD_MESSAGE_CODEC(message_codec)); From 10350a35b209552117a546b26424e145b7f21c38 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 12 Jun 2024 10:36:24 -0400 Subject: [PATCH 086/127] Add xvfb wrapper to Linux integration test when run from CI entrypoint --- packages/pigeon/tool/run_tests.dart | 2 +- .../tool/shared/native_project_runners.dart | 11 ++-- packages/pigeon/tool/shared/test_runner.dart | 3 +- packages/pigeon/tool/shared/test_suites.dart | 50 +++++++++++-------- 4 files changed, 38 insertions(+), 28 deletions(-) diff --git a/packages/pigeon/tool/run_tests.dart b/packages/pigeon/tool/run_tests.dart index 983348864d81..ec5487b49e3d 100644 --- a/packages/pigeon/tool/run_tests.dart +++ b/packages/pigeon/tool/run_tests.dart @@ -238,5 +238,5 @@ Future main(List args) async { exit(2); } - await runTests(testsToRun); + await runTests(testsToRun, ciMode: true); } diff --git a/packages/pigeon/tool/shared/native_project_runners.dart b/packages/pigeon/tool/shared/native_project_runners.dart index 06111e0257da..71ee6272232a 100644 --- a/packages/pigeon/tool/shared/native_project_runners.dart +++ b/packages/pigeon/tool/shared/native_project_runners.dart @@ -7,12 +7,15 @@ import 'process_utils.dart'; Future runFlutterCommand( String projectDirectory, - String command, [ - List commandArguments = const [], -]) { + String command, + List commandArguments, { + String? wrapperCommand, +}) { + final String flutterCommand = getFlutterCommand(); return runProcess( - getFlutterCommand(), + wrapperCommand ?? flutterCommand, [ + if (wrapperCommand != null) flutterCommand, command, ...commandArguments, ], diff --git a/packages/pigeon/tool/shared/test_runner.dart b/packages/pigeon/tool/shared/test_runner.dart index c2df4b58f063..17799620d964 100644 --- a/packages/pigeon/tool/shared/test_runner.dart +++ b/packages/pigeon/tool/shared/test_runner.dart @@ -17,6 +17,7 @@ Future runTests( List testsToRun, { bool runFormat = false, bool runGeneration = true, + bool ciMode = false, }) async { final String baseDir = p.dirname(p.dirname(Platform.script.toFilePath())); if (runGeneration) { @@ -47,7 +48,7 @@ Future runTests( if (info != null) { print('##############################'); print('# Running $test'); - final int testCode = await info.function(); + final int testCode = await info.function(ciMode: ciMode); if (testCode != 0) { exit(testCode); } diff --git a/packages/pigeon/tool/shared/test_suites.dart b/packages/pigeon/tool/shared/test_suites.dart index 8b3222b73656..d113eee5d349 100644 --- a/packages/pigeon/tool/shared/test_suites.dart +++ b/packages/pigeon/tool/shared/test_suites.dart @@ -27,7 +27,7 @@ class TestInfo { const TestInfo({required this.function, this.description}); /// The function to run the test suite. - final Future Function() function; + final Future Function({bool ciMode}) function; /// A user-facing description of the test suite. final String? description; @@ -113,16 +113,16 @@ const Map testSuites = { description: 'Tests running pigeon with various command-line options.'), }; -Future _runAndroidJavaUnitTests() async { +Future _runAndroidJavaUnitTests({bool ciMode = false}) async { return _runAndroidUnitTests(_alternateLanguageTestPluginRelativePath); } -Future _runAndroidJavaIntegrationTests() async { +Future _runAndroidJavaIntegrationTests({bool ciMode = false}) async { return _runMobileIntegrationTests( 'Android', _alternateLanguageTestPluginRelativePath); } -Future _runAndroidJavaLint() async { +Future _runAndroidJavaLint({bool ciMode = false}) async { const String examplePath = './$_alternateLanguageTestPluginRelativePath/example'; const String androidProjectPath = '$examplePath/android'; @@ -139,7 +139,7 @@ Future _runAndroidJavaLint() async { androidProjectPath, 'alternate_language_test_plugin:lintDebug'); } -Future _runAndroidKotlinUnitTests() async { +Future _runAndroidKotlinUnitTests({bool ciMode = false}) async { return _runAndroidUnitTests(_testPluginRelativePath); } @@ -157,7 +157,7 @@ Future _runAndroidUnitTests(String testPluginPath) async { return runGradleBuild(androidProjectPath, 'testDebugUnitTest'); } -Future _runAndroidKotlinIntegrationTests() async { +Future _runAndroidKotlinIntegrationTests({bool ciMode = false}) async { return _runMobileIntegrationTests('Android', _testPluginRelativePath); } @@ -178,7 +178,7 @@ Future _runMobileIntegrationTests( ); } -Future _runDartUnitTests() async { +Future _runDartUnitTests({bool ciMode = false}) async { int exitCode = await runProcess('dart', ['analyze', 'bin']); if (exitCode != 0) { return exitCode; @@ -204,7 +204,7 @@ Future _analyzeFlutterUnitTests(String flutterUnitTestsPath) async { } final int analyzeCode = - await runFlutterCommand(flutterUnitTestsPath, 'analyze'); + await runFlutterCommand(flutterUnitTestsPath, 'analyze', []); if (analyzeCode != 0) { return analyzeCode; } @@ -215,14 +215,15 @@ Future _analyzeFlutterUnitTests(String flutterUnitTestsPath) async { return 0; } -Future _runFlutterUnitTests() async { +Future _runFlutterUnitTests({bool ciMode = false}) async { const String flutterUnitTestsPath = 'platform_tests/shared_test_plugin_code'; final int analyzeCode = await _analyzeFlutterUnitTests(flutterUnitTestsPath); if (analyzeCode != 0) { return analyzeCode; } - final int testCode = await runFlutterCommand(flutterUnitTestsPath, 'test'); + final int testCode = + await runFlutterCommand(flutterUnitTestsPath, 'test', []); if (testCode != 0) { return testCode; } @@ -230,11 +231,11 @@ Future _runFlutterUnitTests() async { return 0; } -Future _runIOSObjCUnitTests() async { +Future _runIOSObjCUnitTests({bool ciMode = false}) async { return _runIOSPluginUnitTests(_alternateLanguageTestPluginRelativePath); } -Future _runIOSObjCIntegrationTests() async { +Future _runIOSObjCIntegrationTests({bool ciMode = false}) async { final String? device = await getDeviceForPlatform('ios'); if (device == null) { print('No iOS device available. Attach an iOS device or start ' @@ -251,7 +252,7 @@ Future _runIOSObjCIntegrationTests() async { ); } -Future _runMacOSObjCIntegrationTests() async { +Future _runMacOSObjCIntegrationTests({bool ciMode = false}) async { const String examplePath = './$_alternateLanguageTestPluginRelativePath/example'; return runFlutterCommand( @@ -261,7 +262,7 @@ Future _runMacOSObjCIntegrationTests() async { ); } -Future _runMacOSSwiftUnitTests() async { +Future _runMacOSSwiftUnitTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; final int compileCode = await runFlutterBuild(examplePath, 'macos'); if (compileCode != 0) { @@ -278,7 +279,7 @@ Future _runMacOSSwiftUnitTests() async { ); } -Future _runMacOSSwiftIntegrationTests() async { +Future _runMacOSSwiftIntegrationTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; return runFlutterCommand( examplePath, @@ -287,7 +288,7 @@ Future _runMacOSSwiftIntegrationTests() async { ); } -Future _runIOSSwiftUnitTests() async { +Future _runIOSSwiftUnitTests({bool ciMode = false}) async { return _runIOSPluginUnitTests(_testPluginRelativePath); } @@ -353,11 +354,11 @@ Future _deleteSimulator(String deviceName) async { ); } -Future _runIOSSwiftIntegrationTests() async { +Future _runIOSSwiftIntegrationTests({bool ciMode = false}) async { return _runMobileIntegrationTests('iOS', _testPluginRelativePath); } -Future _runLinuxUnitTests() async { +Future _runLinuxUnitTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; final int compileCode = await runFlutterBuild(examplePath, 'linux'); if (compileCode != 0) { @@ -376,16 +377,21 @@ Future _runLinuxUnitTests() async { } } -Future _runLinuxIntegrationTests() async { +Future _runLinuxIntegrationTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; return runFlutterCommand( examplePath, 'test', [_integrationTestFileRelativePath, '-d', 'linux'], + // To avoid having all custom tests in the repo run under xvfb, xvfb-run is + // done here rather than at the CI config level. Ideally, Pigeon tests + // should be incorporated into the repo tooling's standard runs, at which + // point this won't be necessary. + wrapperCommand: ciMode ? 'xvfb-run' : null, ); } -Future _runWindowsUnitTests() async { +Future _runWindowsUnitTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; final int compileCode = await runFlutterBuild(examplePath, 'windows'); if (compileCode != 0) { @@ -413,7 +419,7 @@ Future _runWindowsUnitTests() async { } } -Future _runWindowsIntegrationTests() async { +Future _runWindowsIntegrationTests({bool ciMode = false}) async { const String examplePath = './$_testPluginRelativePath/example'; return runFlutterCommand( examplePath, @@ -422,7 +428,7 @@ Future _runWindowsIntegrationTests() async { ); } -Future _runCommandLineTests() async { +Future _runCommandLineTests({bool ciMode = false}) async { final Directory tempDir = Directory.systemTemp.createTempSync('pigeon'); final String tempOutput = p.join(tempDir.path, 'pigeon_output'); const String pigeonScript = 'bin/pigeon.dart'; From ea4355aa8f9216e3a633bfbbc417d160ea93bff0 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 16:54:52 +1200 Subject: [PATCH 087/127] Fix generated pointer style --- packages/pigeon/lib/gobject_generator.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 27c893df6265..4b8e1ced0f0d 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -213,7 +213,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent, field.documentationComments, _docCommentSpec); final List getterArgs = [ '$className* self', - if (_isNumericListType(field.type)) 'size_t *length' + if (_isNumericListType(field.type)) 'size_t* length' ]; indent.writeln( '$returnType ${methodPrefix}_get_$fieldName(${getterArgs.join(', ')});'); @@ -552,7 +552,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final List getterArgs = [ '$className* self', - if (_isNumericListType(field.type)) 'size_t *length' + if (_isNumericListType(field.type)) 'size_t* length' ]; indent.writeScoped( '$returnType ${methodPrefix}_get_$fieldName(${getterArgs.join(', ')}) {', From d47ce70ff6862d5ac942665a975a1cd3a9e517ca Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 16:59:46 +1200 Subject: [PATCH 088/127] Correctly get copyright as per PR review comment --- packages/pigeon/lib/gobject_generator.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 4b8e1ced0f0d..e3e213b4dbc7 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -42,10 +42,12 @@ class GObjectOptions { /// Creates a [GObjectOptions] from a Map representation where: /// `x = GObjectOptions.fromMap(x.toMap())`. static GObjectOptions fromMap(Map map) { + final Iterable? copyrightHeader = + map['copyrightHeader'] as Iterable?; return GObjectOptions( headerIncludePath: map['header'] as String?, module: map['module'] as String?, - copyrightHeader: map['copyrightHeader'] as Iterable?, + copyrightHeader: copyrightHeader?.cast(), headerOutPath: map['gobjectHeaderOut'] as String?, ); } From 9c47c4710124bb974cc4bf32e054dc97546df986 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 17:14:07 +1200 Subject: [PATCH 089/127] Respond to small API requests --- .../platform_tests/test_plugin/linux/test_plugin.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 15298f14244f..6b21558a42ab 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1334,11 +1334,16 @@ static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { static void echo(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) {} + gpointer user_data) { + core_tests_pigeon_test_host_small_api_respond_echo(api, response_handle, + a_string); +} static void void_void(CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) {} + gpointer user_data) { + core_tests_pigeon_test_host_small_api_respond_void_void(api, response_handle); +} static CoreTestsPigeonTestHostSmallApiVTable host_small_api_vtable = { .echo = echo, .void_void = void_void}; From 6a4a0481889c2f81d4efb00139d29743c99327ce Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 22:15:29 +1200 Subject: [PATCH 090/127] Fix echoAllTypes --- packages/pigeon/lib/gobject_generator.dart | 2 +- .../shared_test_plugin_code/lib/integration_tests.dart | 2 +- .../test_plugin/linux/pigeon/core_tests.gen.cc | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index e3e213b4dbc7..2036f0893e0a 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -728,7 +728,7 @@ class GObjectSourceGenerator extends StructuredGenerator { }); indent.newln(); indent.writeln( - 'return fl_value_new_custom_object_take(${customType.enumeration}, G_OBJECT(value));'); + 'return fl_value_new_custom_object(${customType.enumeration}, G_OBJECT(value));'); } else if (customType.type == CustomTypes.customEnum) { indent.writeln( 'return fl_value_new_custom(${customType.enumeration}, fl_standard_message_codec_read_value(codec, buffer, offset, error), (GDestroyNotify)fl_value_unref);'); diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 383d7849aff6..b5f96a38e1c8 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -388,7 +388,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllTypes echoObject = await api.echoAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }, skip: _linuxBringup); + }); testWidgets('all nullable datatypes serialize and deserialize correctly', (WidgetTester _) async { diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index f489f1a6f2a0..b9d103aae8c5 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -1647,7 +1647,7 @@ core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_types( return nullptr; } - return fl_value_new_custom_object_take(129, G_OBJECT(value)); + return fl_value_new_custom_object(129, G_OBJECT(value)); } static FlValue* @@ -1668,7 +1668,7 @@ core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_ty return nullptr; } - return fl_value_new_custom_object_take(130, G_OBJECT(value)); + return fl_value_new_custom_object(130, G_OBJECT(value)); } static FlValue* @@ -1690,7 +1690,7 @@ core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_nullable_ty return nullptr; } - return fl_value_new_custom_object_take(131, G_OBJECT(value)); + return fl_value_new_custom_object(131, G_OBJECT(value)); } static FlValue* @@ -1711,7 +1711,7 @@ core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_all_classes_wra return nullptr; } - return fl_value_new_custom_object_take(132, G_OBJECT(value)); + return fl_value_new_custom_object(132, G_OBJECT(value)); } static FlValue* @@ -1732,7 +1732,7 @@ core_tests_pigeon_test_message_codec_read_core_tests_pigeon_test_test_message( return nullptr; } - return fl_value_new_custom_object_take(133, G_OBJECT(value)); + return fl_value_new_custom_object(133, G_OBJECT(value)); } static FlValue* From 09caa2dd14449b6afaee6b28ae44f05b1c3cc443 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 22:23:34 +1200 Subject: [PATCH 091/127] Enable working tests --- .../shared_test_plugin_code/lib/integration_tests.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index b5f96a38e1c8..0c28fde009c8 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -540,7 +540,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final String? receivedString = await api.extractNestedNullableString(sentObject); expect(receivedString, sentObject.allNullableTypes.aNullableString); - }, skip: _linuxBringup); + }); testWidgets('nested objects can be received correctly', (WidgetTester _) async { @@ -1079,7 +1079,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllTypes echoObject = await api.echoAsyncAllTypes(genericAllTypes); compareAllTypes(echoObject, genericAllTypes); - }, skip: _linuxBringup); + }); testWidgets( 'all nullable async datatypes serialize and deserialize correctly', From f2c6ec02f97e88b40e0c5fd9d93465107be703af Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 22:36:52 +1200 Subject: [PATCH 092/127] Need more work on the small API plugin --- .../test_plugin/linux/test_plugin.cc | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 6b21558a42ab..77e81785e0d9 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -18,11 +18,13 @@ struct _TestPlugin { CoreTestsPigeonTestHostIntegrationCoreApi* host_core_api; - CoreTestsPigeonTestHostSmallApi* host_small_api; + CoreTestsPigeonTestHostSmallApi* host_small_api_one; + CoreTestsPigeonTestHostSmallApi* host_small_api_two; CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; - CoreTestsPigeonTestFlutterSmallApi* flutter_small_api; + CoreTestsPigeonTestFlutterSmallApi* flutter_small_api_one; + CoreTestsPigeonTestFlutterSmallApi* flutter_small_api_two; GCancellable* cancellable; }; @@ -1231,8 +1233,9 @@ static void call_flutter_small_api_echo_string( FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); + // FIXME: Them call flutter_small_api_two core_tests_pigeon_test_flutter_small_api_echo_string( - self->flutter_small_api, a_string, self->cancellable, + self->flutter_small_api_one, a_string, self->cancellable, small_api_echo_string_cb, callback_data_new(self, response_handle)); } @@ -1378,9 +1381,11 @@ static void test_plugin_dispose(GObject* object) { g_cancellable_cancel(self->cancellable); g_clear_object(&self->host_core_api); - g_clear_object(&self->host_small_api); + g_clear_object(&self->host_small_api_one); + g_clear_object(&self->host_small_api_two); g_clear_object(&self->flutter_core_api); - g_clear_object(&self->flutter_small_api); + g_clear_object(&self->flutter_small_api_one); + g_clear_object(&self->flutter_small_api_two); g_clear_object(&self->cancellable); G_OBJECT_CLASS(test_plugin_parent_class)->dispose(object); @@ -1399,12 +1404,18 @@ static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { self->host_core_api = core_tests_pigeon_test_host_integration_core_api_new( messenger, &host_core_api_vtable, g_object_ref(self), g_object_unref); - self->host_small_api = core_tests_pigeon_test_host_small_api_new( - messenger, &host_small_api_vtable, g_object_ref(self), g_object_unref); + self->host_small_api_one = core_tests_pigeon_test_host_small_api_new( + messenger, &host_small_api_vtable, g_object_ref(self), + g_object_unref); // FIXME: Suffix "suffixOne" + self->host_small_api_two = core_tests_pigeon_test_host_small_api_new( + messenger, &host_small_api_vtable, g_object_ref(self), + g_object_unref); // FIXME: Suffix "suffixTwo" self->flutter_core_api = core_tests_pigeon_test_flutter_integration_core_api_new(messenger); - self->flutter_small_api = - core_tests_pigeon_test_flutter_small_api_new(messenger); + self->flutter_small_api_one = core_tests_pigeon_test_flutter_small_api_new( + messenger); // FIXME: Suffix "suffixOne" + self->flutter_small_api_two = core_tests_pigeon_test_flutter_small_api_new( + messenger); // FIXME: Suffix "suffixTwo" return self; } From a8333d22ff96678cb82a7b3e376ce02bae3c4bd4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:00:29 +1200 Subject: [PATCH 093/127] Fix invalid custom type IDs --- packages/pigeon/lib/gobject_generator.dart | 4 +-- .../linux/pigeon/core_tests.gen.cc | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 2036f0893e0a..3186ffd15c51 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -1513,8 +1513,8 @@ String _referenceValue(String module, TypeDeclaration type, String variableName, int _getTypeEnumeration(Root root, TypeDeclaration type) { return getEnumeratedTypes(root) .firstWhere((EnumeratedType t) => - t.associatedClass == type.associatedClass || - t.associatedEnum == type.associatedEnum) + (type.isClass && t.associatedClass == type.associatedClass) || + (type.isEnum && t.associatedEnum == type.associatedEnum)) .enumeration; } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index b9d103aae8c5..380eb829f002 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -668,7 +668,7 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( fl_value_append_take( values, self->all_nullable_types != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(self->all_nullable_types)) + ? fl_value_new_custom_object(130, G_OBJECT(self->all_nullable_types)) : fl_value_new_null()); fl_value_append_take(values, self->list != nullptr ? fl_value_ref(self->list) : fl_value_new_null()); @@ -1409,12 +1409,12 @@ static FlValue* core_tests_pigeon_test_all_classes_wrapper_to_list( CoreTestsPigeonTestAllClassesWrapper* self) { FlValue* values = fl_value_new_list(); fl_value_append_take(values, fl_value_new_custom_object( - 129, G_OBJECT(self->all_nullable_types))); + 130, G_OBJECT(self->all_nullable_types))); fl_value_append_take( values, self->all_nullable_types_without_recursion != nullptr ? fl_value_new_custom_object( - 129, G_OBJECT(self->all_nullable_types_without_recursion)) + 131, G_OBJECT(self->all_nullable_types_without_recursion)) : fl_value_new_null()); fl_value_append_take( values, self->all_types != nullptr @@ -2663,7 +2663,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(132, G_OBJECT(return_value))); return self; } @@ -2994,7 +2994,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_respons self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(130, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -3065,7 +3065,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(131, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -3204,7 +3204,7 @@ core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_r nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(132, G_OBJECT(return_value))); return self; } @@ -3272,7 +3272,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_re nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(130, G_OBJECT(return_value))); return self; } @@ -3341,7 +3341,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_wi nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(131, G_OBJECT(return_value))); return self; } @@ -5167,7 +5167,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(130, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -5245,7 +5245,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(131, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -6289,7 +6289,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(130, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -6366,7 +6366,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(130, G_OBJECT(return_value))); return self; } @@ -6443,7 +6443,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ self->value = fl_value_new_list(); fl_value_append_take( self->value, return_value != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(return_value)) + ? fl_value_new_custom_object(131, G_OBJECT(return_value)) : fl_value_new_null()); return self; } @@ -6520,7 +6520,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null nullptr)); self->value = fl_value_new_list(); fl_value_append_take(self->value, - fl_value_new_custom_object(129, G_OBJECT(return_value))); + fl_value_new_custom_object(131, G_OBJECT(return_value))); return self; } @@ -12820,7 +12820,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take( args, everything != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(everything)) + ? fl_value_new_custom_object(130, G_OBJECT(everything)) : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoAllNullableTypes", args, cancellable, callback, user_data); @@ -12897,7 +12897,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take( args, everything != nullptr - ? fl_value_new_custom_object(129, G_OBJECT(everything)) + ? fl_value_new_custom_object(131, G_OBJECT(everything)) : fl_value_new_null()); fl_method_channel_invoke_method(self->channel, "echoAllNullableTypesWithoutRecursion", args, @@ -14011,7 +14011,7 @@ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_new_custom_object(129, G_OBJECT(msg))); + fl_value_append_take(args, fl_value_new_custom_object(133, G_OBJECT(msg))); fl_method_channel_invoke_method(self->channel, "echoWrappedList", args, cancellable, callback, user_data); } From 4dd478d7013bf6c505823bba519ec65e2c7be2f5 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:25:35 +1200 Subject: [PATCH 094/127] Fix getting length of null arrays --- packages/pigeon/lib/gobject_generator.dart | 31 +- .../linux/pigeon/core_tests.gen.cc | 267 +++++++++++------- 2 files changed, 181 insertions(+), 117 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 3186ffd15c51..fef5497806dd 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -592,6 +592,7 @@ class GObjectSourceGenerator extends StructuredGenerator { String fieldValue = _fromFlValue(module, field.type, 'value$i'); indent .writeln('FlValue *value$i = fl_value_get_list_value(values, $i);'); + args.add(fieldName); if (_isNullablePrimitiveType(field.type)) { indent.writeln('$fieldType $fieldName = nullptr;'); indent.writeln( @@ -602,18 +603,28 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln('${fieldName}_value = $fieldValue;'); indent.writeln('$fieldName = &${fieldName}_value;'); }); - } else { - if (field.type.isNullable) { - fieldValue = - 'fl_value_get_type(value$i) == FL_VALUE_TYPE_NULL ? nullptr : $fieldValue'; + } else if (field.type.isNullable) { + indent.writeln('$fieldType $fieldName = nullptr;'); + if (_isNumericListType(field.type)) { + indent.writeln('size_t ${fieldName}_length = 0;'); + args.add('${fieldName}_length'); } + indent.writeScoped( + 'if (fl_value_get_type(value$i) != FL_VALUE_TYPE_NULL) {', '}', + () { + indent.writeln('$fieldName = $fieldValue;'); + if (_isNumericListType(field.type)) { + indent.writeln( + '${fieldName}_length = fl_value_get_length(value$i);'); + } + }); + } else { indent.writeln('$fieldType $fieldName = $fieldValue;'); - } - args.add(fieldName); - if (_isNumericListType(field.type)) { - indent.writeln( - 'size_t ${fieldName}_length = fl_value_get_length(value$i);'); - args.add('${fieldName}_length'); + if (_isNumericListType(field.type)) { + indent.writeln( + 'size_t ${fieldName}_length = fl_value_get_length(value$i);'); + args.add('${fieldName}_length'); + } } } indent.writeln('return ${methodPrefix}_new(${args.join(', ')});'); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 380eb829f002..26a447f79a4f 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -723,38 +723,48 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { a_nullable_double = &a_nullable_double_value; } FlValue* value4 = fl_value_get_list_value(values, 4); - const uint8_t* a_nullable_byte_array = - fl_value_get_type(value4) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_uint8_list(value4); - size_t a_nullable_byte_array_length = fl_value_get_length(value4); + const uint8_t* a_nullable_byte_array = nullptr; + size_t a_nullable_byte_array_length = 0; + if (fl_value_get_type(value4) != FL_VALUE_TYPE_NULL) { + a_nullable_byte_array = fl_value_get_uint8_list(value4); + a_nullable_byte_array_length = fl_value_get_length(value4); + } FlValue* value5 = fl_value_get_list_value(values, 5); - const int32_t* a_nullable4_byte_array = - fl_value_get_type(value5) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_int32_list(value5); - size_t a_nullable4_byte_array_length = fl_value_get_length(value5); + const int32_t* a_nullable4_byte_array = nullptr; + size_t a_nullable4_byte_array_length = 0; + if (fl_value_get_type(value5) != FL_VALUE_TYPE_NULL) { + a_nullable4_byte_array = fl_value_get_int32_list(value5); + a_nullable4_byte_array_length = fl_value_get_length(value5); + } FlValue* value6 = fl_value_get_list_value(values, 6); - const int64_t* a_nullable8_byte_array = - fl_value_get_type(value6) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_int64_list(value6); - size_t a_nullable8_byte_array_length = fl_value_get_length(value6); + const int64_t* a_nullable8_byte_array = nullptr; + size_t a_nullable8_byte_array_length = 0; + if (fl_value_get_type(value6) != FL_VALUE_TYPE_NULL) { + a_nullable8_byte_array = fl_value_get_int64_list(value6); + a_nullable8_byte_array_length = fl_value_get_length(value6); + } FlValue* value7 = fl_value_get_list_value(values, 7); - const double* a_nullable_float_array = - fl_value_get_type(value7) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_float_list(value7); - size_t a_nullable_float_array_length = fl_value_get_length(value7); + const double* a_nullable_float_array = nullptr; + size_t a_nullable_float_array_length = 0; + if (fl_value_get_type(value7) != FL_VALUE_TYPE_NULL) { + a_nullable_float_array = fl_value_get_float_list(value7); + a_nullable_float_array_length = fl_value_get_length(value7); + } FlValue* value8 = fl_value_get_list_value(values, 8); - FlValue* nullable_nested_list = - fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; + FlValue* nullable_nested_list = nullptr; + if (fl_value_get_type(value8) != FL_VALUE_TYPE_NULL) { + nullable_nested_list = value8; + } FlValue* value9 = fl_value_get_list_value(values, 9); - FlValue* nullable_map_with_annotations = - fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; + FlValue* nullable_map_with_annotations = nullptr; + if (fl_value_get_type(value9) != FL_VALUE_TYPE_NULL) { + nullable_map_with_annotations = value9; + } FlValue* value10 = fl_value_get_list_value(values, 10); - FlValue* nullable_map_with_object = - fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; + FlValue* nullable_map_with_object = nullptr; + if (fl_value_get_type(value10) != FL_VALUE_TYPE_NULL) { + nullable_map_with_object = value10; + } FlValue* value11 = fl_value_get_list_value(values, 11); CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; @@ -765,40 +775,56 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { a_nullable_enum = &a_nullable_enum_value; } FlValue* value12 = fl_value_get_list_value(values, 12); - const gchar* a_nullable_string = - fl_value_get_type(value12) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_string(value12); + const gchar* a_nullable_string = nullptr; + if (fl_value_get_type(value12) != FL_VALUE_TYPE_NULL) { + a_nullable_string = fl_value_get_string(value12); + } FlValue* value13 = fl_value_get_list_value(values, 13); - FlValue* a_nullable_object = - fl_value_get_type(value13) == FL_VALUE_TYPE_NULL ? nullptr : value13; + FlValue* a_nullable_object = nullptr; + if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + a_nullable_object = value13; + } FlValue* value14 = fl_value_get_list_value(values, 14); - CoreTestsPigeonTestAllNullableTypes* all_nullable_types = - fl_value_get_type(value14) == FL_VALUE_TYPE_NULL - ? nullptr - : CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(value14)); + CoreTestsPigeonTestAllNullableTypes* all_nullable_types = nullptr; + if (fl_value_get_type(value14) != FL_VALUE_TYPE_NULL) { + all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(value14)); + } FlValue* value15 = fl_value_get_list_value(values, 15); - FlValue* list = - fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + FlValue* list = nullptr; + if (fl_value_get_type(value15) != FL_VALUE_TYPE_NULL) { + list = value15; + } FlValue* value16 = fl_value_get_list_value(values, 16); - FlValue* string_list = - fl_value_get_type(value16) == FL_VALUE_TYPE_NULL ? nullptr : value16; + FlValue* string_list = nullptr; + if (fl_value_get_type(value16) != FL_VALUE_TYPE_NULL) { + string_list = value16; + } FlValue* value17 = fl_value_get_list_value(values, 17); - FlValue* int_list = - fl_value_get_type(value17) == FL_VALUE_TYPE_NULL ? nullptr : value17; + FlValue* int_list = nullptr; + if (fl_value_get_type(value17) != FL_VALUE_TYPE_NULL) { + int_list = value17; + } FlValue* value18 = fl_value_get_list_value(values, 18); - FlValue* double_list = - fl_value_get_type(value18) == FL_VALUE_TYPE_NULL ? nullptr : value18; + FlValue* double_list = nullptr; + if (fl_value_get_type(value18) != FL_VALUE_TYPE_NULL) { + double_list = value18; + } FlValue* value19 = fl_value_get_list_value(values, 19); - FlValue* bool_list = - fl_value_get_type(value19) == FL_VALUE_TYPE_NULL ? nullptr : value19; + FlValue* bool_list = nullptr; + if (fl_value_get_type(value19) != FL_VALUE_TYPE_NULL) { + bool_list = value19; + } FlValue* value20 = fl_value_get_list_value(values, 20); - FlValue* nested_class_list = - fl_value_get_type(value20) == FL_VALUE_TYPE_NULL ? nullptr : value20; + FlValue* nested_class_list = nullptr; + if (fl_value_get_type(value20) != FL_VALUE_TYPE_NULL) { + nested_class_list = value20; + } FlValue* value21 = fl_value_get_list_value(values, 21); - FlValue* map = - fl_value_get_type(value21) == FL_VALUE_TYPE_NULL ? nullptr : value21; + FlValue* map = nullptr; + if (fl_value_get_type(value21) != FL_VALUE_TYPE_NULL) { + map = value21; + } return core_tests_pigeon_test_all_nullable_types_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, a_nullable_byte_array, a_nullable_byte_array_length, @@ -1252,38 +1278,48 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( a_nullable_double = &a_nullable_double_value; } FlValue* value4 = fl_value_get_list_value(values, 4); - const uint8_t* a_nullable_byte_array = - fl_value_get_type(value4) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_uint8_list(value4); - size_t a_nullable_byte_array_length = fl_value_get_length(value4); + const uint8_t* a_nullable_byte_array = nullptr; + size_t a_nullable_byte_array_length = 0; + if (fl_value_get_type(value4) != FL_VALUE_TYPE_NULL) { + a_nullable_byte_array = fl_value_get_uint8_list(value4); + a_nullable_byte_array_length = fl_value_get_length(value4); + } FlValue* value5 = fl_value_get_list_value(values, 5); - const int32_t* a_nullable4_byte_array = - fl_value_get_type(value5) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_int32_list(value5); - size_t a_nullable4_byte_array_length = fl_value_get_length(value5); + const int32_t* a_nullable4_byte_array = nullptr; + size_t a_nullable4_byte_array_length = 0; + if (fl_value_get_type(value5) != FL_VALUE_TYPE_NULL) { + a_nullable4_byte_array = fl_value_get_int32_list(value5); + a_nullable4_byte_array_length = fl_value_get_length(value5); + } FlValue* value6 = fl_value_get_list_value(values, 6); - const int64_t* a_nullable8_byte_array = - fl_value_get_type(value6) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_int64_list(value6); - size_t a_nullable8_byte_array_length = fl_value_get_length(value6); + const int64_t* a_nullable8_byte_array = nullptr; + size_t a_nullable8_byte_array_length = 0; + if (fl_value_get_type(value6) != FL_VALUE_TYPE_NULL) { + a_nullable8_byte_array = fl_value_get_int64_list(value6); + a_nullable8_byte_array_length = fl_value_get_length(value6); + } FlValue* value7 = fl_value_get_list_value(values, 7); - const double* a_nullable_float_array = - fl_value_get_type(value7) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_float_list(value7); - size_t a_nullable_float_array_length = fl_value_get_length(value7); + const double* a_nullable_float_array = nullptr; + size_t a_nullable_float_array_length = 0; + if (fl_value_get_type(value7) != FL_VALUE_TYPE_NULL) { + a_nullable_float_array = fl_value_get_float_list(value7); + a_nullable_float_array_length = fl_value_get_length(value7); + } FlValue* value8 = fl_value_get_list_value(values, 8); - FlValue* nullable_nested_list = - fl_value_get_type(value8) == FL_VALUE_TYPE_NULL ? nullptr : value8; + FlValue* nullable_nested_list = nullptr; + if (fl_value_get_type(value8) != FL_VALUE_TYPE_NULL) { + nullable_nested_list = value8; + } FlValue* value9 = fl_value_get_list_value(values, 9); - FlValue* nullable_map_with_annotations = - fl_value_get_type(value9) == FL_VALUE_TYPE_NULL ? nullptr : value9; + FlValue* nullable_map_with_annotations = nullptr; + if (fl_value_get_type(value9) != FL_VALUE_TYPE_NULL) { + nullable_map_with_annotations = value9; + } FlValue* value10 = fl_value_get_list_value(values, 10); - FlValue* nullable_map_with_object = - fl_value_get_type(value10) == FL_VALUE_TYPE_NULL ? nullptr : value10; + FlValue* nullable_map_with_object = nullptr; + if (fl_value_get_type(value10) != FL_VALUE_TYPE_NULL) { + nullable_map_with_object = value10; + } FlValue* value11 = fl_value_get_list_value(values, 11); CoreTestsPigeonTestAnEnum* a_nullable_enum = nullptr; CoreTestsPigeonTestAnEnum a_nullable_enum_value; @@ -1294,31 +1330,45 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new_from_list( a_nullable_enum = &a_nullable_enum_value; } FlValue* value12 = fl_value_get_list_value(values, 12); - const gchar* a_nullable_string = - fl_value_get_type(value12) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_string(value12); + const gchar* a_nullable_string = nullptr; + if (fl_value_get_type(value12) != FL_VALUE_TYPE_NULL) { + a_nullable_string = fl_value_get_string(value12); + } FlValue* value13 = fl_value_get_list_value(values, 13); - FlValue* a_nullable_object = - fl_value_get_type(value13) == FL_VALUE_TYPE_NULL ? nullptr : value13; + FlValue* a_nullable_object = nullptr; + if (fl_value_get_type(value13) != FL_VALUE_TYPE_NULL) { + a_nullable_object = value13; + } FlValue* value14 = fl_value_get_list_value(values, 14); - FlValue* list = - fl_value_get_type(value14) == FL_VALUE_TYPE_NULL ? nullptr : value14; + FlValue* list = nullptr; + if (fl_value_get_type(value14) != FL_VALUE_TYPE_NULL) { + list = value14; + } FlValue* value15 = fl_value_get_list_value(values, 15); - FlValue* string_list = - fl_value_get_type(value15) == FL_VALUE_TYPE_NULL ? nullptr : value15; + FlValue* string_list = nullptr; + if (fl_value_get_type(value15) != FL_VALUE_TYPE_NULL) { + string_list = value15; + } FlValue* value16 = fl_value_get_list_value(values, 16); - FlValue* int_list = - fl_value_get_type(value16) == FL_VALUE_TYPE_NULL ? nullptr : value16; + FlValue* int_list = nullptr; + if (fl_value_get_type(value16) != FL_VALUE_TYPE_NULL) { + int_list = value16; + } FlValue* value17 = fl_value_get_list_value(values, 17); - FlValue* double_list = - fl_value_get_type(value17) == FL_VALUE_TYPE_NULL ? nullptr : value17; + FlValue* double_list = nullptr; + if (fl_value_get_type(value17) != FL_VALUE_TYPE_NULL) { + double_list = value17; + } FlValue* value18 = fl_value_get_list_value(values, 18); - FlValue* bool_list = - fl_value_get_type(value18) == FL_VALUE_TYPE_NULL ? nullptr : value18; + FlValue* bool_list = nullptr; + if (fl_value_get_type(value18) != FL_VALUE_TYPE_NULL) { + bool_list = value18; + } FlValue* value19 = fl_value_get_list_value(values, 19); - FlValue* map = - fl_value_get_type(value19) == FL_VALUE_TYPE_NULL ? nullptr : value19; + FlValue* map = nullptr; + if (fl_value_get_type(value19) != FL_VALUE_TYPE_NULL) { + map = value19; + } return core_tests_pigeon_test_all_nullable_types_without_recursion_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, a_nullable_byte_array, a_nullable_byte_array_length, @@ -1431,17 +1481,18 @@ core_tests_pigeon_test_all_classes_wrapper_new_from_list(FlValue* values) { fl_value_get_custom_value_object(value0)); FlValue* value1 = fl_value_get_list_value(values, 1); CoreTestsPigeonTestAllNullableTypesWithoutRecursion* - all_nullable_types_without_recursion = - fl_value_get_type(value1) == FL_VALUE_TYPE_NULL - ? nullptr - : CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(value1)); + all_nullable_types_without_recursion = nullptr; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + all_nullable_types_without_recursion = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(value1)); + } FlValue* value2 = fl_value_get_list_value(values, 2); - CoreTestsPigeonTestAllTypes* all_types = - fl_value_get_type(value2) == FL_VALUE_TYPE_NULL - ? nullptr - : CORE_TESTS_PIGEON_TEST_ALL_TYPES( - fl_value_get_custom_value_object(value2)); + CoreTestsPigeonTestAllTypes* all_types = nullptr; + if (fl_value_get_type(value2) != FL_VALUE_TYPE_NULL) { + all_types = CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(value2)); + } return core_tests_pigeon_test_all_classes_wrapper_new( all_nullable_types, all_nullable_types_without_recursion, all_types); } @@ -1497,8 +1548,10 @@ static FlValue* core_tests_pigeon_test_test_message_to_list( static CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new_from_list(FlValue* values) { FlValue* value0 = fl_value_get_list_value(values, 0); - FlValue* test_list = - fl_value_get_type(value0) == FL_VALUE_TYPE_NULL ? nullptr : value0; + FlValue* test_list = nullptr; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + test_list = value0; + } return core_tests_pigeon_test_test_message_new(test_list); } From 041f086b3409e2ea0e006301ef94ddc588756ab4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:37:45 +1200 Subject: [PATCH 095/127] Fix nullable fields --- packages/pigeon/lib/gobject_generator.dart | 20 +- .../linux/pigeon/core_tests.gen.cc | 282 ++++++++++++++---- 2 files changed, 235 insertions(+), 67 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index fef5497806dd..4701204f07c8 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -537,11 +537,25 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeScoped('else {', '}', () { indent.writeln('self->$fieldName = nullptr;'); }); + } else if (field.type.isNullable) { + indent.writeScoped('if ($fieldName != nullptr) {', '}', () { + indent.writeln('self->$fieldName = $value;'); + if (_isNumericListType(field.type)) { + indent + .writeln('self->${fieldName}_length = ${fieldName}_length;'); + } + }); + indent.writeScoped('else {', '}', () { + indent.writeln('self->$fieldName = nullptr;'); + if (_isNumericListType(field.type)) { + indent.writeln('self->${fieldName}_length = 0;'); + } + }); } else { indent.writeln('self->$fieldName = $value;'); - } - if (_isNumericListType(field.type)) { - indent.writeln('self->${fieldName}_length = ${fieldName}_length;'); + if (_isNumericListType(field.type)) { + indent.writeln('self->${fieldName}_length = ${fieldName}_length;'); + } } } indent.writeln('return self;'); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 26a447f79a4f..c8e0e9d5efe8 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -399,26 +399,61 @@ core_tests_pigeon_test_all_nullable_types_new( } else { self->a_nullable_double = nullptr; } - self->a_nullable_byte_array = static_cast( - memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, - a_nullable_byte_array_length)); - self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(memcpy( - malloc(sizeof(int32_t) * a_nullable4_byte_array_length), - a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); - self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(memcpy( - malloc(sizeof(int64_t) * a_nullable8_byte_array_length), - a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); - self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(memcpy( - malloc(sizeof(double) * a_nullable_float_array_length), - a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); - self->a_nullable_float_array_length = a_nullable_float_array_length; - self->nullable_nested_list = fl_value_ref(nullable_nested_list); - self->nullable_map_with_annotations = - fl_value_ref(nullable_map_with_annotations); - self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); + if (a_nullable_byte_array != nullptr) { + self->a_nullable_byte_array = static_cast( + memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, + a_nullable_byte_array_length)); + self->a_nullable_byte_array_length = a_nullable_byte_array_length; + } else { + self->a_nullable_byte_array = nullptr; + self->a_nullable_byte_array_length = 0; + } + if (a_nullable4_byte_array != nullptr) { + self->a_nullable4_byte_array = static_cast( + memcpy(malloc(sizeof(int32_t) * a_nullable4_byte_array_length), + a_nullable4_byte_array, + sizeof(int32_t) * a_nullable4_byte_array_length)); + self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; + } else { + self->a_nullable4_byte_array = nullptr; + self->a_nullable4_byte_array_length = 0; + } + if (a_nullable8_byte_array != nullptr) { + self->a_nullable8_byte_array = static_cast( + memcpy(malloc(sizeof(int64_t) * a_nullable8_byte_array_length), + a_nullable8_byte_array, + sizeof(int64_t) * a_nullable8_byte_array_length)); + self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; + } else { + self->a_nullable8_byte_array = nullptr; + self->a_nullable8_byte_array_length = 0; + } + if (a_nullable_float_array != nullptr) { + self->a_nullable_float_array = static_cast( + memcpy(malloc(sizeof(double) * a_nullable_float_array_length), + a_nullable_float_array, + sizeof(double) * a_nullable_float_array_length)); + self->a_nullable_float_array_length = a_nullable_float_array_length; + } else { + self->a_nullable_float_array = nullptr; + self->a_nullable_float_array_length = 0; + } + if (nullable_nested_list != nullptr) { + self->nullable_nested_list = fl_value_ref(nullable_nested_list); + } else { + self->nullable_nested_list = nullptr; + } + if (nullable_map_with_annotations != nullptr) { + self->nullable_map_with_annotations = + fl_value_ref(nullable_map_with_annotations); + } else { + self->nullable_map_with_annotations = nullptr; + } + if (nullable_map_with_object != nullptr) { + self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); + } else { + self->nullable_map_with_object = nullptr; + } if (a_nullable_enum != nullptr) { self->a_nullable_enum = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); @@ -426,17 +461,57 @@ core_tests_pigeon_test_all_nullable_types_new( } else { self->a_nullable_enum = nullptr; } - self->a_nullable_string = g_strdup(a_nullable_string); - self->a_nullable_object = fl_value_ref(a_nullable_object); - self->all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - g_object_ref(all_nullable_types)); - self->list = fl_value_ref(list); - self->string_list = fl_value_ref(string_list); - self->int_list = fl_value_ref(int_list); - self->double_list = fl_value_ref(double_list); - self->bool_list = fl_value_ref(bool_list); - self->nested_class_list = fl_value_ref(nested_class_list); - self->map = fl_value_ref(map); + if (a_nullable_string != nullptr) { + self->a_nullable_string = g_strdup(a_nullable_string); + } else { + self->a_nullable_string = nullptr; + } + if (a_nullable_object != nullptr) { + self->a_nullable_object = fl_value_ref(a_nullable_object); + } else { + self->a_nullable_object = nullptr; + } + if (all_nullable_types != nullptr) { + self->all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(all_nullable_types)); + } else { + self->all_nullable_types = nullptr; + } + if (list != nullptr) { + self->list = fl_value_ref(list); + } else { + self->list = nullptr; + } + if (string_list != nullptr) { + self->string_list = fl_value_ref(string_list); + } else { + self->string_list = nullptr; + } + if (int_list != nullptr) { + self->int_list = fl_value_ref(int_list); + } else { + self->int_list = nullptr; + } + if (double_list != nullptr) { + self->double_list = fl_value_ref(double_list); + } else { + self->double_list = nullptr; + } + if (bool_list != nullptr) { + self->bool_list = fl_value_ref(bool_list); + } else { + self->bool_list = nullptr; + } + if (nested_class_list != nullptr) { + self->nested_class_list = fl_value_ref(nested_class_list); + } else { + self->nested_class_list = nullptr; + } + if (map != nullptr) { + self->map = fl_value_ref(map); + } else { + self->map = nullptr; + } return self; } @@ -946,26 +1021,61 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( } else { self->a_nullable_double = nullptr; } - self->a_nullable_byte_array = static_cast( - memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, - a_nullable_byte_array_length)); - self->a_nullable_byte_array_length = a_nullable_byte_array_length; - self->a_nullable4_byte_array = static_cast(memcpy( - malloc(sizeof(int32_t) * a_nullable4_byte_array_length), - a_nullable4_byte_array, sizeof(int32_t) * a_nullable4_byte_array_length)); - self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; - self->a_nullable8_byte_array = static_cast(memcpy( - malloc(sizeof(int64_t) * a_nullable8_byte_array_length), - a_nullable8_byte_array, sizeof(int64_t) * a_nullable8_byte_array_length)); - self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; - self->a_nullable_float_array = static_cast(memcpy( - malloc(sizeof(double) * a_nullable_float_array_length), - a_nullable_float_array, sizeof(double) * a_nullable_float_array_length)); - self->a_nullable_float_array_length = a_nullable_float_array_length; - self->nullable_nested_list = fl_value_ref(nullable_nested_list); - self->nullable_map_with_annotations = - fl_value_ref(nullable_map_with_annotations); - self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); + if (a_nullable_byte_array != nullptr) { + self->a_nullable_byte_array = static_cast( + memcpy(malloc(a_nullable_byte_array_length), a_nullable_byte_array, + a_nullable_byte_array_length)); + self->a_nullable_byte_array_length = a_nullable_byte_array_length; + } else { + self->a_nullable_byte_array = nullptr; + self->a_nullable_byte_array_length = 0; + } + if (a_nullable4_byte_array != nullptr) { + self->a_nullable4_byte_array = static_cast( + memcpy(malloc(sizeof(int32_t) * a_nullable4_byte_array_length), + a_nullable4_byte_array, + sizeof(int32_t) * a_nullable4_byte_array_length)); + self->a_nullable4_byte_array_length = a_nullable4_byte_array_length; + } else { + self->a_nullable4_byte_array = nullptr; + self->a_nullable4_byte_array_length = 0; + } + if (a_nullable8_byte_array != nullptr) { + self->a_nullable8_byte_array = static_cast( + memcpy(malloc(sizeof(int64_t) * a_nullable8_byte_array_length), + a_nullable8_byte_array, + sizeof(int64_t) * a_nullable8_byte_array_length)); + self->a_nullable8_byte_array_length = a_nullable8_byte_array_length; + } else { + self->a_nullable8_byte_array = nullptr; + self->a_nullable8_byte_array_length = 0; + } + if (a_nullable_float_array != nullptr) { + self->a_nullable_float_array = static_cast( + memcpy(malloc(sizeof(double) * a_nullable_float_array_length), + a_nullable_float_array, + sizeof(double) * a_nullable_float_array_length)); + self->a_nullable_float_array_length = a_nullable_float_array_length; + } else { + self->a_nullable_float_array = nullptr; + self->a_nullable_float_array_length = 0; + } + if (nullable_nested_list != nullptr) { + self->nullable_nested_list = fl_value_ref(nullable_nested_list); + } else { + self->nullable_nested_list = nullptr; + } + if (nullable_map_with_annotations != nullptr) { + self->nullable_map_with_annotations = + fl_value_ref(nullable_map_with_annotations); + } else { + self->nullable_map_with_annotations = nullptr; + } + if (nullable_map_with_object != nullptr) { + self->nullable_map_with_object = fl_value_ref(nullable_map_with_object); + } else { + self->nullable_map_with_object = nullptr; + } if (a_nullable_enum != nullptr) { self->a_nullable_enum = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); @@ -973,14 +1083,46 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( } else { self->a_nullable_enum = nullptr; } - self->a_nullable_string = g_strdup(a_nullable_string); - self->a_nullable_object = fl_value_ref(a_nullable_object); - self->list = fl_value_ref(list); - self->string_list = fl_value_ref(string_list); - self->int_list = fl_value_ref(int_list); - self->double_list = fl_value_ref(double_list); - self->bool_list = fl_value_ref(bool_list); - self->map = fl_value_ref(map); + if (a_nullable_string != nullptr) { + self->a_nullable_string = g_strdup(a_nullable_string); + } else { + self->a_nullable_string = nullptr; + } + if (a_nullable_object != nullptr) { + self->a_nullable_object = fl_value_ref(a_nullable_object); + } else { + self->a_nullable_object = nullptr; + } + if (list != nullptr) { + self->list = fl_value_ref(list); + } else { + self->list = nullptr; + } + if (string_list != nullptr) { + self->string_list = fl_value_ref(string_list); + } else { + self->string_list = nullptr; + } + if (int_list != nullptr) { + self->int_list = fl_value_ref(int_list); + } else { + self->int_list = nullptr; + } + if (double_list != nullptr) { + self->double_list = fl_value_ref(double_list); + } else { + self->double_list = nullptr; + } + if (bool_list != nullptr) { + self->bool_list = fl_value_ref(bool_list); + } else { + self->bool_list = nullptr; + } + if (map != nullptr) { + self->map = fl_value_ref(map); + } else { + self->map = nullptr; + } return self; } @@ -1424,10 +1566,18 @@ core_tests_pigeon_test_all_classes_wrapper_new( core_tests_pigeon_test_all_classes_wrapper_get_type(), nullptr)); self->all_nullable_types = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( g_object_ref(all_nullable_types)); - self->all_nullable_types_without_recursion = - CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - g_object_ref(all_nullable_types_without_recursion)); - self->all_types = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref(all_types)); + if (all_nullable_types_without_recursion != nullptr) { + self->all_nullable_types_without_recursion = + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + g_object_ref(all_nullable_types_without_recursion)); + } else { + self->all_nullable_types_without_recursion = nullptr; + } + if (all_types != nullptr) { + self->all_types = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref(all_types)); + } else { + self->all_types = nullptr; + } return self; } @@ -1526,7 +1676,11 @@ CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( FlValue* test_list) { CoreTestsPigeonTestTestMessage* self = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( g_object_new(core_tests_pigeon_test_test_message_get_type(), nullptr)); - self->test_list = fl_value_ref(test_list); + if (test_list != nullptr) { + self->test_list = fl_value_ref(test_list); + } else { + self->test_list = nullptr; + } return self; } From 8480d7c6e3b37f5e1290f3f2de3b5a5e320e77c7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:45:49 +1200 Subject: [PATCH 096/127] Enable more tests --- .../lib/integration_tests.dart | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 0c28fde009c8..23866540dd73 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -398,7 +398,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(recursiveAllNullableTypes); compareAllNullableTypes(echoObject, recursiveAllNullableTypes); - }, skip: _linuxBringup); + }); testWidgets('all null datatypes serialize and deserialize correctly', (WidgetTester _) async { @@ -409,7 +409,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllNullableTypes? echoNullFilledClass = await api.echoAllNullableTypes(allTypesNull); compareAllNullableTypes(allTypesNull, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets('Classes with list of null serialize and deserialize correctly', (WidgetTester _) async { @@ -422,7 +422,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(nullableListTypes); compareAllNullableTypes(nullableListTypes, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets('Classes with map of null serialize and deserialize correctly', (WidgetTester _) async { @@ -435,7 +435,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypes(nullableListTypes); compareAllNullableTypes(nullableListTypes, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets( 'all nullable datatypes without recursion serialize and deserialize correctly', @@ -448,7 +448,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( echoObject, genericAllNullableTypesWithoutRecursion); - }, skip: _linuxBringup); + }); testWidgets( 'all null datatypes without recursion serialize and deserialize correctly', @@ -462,7 +462,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.echoAllNullableTypesWithoutRecursion(allTypesNull); compareAllNullableTypesWithoutRecursion( allTypesNull, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets( 'Classes without recursion with list of null serialize and deserialize correctly', @@ -479,7 +479,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( nullableListTypes, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets( 'Classes without recursion with map of null serialize and deserialize correctly', @@ -496,7 +496,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( nullableListTypes, echoNullFilledClass); - }, skip: _linuxBringup); + }); testWidgets('errors are returned correctly', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); @@ -550,7 +550,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedObject = await api.createNestedNullableString(sentString); expect(receivedObject.allNullableTypes.aNullableString, sentString); - }, skip: _linuxBringup); + }); testWidgets('nested classes can serialize and deserialize correctly', (WidgetTester _) async { @@ -565,7 +565,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedClassWrapper = await api.echoClassWrapper(sentWrapper); compareAllClassesWrapper(sentWrapper, receivedClassWrapper); - }, skip: _linuxBringup); + }); testWidgets('nested null classes can serialize and deserialize correctly', (WidgetTester _) async { @@ -579,7 +579,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllClassesWrapper receivedClassWrapper = await api.echoClassWrapper(sentWrapper); compareAllClassesWrapper(sentWrapper, receivedClassWrapper); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple types serialize and deserialize correctly', @@ -594,7 +594,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoObject.aNullableInt, aNullableInt); expect(echoObject.aNullableBool, aNullableBool); expect(echoObject.aNullableString, aNullableString); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly', @@ -606,7 +606,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoNullFilledClass.aNullableInt, null); expect(echoNullFilledClass.aNullableBool, null); expect(echoNullFilledClass.aNullableString, null); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', @@ -622,7 +622,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoObject.aNullableInt, aNullableInt); expect(echoObject.aNullableBool, aNullableBool); expect(echoObject.aNullableString, aNullableString); - }, skip: _linuxBringup); + }); testWidgets( 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', @@ -634,7 +634,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(echoNullFilledClass.aNullableInt, null); expect(echoNullFilledClass.aNullableBool, null); expect(echoNullFilledClass.aNullableString, null); - }, skip: _linuxBringup); + }); testWidgets('Int serialize and deserialize correctly', (WidgetTester _) async { From 8fdb2fc3bd235e71880453feae63ee0ab7d62253 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:48:19 +1200 Subject: [PATCH 097/127] Enable more tests --- .../shared_test_plugin_code/lib/integration_tests.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 23866540dd73..3513598651ae 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -1090,7 +1090,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { .echoAsyncNullableAllNullableTypes(recursiveAllNullableTypes); compareAllNullableTypes(echoObject, recursiveAllNullableTypes); - }, skip: _linuxBringup); + }); testWidgets('all null datatypes async serialize and deserialize correctly', (WidgetTester _) async { @@ -1101,7 +1101,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AllNullableTypes? echoNullFilledClass = await api.echoAsyncNullableAllNullableTypes(allTypesNull); compareAllNullableTypes(echoNullFilledClass, allTypesNull); - }, skip: _linuxBringup); + }); testWidgets( 'all nullable async datatypes without recursion serialize and deserialize correctly', @@ -1114,7 +1114,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { compareAllNullableTypesWithoutRecursion( echoObject, genericAllNullableTypesWithoutRecursion); - }, skip: _linuxBringup); + }); testWidgets( 'all null datatypes without recursion async serialize and deserialize correctly', @@ -1128,7 +1128,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { .echoAsyncNullableAllNullableTypesWithoutRecursion(allTypesNull); compareAllNullableTypesWithoutRecursion( echoNullFilledClass, allTypesNull); - }, skip: _linuxBringup); + }); testWidgets('Int async serialize and deserialize correctly', (WidgetTester _) async { From fa41802c764093db1e8ee3040b8ca80262591f43 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 13 Jun 2024 23:53:50 +1200 Subject: [PATCH 098/127] Fix analyze --- packages/pigeon/lib/gobject_generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 4701204f07c8..ad2ee808fdd5 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -603,7 +603,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final NamedType field = classDefinition.fields[i]; final String fieldName = _getFieldName(field.name); final String fieldType = _getType(module, field.type); - String fieldValue = _fromFlValue(module, field.type, 'value$i'); + final String fieldValue = _fromFlValue(module, field.type, 'value$i'); indent .writeln('FlValue *value$i = fl_value_get_list_value(values, $i);'); args.add(fieldName); From 8c81bbfb531817cbe69e5bfc6c3638bcb867b34e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 09:30:17 +1200 Subject: [PATCH 099/127] Add suffix --- packages/pigeon/example/README.md | 3 +- .../pigeon/example/app/linux/messages.g.cc | 79 +- .../pigeon/example/app/linux/messages.g.h | 5 +- .../example/app/linux/my_application.cc | 5 +- packages/pigeon/lib/gobject_generator.dart | 20 +- .../linux/pigeon/core_tests.gen.cc | 1248 ++++++++++++----- .../test_plugin/linux/pigeon/core_tests.gen.h | 11 +- .../test_plugin/linux/test_plugin.cc | 22 +- 8 files changed, 1019 insertions(+), 374 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 84b8575063dd..a839d4998c14 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -343,7 +343,8 @@ static void flutter_method_cb(GObject* object, GAsyncResult* result, ```c++ -self->flutter_api = pigeon_example_package_message_flutter_api_new(messenger); +self->flutter_api = + pigeon_example_package_message_flutter_api_new(messenger, nullptr); pigeon_example_package_message_flutter_api_flutter_method( self->flutter_api, "hello", nullptr, flutter_method_cb, self); ``` diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index ee8e3c1c03f8..f8ace1a89ef6 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -41,8 +41,16 @@ PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( FlValue* data) { PigeonExamplePackageMessageData* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( g_object_new(pigeon_example_package_message_data_get_type(), nullptr)); - self->name = g_strdup(name); - self->description = g_strdup(description); + if (name != nullptr) { + self->name = g_strdup(name); + } else { + self->name = nullptr; + } + if (description != nullptr) { + self->description = g_strdup(description); + } else { + self->description = nullptr; + } self->code = code; self->data = fl_value_ref(data); return self; @@ -92,13 +100,15 @@ static FlValue* pigeon_example_package_message_data_to_list( static PigeonExamplePackageMessageData* pigeon_example_package_message_data_new_from_list(FlValue* values) { FlValue* value0 = fl_value_get_list_value(values, 0); - const gchar* name = fl_value_get_type(value0) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_string(value0); + const gchar* name = nullptr; + if (fl_value_get_type(value0) != FL_VALUE_TYPE_NULL) { + name = fl_value_get_string(value0); + } FlValue* value1 = fl_value_get_list_value(values, 1); - const gchar* description = fl_value_get_type(value1) == FL_VALUE_TYPE_NULL - ? nullptr - : fl_value_get_string(value1); + const gchar* description = nullptr; + if (fl_value_get_type(value1) != FL_VALUE_TYPE_NULL) { + description = fl_value_get_string(value1); + } FlValue* value2 = fl_value_get_list_value(values, 2); PigeonExamplePackageCode code = static_cast( fl_value_get_int(reinterpret_cast( @@ -184,7 +194,7 @@ pigeon_example_package_message_codec_read_pigeon_example_package_message_data( return nullptr; } - return fl_value_new_custom_object_take(129, G_OBJECT(value)); + return fl_value_new_custom_object(129, G_OBJECT(value)); } static FlValue* @@ -418,6 +428,7 @@ struct _PigeonExamplePackageExampleHostApi { FlBinaryMessenger* messenger; const PigeonExamplePackageExampleHostApiVTable* vtable; + gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; @@ -505,6 +516,7 @@ static void pigeon_example_package_example_host_api_dispose(GObject* object) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(object); g_clear_object(&self->messenger); + g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } @@ -527,38 +539,57 @@ static void pigeon_example_package_example_host_api_class_init( } PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( pigeon_example_package_example_host_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = g_strdup(suffix); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(PigeonExamplePackageMessageCodec) codec = pigeon_example_package_message_codec_new(); - self->get_host_language_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_example_package." - "ExampleHostApi.getHostLanguage", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* get_host_language_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package." + "ExampleHostApi.getHostLanguage.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_example_package." + "ExampleHostApi.getHostLanguage"); + self->get_host_language_channel = fl_basic_message_channel_new( + messenger, get_host_language_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->get_host_language_channel, pigeon_example_package_example_host_api_get_host_language_cb, self, nullptr); - self->add_channel = fl_basic_message_channel_new( - messenger, "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* add_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add.%" + "s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add"); + self->add_channel = fl_basic_message_channel_new(messenger, add_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->add_channel, pigeon_example_package_example_host_api_add_cb, self, nullptr); + g_autofree gchar* send_message_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package." + "ExampleHostApi.sendMessage.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_example_package." + "ExampleHostApi.sendMessage"); self->send_message_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage", - FL_MESSAGE_CODEC(codec)); + messenger, send_message_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->send_message_channel, pigeon_example_package_example_host_api_send_message_cb, self, nullptr); @@ -602,6 +633,7 @@ struct _PigeonExamplePackageMessageFlutterApi { GObject parent_instance; FlMethodChannel* channel; + gchar* suffix; }; G_DEFINE_TYPE(PigeonExamplePackageMessageFlutterApi, @@ -611,6 +643,7 @@ static void pigeon_example_package_message_flutter_api_dispose( GObject* object) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object); + g_clear_pointer(&self->suffix, g_free); g_clear_object(&self->channel); G_OBJECT_CLASS(pigeon_example_package_message_flutter_api_parent_class) ->dispose(object); @@ -626,10 +659,12 @@ static void pigeon_example_package_message_flutter_api_class_init( } PigeonExamplePackageMessageFlutterApi* -pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger) { +pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger, + const gchar* suffix) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); + self->suffix = g_strdup(suffix); g_autoptr(PigeonExamplePackageMessageCodec) message_codec = pigeon_example_package_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 879a3d6a4ffa..34e9eb04c532 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -80,7 +80,7 @@ typedef struct { } PigeonExamplePackageExampleHostApiVTable; PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); @@ -99,7 +99,8 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageFlutterApi, PIGEON_EXAMPLE_PACKAGE, MESSAGE_FLUTTER_API, GObject) PigeonExamplePackageMessageFlutterApi* -pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger); +pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger, + const gchar* suffix); void pigeon_example_package_message_flutter_api_flutter_method( PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index 8aa406a0eab6..773d46812c6c 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -129,14 +129,15 @@ static void my_application_activate(GApplication* application) { FlBinaryMessenger* messenger = fl_engine_get_binary_messenger(fl_view_get_engine(view)); self->example_host_api = pigeon_example_package_example_host_api_new( - messenger, &example_host_api_vtable, self, nullptr); + messenger, nullptr, &example_host_api_vtable, self, nullptr); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); // #docregion flutter-method - self->flutter_api = pigeon_example_package_message_flutter_api_new(messenger); + self->flutter_api = + pigeon_example_package_message_flutter_api_new(messenger, nullptr); pigeon_example_package_message_flutter_api_flutter_method( self->flutter_api, "hello", nullptr, flutter_method_cb, self); // #enddocregion flutter-method diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index ad2ee808fdd5..d877de430a10 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -250,7 +250,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); indent.writeln( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger);'); + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix);'); for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); @@ -316,7 +316,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); indent.writeln( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar *suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { @@ -821,6 +821,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeObjectStruct(indent, module, api.name, () { indent.writeln('FlMethodChannel* channel;'); + indent.writeln('gchar *suffix;'); }); indent.newln(); @@ -829,6 +830,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); + indent.writeln('g_clear_pointer(&self->suffix, g_free);'); indent.writeln('g_clear_object(&self->channel);'); }); @@ -840,9 +842,10 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger) {', '}', - () { + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix) {', + '}', () { _writeObjectNew(indent, module, api.name); + indent.writeln('self->suffix = g_strdup(suffix);'); indent.writeln( 'g_autoptr($codecClassName) message_codec = ${codecMethodPrefix}_new();'); indent.writeln( @@ -1025,6 +1028,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectStruct(indent, module, api.name, () { indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('const ${className}VTable* vtable;'); + indent.writeln('gchar* suffix;'); indent.writeln('gpointer user_data;'); indent.writeln('GDestroyNotify user_data_free_func;'); @@ -1122,6 +1126,7 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); indent.writeln('g_clear_object(&self->messenger);'); + indent.writeln('g_clear_pointer(&self->suffix, g_free);'); indent.writeScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); }); @@ -1142,11 +1147,12 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); indent.writeScoped( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', '}', () { _writeObjectNew(indent, module, api.name); indent.writeln( 'self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));'); + indent.writeln('self->suffix = g_strdup(suffix);'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); indent.writeln('self->user_data_free_func = user_data_free_func;'); @@ -1159,7 +1165,9 @@ class GObjectSourceGenerator extends StructuredGenerator { final String channelName = makeChannelName(api, method, dartPackageName); indent.writeln( - 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, "$channelName", FL_MESSAGE_CODEC(codec));'); + 'g_autofree gchar* ${methodName}_channel_name = self->suffix != nullptr ? g_strdup_printf("$channelName.%s", self->suffix) : g_strdup("$channelName");'); + indent.writeln( + 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); indent.writeln( 'fl_basic_message_channel_set_message_handler(self->${methodName}_channel, ${methodPrefix}_${methodName}_cb, self, nullptr);'); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index c8e0e9d5efe8..ed0ab07f81d7 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -8021,6 +8021,7 @@ struct _CoreTestsPigeonTestHostIntegrationCoreApi { FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable; + gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; @@ -10195,6 +10196,7 @@ static void core_tests_pigeon_test_host_integration_core_api_dispose( CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(object); g_clear_object(&self->messenger); + g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } @@ -10303,7 +10305,7 @@ static void core_tests_pigeon_test_host_integration_core_api_class_init( CoreTestsPigeonTestHostIntegrationCoreApi* core_tests_pigeon_test_host_integration_core_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { CoreTestsPigeonTestHostIntegrationCoreApi* self = @@ -10311,783 +10313,1346 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = g_strdup(suffix); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* noop_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.noop.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.noop"); self->noop_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop", - FL_MESSAGE_CODEC(codec)); + messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->noop_channel, core_tests_pigeon_test_host_integration_core_api_noop_cb, self, nullptr); - self->echo_all_types_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAllTypes", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_all_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllTypes"); + self->echo_all_types_channel = fl_basic_message_channel_new( + messenger, echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_all_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, self, nullptr); - self->throw_error_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.throwError", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* throw_error_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwError.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwError"); + self->throw_error_channel = fl_basic_message_channel_new( + messenger, throw_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_cb, self, nullptr); + g_autofree gchar* throw_error_from_void_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwErrorFromVoid.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwErrorFromVoid"); self->throw_error_from_void_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "throwErrorFromVoid", - FL_MESSAGE_CODEC(codec)); + messenger, throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb, self, nullptr); + g_autofree gchar* throw_flutter_error_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwFlutterError.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwFlutterError"); self->throw_flutter_error_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "throwFlutterError", - FL_MESSAGE_CODEC(codec)); + messenger, throw_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb, self, nullptr); - self->echo_int_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoInt", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_int_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoInt"); + self->echo_int_channel = fl_basic_message_channel_new( + messenger, echo_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_int_cb, self, nullptr); - self->echo_double_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoDouble", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoDouble"); + self->echo_double_channel = fl_basic_message_channel_new( + messenger, echo_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_double_cb, self, nullptr); - self->echo_bool_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoBool", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_bool_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoBool"); + self->echo_bool_channel = fl_basic_message_channel_new( + messenger, echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, self, nullptr); - self->echo_string_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoString", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoString"); + self->echo_string_channel = fl_basic_message_channel_new( + messenger, echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_string_cb, self, nullptr); - self->echo_uint8_list_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoUint8List", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoUint8List"); + self->echo_uint8_list_channel = fl_basic_message_channel_new( + messenger, echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, self, nullptr); - self->echo_object_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoObject", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_object_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoObject.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoObject"); + self->echo_object_channel = fl_basic_message_channel_new( + messenger, echo_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_object_cb, self, nullptr); - self->echo_list_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoList", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_list_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoList"); + self->echo_list_channel = fl_basic_message_channel_new( + messenger, echo_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_list_cb, self, nullptr); - self->echo_map_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoMap", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_map_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoMap"); + self->echo_map_channel = fl_basic_message_channel_new( + messenger, echo_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_map_cb, self, nullptr); + g_autofree gchar* echo_class_wrapper_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoClassWrapper.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoClassWrapper"); self->echo_class_wrapper_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoClassWrapper", - FL_MESSAGE_CODEC(codec)); + messenger, echo_class_wrapper_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_class_wrapper_channel, core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb, self, nullptr); - self->echo_enum_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoEnum", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_enum_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.echoEnum"); + self->echo_enum_channel = fl_basic_message_channel_new( + messenger, echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, self, nullptr); + g_autofree gchar* echo_named_default_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNamedDefaultString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNamedDefaultString"); self->echo_named_default_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNamedDefaultString", + messenger, echo_named_default_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_named_default_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb, self, nullptr); + g_autofree gchar* echo_optional_default_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoOptionalDefaultDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoOptionalDefaultDouble"); self->echo_optional_default_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoOptionalDefaultDouble", + messenger, echo_optional_default_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_optional_default_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb, self, nullptr); + g_autofree gchar* echo_required_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoRequiredInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoRequiredInt"); self->echo_required_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoRequiredInt", - FL_MESSAGE_CODEC(codec)); + messenger, echo_required_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_required_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb, self, nullptr); + g_autofree gchar* echo_all_nullable_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllNullableTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllNullableTypes"); self->echo_all_nullable_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAllNullableTypes", - FL_MESSAGE_CODEC(codec)); + messenger, echo_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb, self, nullptr); + g_autofree gchar* echo_all_nullable_types_without_recursion_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion.%" + "s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion"); self->echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAllNullableTypesWithoutRecursion", + messenger, echo_all_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb, self, nullptr); + g_autofree gchar* extract_nested_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.extractNestedNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.extractNestedNullableString"); self->extract_nested_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "extractNestedNullableString", + messenger, extract_nested_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->extract_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb, self, nullptr); + g_autofree gchar* create_nested_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.createNestedNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.createNestedNullableString"); self->create_nested_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "createNestedNullableString", + messenger, create_nested_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->create_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb, self, nullptr); + g_autofree gchar* send_multiple_nullable_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.sendMultipleNullableTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.sendMultipleNullableTypes"); self->send_multiple_nullable_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "sendMultipleNullableTypes", + messenger, send_multiple_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->send_multiple_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb, self, nullptr); + g_autofree gchar* + send_multiple_nullable_types_without_recursion_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion"); self->send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "sendMultipleNullableTypesWithoutRecursion", + send_multiple_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb, self, nullptr); + g_autofree gchar* echo_nullable_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableInt"); self->echo_nullable_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableInt", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb, self, nullptr); + g_autofree gchar* echo_nullable_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableDouble"); self->echo_nullable_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableDouble", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb, self, nullptr); + g_autofree gchar* echo_nullable_bool_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableBool"); self->echo_nullable_bool_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableBool", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb, self, nullptr); + g_autofree gchar* echo_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableString"); self->echo_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableString", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb, self, nullptr); + g_autofree gchar* echo_nullable_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableUint8List"); self->echo_nullable_uint8_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableUint8List", + messenger, echo_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb, self, nullptr); + g_autofree gchar* echo_nullable_object_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableObject.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableObject"); self->echo_nullable_object_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableObject", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb, self, nullptr); + g_autofree gchar* echo_nullable_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableList"); self->echo_nullable_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableList", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb, self, nullptr); + g_autofree gchar* echo_nullable_map_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableMap"); self->echo_nullable_map_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableMap", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb, self, nullptr); + g_autofree gchar* echo_nullable_enum_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNullableEnum"); self->echo_nullable_enum_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNullableEnum", - FL_MESSAGE_CODEC(codec)); + messenger, echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb, self, nullptr); + g_autofree gchar* echo_optional_nullable_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoOptionalNullableInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoOptionalNullableInt"); self->echo_optional_nullable_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoOptionalNullableInt", + messenger, echo_optional_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_optional_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb, self, nullptr); + g_autofree gchar* echo_named_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNamedNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoNamedNullableString"); self->echo_named_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoNamedNullableString", + messenger, echo_named_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_named_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb, self, nullptr); - self->noop_async_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.noopAsync", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* noop_async_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.noopAsync.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostIntegrationCoreApi.noopAsync"); + self->noop_async_channel = fl_basic_message_channel_new( + messenger, noop_async_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->noop_async_channel, core_tests_pigeon_test_host_integration_core_api_noop_async_cb, self, nullptr); - self->echo_async_int_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAsyncInt", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_async_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncInt"); + self->echo_async_int_channel = fl_basic_message_channel_new( + messenger, echo_async_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, self, nullptr); + g_autofree gchar* echo_async_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncDouble"); self->echo_async_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncDouble", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb, self, nullptr); - self->echo_async_bool_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAsyncBool", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_async_bool_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncBool"); + self->echo_async_bool_channel = fl_basic_message_channel_new( + messenger, echo_async_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, self, nullptr); + g_autofree gchar* echo_async_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncString"); self->echo_async_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncString", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb, self, nullptr); + g_autofree gchar* echo_async_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncUint8List"); self->echo_async_uint8_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncUint8List", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb, self, nullptr); + g_autofree gchar* echo_async_object_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncObject.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncObject"); self->echo_async_object_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncObject", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb, self, nullptr); - self->echo_async_list_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAsyncList", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_async_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncList"); + self->echo_async_list_channel = fl_basic_message_channel_new( + messenger, echo_async_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, self, nullptr); - self->echo_async_map_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAsyncMap", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_async_map_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncMap"); + self->echo_async_map_channel = fl_basic_message_channel_new( + messenger, echo_async_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, self, nullptr); - self->echo_async_enum_channel = - fl_basic_message_channel_new(messenger, - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoAsyncEnum", - FL_MESSAGE_CODEC(codec)); + g_autofree gchar* echo_async_enum_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncEnum"); + self->echo_async_enum_channel = fl_basic_message_channel_new( + messenger, echo_async_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, self, nullptr); + g_autofree gchar* throw_async_error_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncError.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncError"); self->throw_async_error_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "throwAsyncError", - FL_MESSAGE_CODEC(codec)); + messenger, throw_async_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_async_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, self, nullptr); + g_autofree gchar* throw_async_error_from_void_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncErrorFromVoid.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncErrorFromVoid"); self->throw_async_error_from_void_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "throwAsyncErrorFromVoid", + messenger, throw_async_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_async_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, self, nullptr); + g_autofree gchar* throw_async_flutter_error_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncFlutterError.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.throwAsyncFlutterError"); self->throw_async_flutter_error_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "throwAsyncFlutterError", + messenger, throw_async_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_async_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, self, nullptr); + g_autofree gchar* echo_async_all_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncAllTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncAllTypes"); self->echo_async_all_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncAllTypes", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_all_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_all_nullable_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes"); self->echo_async_nullable_all_nullable_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableAllNullableTypes", + messenger, echo_async_nullable_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb, self, nullptr); + g_autofree gchar* + echo_async_nullable_all_nullable_types_without_recursion_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypesWithoutRecursion.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypesWithoutRecursion"); self->echo_async_nullable_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableAllNullableTypesWithoutRecursion", + echo_async_nullable_all_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableInt"); self->echo_async_nullable_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableInt", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableDouble"); self->echo_async_nullable_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableDouble", + messenger, echo_async_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_bool_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableBool"); self->echo_async_nullable_bool_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableBool", + messenger, echo_async_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableString"); self->echo_async_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableString", + messenger, echo_async_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableUint8List"); self->echo_async_nullable_uint8_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableUint8List", + messenger, echo_async_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_object_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableObject.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableObject"); self->echo_async_nullable_object_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableObject", + messenger, echo_async_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableList"); self->echo_async_nullable_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableList", + messenger, echo_async_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_map_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableMap"); self->echo_async_nullable_map_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableMap", - FL_MESSAGE_CODEC(codec)); + messenger, echo_async_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, self, nullptr); + g_autofree gchar* echo_async_nullable_enum_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.echoAsyncNullableEnum"); self->echo_async_nullable_enum_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "echoAsyncNullableEnum", + messenger, echo_async_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, self, nullptr); + g_autofree gchar* call_flutter_noop_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterNoop.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterNoop"); self->call_flutter_noop_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterNoop", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_noop_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, self, nullptr); + g_autofree gchar* call_flutter_throw_error_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterThrowError.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterThrowError"); self->call_flutter_throw_error_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterThrowError", + messenger, call_flutter_throw_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_throw_error_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, self, nullptr); + g_autofree gchar* call_flutter_throw_error_from_void_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterThrowErrorFromVoid.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterThrowErrorFromVoid"); self->call_flutter_throw_error_from_void_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterThrowErrorFromVoid", + messenger, call_flutter_throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_all_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoAllTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoAllTypes"); self->call_flutter_echo_all_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoAllTypes", + messenger, call_flutter_echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_all_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_all_nullable_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoAllNullableTypes.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoAllNullableTypes"); self->call_flutter_echo_all_nullable_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoAllNullableTypes", + messenger, call_flutter_echo_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, self, nullptr); + g_autofree gchar* call_flutter_send_multiple_nullable_types_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes.%" + "s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes"); self->call_flutter_send_multiple_nullable_types_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterSendMultipleNullableTypes", + messenger, call_flutter_send_multiple_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_send_multiple_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb, self, nullptr); + g_autofree gchar* + call_flutter_echo_all_nullable_types_without_recursion_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypesWithoutRecursion.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypesWithoutRecursion"); self->call_flutter_echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoAllNullableTypesWithoutRecursion", + call_flutter_echo_all_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb, self, nullptr); + g_autofree gchar* + call_flutter_send_multiple_nullable_types_without_recursion_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypesWithoutRecursion.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypesWithoutRecursion"); self->call_flutter_send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterSendMultipleNullableTypesWithoutRecursion", + call_flutter_send_multiple_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_bool_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoBool"); self->call_flutter_echo_bool_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoBool", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoInt"); self->call_flutter_echo_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoInt", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_echo_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_int_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoDouble"); self->call_flutter_echo_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoDouble", + messenger, call_flutter_echo_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_double_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoString"); self->call_flutter_echo_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoString", + messenger, call_flutter_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoUint8List"); self->call_flutter_echo_uint8_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoUint8List", + messenger, call_flutter_echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoList"); self->call_flutter_echo_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoList", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_echo_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_map_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoMap"); self->call_flutter_echo_map_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoMap", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_echo_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_map_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_enum_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoEnum"); self->call_flutter_echo_enum_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoEnum", - FL_MESSAGE_CODEC(codec)); + messenger, call_flutter_echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_enum_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_bool_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableBool.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableBool"); self->call_flutter_echo_nullable_bool_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableBool", + messenger, call_flutter_echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_int_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableInt.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableInt"); self->call_flutter_echo_nullable_int_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableInt", + messenger, call_flutter_echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_double_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableDouble.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableDouble"); self->call_flutter_echo_nullable_double_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableDouble", + messenger, call_flutter_echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableString"); self->call_flutter_echo_nullable_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableString", + messenger, call_flutter_echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_uint8_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableUint8List.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableUint8List"); self->call_flutter_echo_nullable_uint8_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableUint8List", + messenger, call_flutter_echo_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_list_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableList.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableList"); self->call_flutter_echo_nullable_list_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableList", + messenger, call_flutter_echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_map_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableMap.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableMap"); self->call_flutter_echo_nullable_map_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableMap", + messenger, call_flutter_echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, self, nullptr); + g_autofree gchar* call_flutter_echo_nullable_enum_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableEnum.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterEchoNullableEnum"); self->call_flutter_echo_nullable_enum_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterEchoNullableEnum", + messenger, call_flutter_echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, self, nullptr); + g_autofree gchar* call_flutter_small_api_echo_string_channel_name = + self->suffix != nullptr + ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterSmallApiEchoString.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi.callFlutterSmallApiEchoString"); self->call_flutter_small_api_echo_string_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." - "callFlutterSmallApiEchoString", + messenger, call_flutter_small_api_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_small_api_echo_string_channel, @@ -12865,6 +13430,7 @@ struct _CoreTestsPigeonTestFlutterIntegrationCoreApi { GObject parent_instance; FlMethodChannel* channel; + gchar* suffix; }; G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApi, @@ -12875,6 +13441,7 @@ static void core_tests_pigeon_test_flutter_integration_core_api_dispose( GObject* object) { CoreTestsPigeonTestFlutterIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object); + g_clear_pointer(&self->suffix, g_free); g_clear_object(&self->channel); G_OBJECT_CLASS( core_tests_pigeon_test_flutter_integration_core_api_parent_class) @@ -12892,11 +13459,12 @@ static void core_tests_pigeon_test_flutter_integration_core_api_class_init( CoreTestsPigeonTestFlutterIntegrationCoreApi* core_tests_pigeon_test_flutter_integration_core_api_new( - FlBinaryMessenger* messenger) { + FlBinaryMessenger* messenger, const gchar* suffix) { CoreTestsPigeonTestFlutterIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_flutter_integration_core_api_get_type(), nullptr)); + self->suffix = g_strdup(suffix); g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = core_tests_pigeon_test_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = @@ -13812,6 +14380,7 @@ struct _CoreTestsPigeonTestHostTrivialApi { FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostTrivialApiVTable* vtable; + gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; @@ -13850,6 +14419,7 @@ static void core_tests_pigeon_test_host_trivial_api_dispose(GObject* object) { CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(object); g_clear_object(&self->messenger); + g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } @@ -13870,23 +14440,30 @@ static void core_tests_pigeon_test_host_trivial_api_class_init( } CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = g_strdup(suffix); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* noop_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostTrivialApi.noop.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostTrivialApi.noop"); self->noop_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop", - FL_MESSAGE_CODEC(codec)); + messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->noop_channel, core_tests_pigeon_test_host_trivial_api_noop_cb, self, nullptr); @@ -14022,6 +14599,7 @@ struct _CoreTestsPigeonTestHostSmallApi { FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostSmallApiVTable* vtable; + gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; @@ -14064,6 +14642,7 @@ static void core_tests_pigeon_test_host_small_api_dispose(GObject* object) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(object); g_clear_object(&self->messenger); + g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } @@ -14085,29 +14664,42 @@ static void core_tests_pigeon_test_host_small_api_class_init( } CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = g_strdup(suffix); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* echo_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostSmallApi.echo.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostSmallApi.echo"); self->echo_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo", - FL_MESSAGE_CODEC(codec)); + messenger, echo_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, self, nullptr); + g_autofree gchar* void_void_channel_name = + self->suffix != nullptr ? g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostSmallApi.voidVoid.%s", + self->suffix) + : g_strdup( + "dev.flutter.pigeon.pigeon_integration_" + "tests.HostSmallApi.voidVoid"); self->void_void_channel = fl_basic_message_channel_new( - messenger, - "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid", - FL_MESSAGE_CODEC(codec)); + messenger, void_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->void_void_channel, core_tests_pigeon_test_host_small_api_void_void_cb, self, nullptr); @@ -14176,6 +14768,7 @@ struct _CoreTestsPigeonTestFlutterSmallApi { GObject parent_instance; FlMethodChannel* channel; + gchar* suffix; }; G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApi, @@ -14184,6 +14777,7 @@ G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApi, static void core_tests_pigeon_test_flutter_small_api_dispose(GObject* object) { CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object); + g_clear_pointer(&self->suffix, g_free); g_clear_object(&self->channel); G_OBJECT_CLASS(core_tests_pigeon_test_flutter_small_api_parent_class) ->dispose(object); @@ -14199,10 +14793,12 @@ static void core_tests_pigeon_test_flutter_small_api_class_init( } CoreTestsPigeonTestFlutterSmallApi* -core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger) { +core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger, + const gchar* suffix) { CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(g_object_new( core_tests_pigeon_test_flutter_small_api_get_type(), nullptr)); + self->suffix = g_strdup(suffix); g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = core_tests_pigeon_test_message_codec_new(); g_autoptr(FlStandardMethodCodec) codec = diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index aa850ae988a4..54ec8b6a3022 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -1112,7 +1112,7 @@ typedef struct { CoreTestsPigeonTestHostIntegrationCoreApi* core_tests_pigeon_test_host_integration_core_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); @@ -1615,7 +1615,7 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApi, CoreTestsPigeonTestFlutterIntegrationCoreApi* core_tests_pigeon_test_flutter_integration_core_api_new( - FlBinaryMessenger* messenger); + FlBinaryMessenger* messenger, const gchar* suffix); // A no-op function taking no arguments and returning no value, to sanity // test basic calling. @@ -1926,7 +1926,7 @@ typedef struct { } CoreTestsPigeonTestHostTrivialApiVTable; CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); @@ -1944,7 +1944,7 @@ typedef struct { } CoreTestsPigeonTestHostSmallApiVTable; CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( - FlBinaryMessenger* messenger, + FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); @@ -1973,7 +1973,8 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterSmallApi, CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API, GObject) CoreTestsPigeonTestFlutterSmallApi* -core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger); +core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger, + const gchar* suffix); void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( CoreTestsPigeonTestFlutterSmallApi* self, diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 77e81785e0d9..a5843fca36c4 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1403,19 +1403,21 @@ static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); self->host_core_api = core_tests_pigeon_test_host_integration_core_api_new( - messenger, &host_core_api_vtable, g_object_ref(self), g_object_unref); + messenger, nullptr, &host_core_api_vtable, g_object_ref(self), + g_object_unref); self->host_small_api_one = core_tests_pigeon_test_host_small_api_new( - messenger, &host_small_api_vtable, g_object_ref(self), - g_object_unref); // FIXME: Suffix "suffixOne" + messenger, "suffixOne", &host_small_api_vtable, g_object_ref(self), + g_object_unref); self->host_small_api_two = core_tests_pigeon_test_host_small_api_new( - messenger, &host_small_api_vtable, g_object_ref(self), - g_object_unref); // FIXME: Suffix "suffixTwo" + messenger, "suffixTwo", &host_small_api_vtable, g_object_ref(self), + g_object_unref); self->flutter_core_api = - core_tests_pigeon_test_flutter_integration_core_api_new(messenger); - self->flutter_small_api_one = core_tests_pigeon_test_flutter_small_api_new( - messenger); // FIXME: Suffix "suffixOne" - self->flutter_small_api_two = core_tests_pigeon_test_flutter_small_api_new( - messenger); // FIXME: Suffix "suffixTwo" + core_tests_pigeon_test_flutter_integration_core_api_new(messenger, + nullptr); + self->flutter_small_api_one = + core_tests_pigeon_test_flutter_small_api_new(messenger, "suffixOne"); + self->flutter_small_api_two = + core_tests_pigeon_test_flutter_small_api_new(messenger, "suffixTwo"); return self; } From b907b93cc26efe2ce6dafa71e0605478a720c74e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 10:28:50 +1200 Subject: [PATCH 100/127] Enable working tests --- .../shared_test_plugin_code/lib/integration_tests.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 3513598651ae..ba26cd7dd096 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -1488,7 +1488,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(e.message, contains('suffixWithoutHost')); } }); - }, skip: _linuxBringup); + }); // These tests rely on the async Dart->host calls to work correctly, since // the host->Dart call is wrapped in a driving Dart->host call, so any test From 58f53d5ce99d15316ab40b5b8bfabf8135cb1c0d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 11:42:59 +1200 Subject: [PATCH 101/127] Fix Flutter api calls --- packages/pigeon/lib/gobject_generator.dart | 88 +- .../lib/integration_tests.dart | 2 +- .../linux/pigeon/core_tests.gen.cc | 2282 +++++++++-------- 3 files changed, 1317 insertions(+), 1055 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index d877de430a10..a50265d887b9 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -820,7 +820,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeObjectStruct(indent, module, api.name, () { - indent.writeln('FlMethodChannel* channel;'); + indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('gchar *suffix;'); }); @@ -830,8 +830,8 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); + indent.writeln('g_clear_object(&self->messenger);'); indent.writeln('g_clear_pointer(&self->suffix, g_free);'); - indent.writeln('g_clear_object(&self->channel);'); }); indent.newln(); @@ -845,19 +845,24 @@ class GObjectSourceGenerator extends StructuredGenerator { '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix) {', '}', () { _writeObjectNew(indent, module, api.name); - indent.writeln('self->suffix = g_strdup(suffix);'); - indent.writeln( - 'g_autoptr($codecClassName) message_codec = ${codecMethodPrefix}_new();'); indent.writeln( - 'g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new_with_message_codec(FL_STANDARD_MESSAGE_CODEC(message_codec));'); + 'self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));'); indent.writeln( - 'self->channel = fl_method_channel_new(messenger, "${api.name}", FL_METHOD_CODEC(codec));'); + 'self->suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); indent.writeln('return self;'); }); for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); + indent.newln(); + indent.writeScoped( + 'static void ${methodPrefix}_${methodName}_cb(GObject* object, GAsyncResult* result, gpointer user_data) {', + '}', () { + indent.writeln('GTask* task = G_TASK(user_data);'); + indent.writeln('g_task_return_pointer(task, result, g_object_unref);'); + }); + final List asyncArgs = ['$className* self']; for (final Parameter param in method.parameters) { final String name = _snakeCaseFromCamelCase(param.name); @@ -882,8 +887,19 @@ class GObjectSourceGenerator extends StructuredGenerator { lengthVariableName: '${name}_length'); indent.writeln('fl_value_append_take(args, $value);'); } + final String channelName = + makeChannelName(api, method, dartPackageName); + indent.writeln( + 'g_autofree gchar* channel_name = g_strdup_printf("$channelName%s", self->suffix);'); + indent.writeln( + 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); indent.writeln( - 'fl_method_channel_invoke_method(self->channel, "${method.name}", args, cancellable, callback, user_data);'); + 'FlBasicMessageChannel* channel = fl_basic_message_channel_new(self->messenger, channel_name, FL_MESSAGE_CODEC(codec));'); + indent.writeln( + 'GTask* task = g_task_new(self, cancellable, callback, user_data);'); + indent.writeln('g_task_set_task_data(task, channel, g_object_unref);'); + indent.writeln( + 'fl_basic_message_channel_send(channel, args, cancellable, ${methodPrefix}_${methodName}_cb, task);'); }); final String returnType = @@ -900,41 +916,66 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeScoped( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", '}', () { + indent.writeln('g_autoptr(GTask) task = G_TASK(result);'); + indent.writeln( + 'GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr));'); + indent.writeln( + 'FlBasicMessageChannel* channel = FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task));'); indent.writeln( - 'g_autoptr(FlMethodResponse) response = fl_method_channel_invoke_method_finish(self->channel, result, error);'); + 'g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error);'); indent.writeScoped('if (response == nullptr) {', '}', () { indent.writeln('return FALSE;'); }); - - indent.newln(); - indent.writeln( - 'g_autoptr(FlValue) r = fl_method_response_get_result(response, error);'); - indent.writeScoped('if (r == nullptr) {', '}', () { + indent.writeScoped('if (fl_value_get_length(response) > 1) {', '}', () { + indent.writeln('// FIXME: Set error'); indent.writeln('return FALSE;'); }); - if (returnType != 'void') { indent.newln(); + indent.writeln('FlValue* rv = fl_value_get_list_value(response, 0);'); final String returnValue = - _fromFlValue(module, method.returnType, 'r'); + _fromFlValue(module, method.returnType, 'rv'); if (_isNullablePrimitiveType(method.returnType)) { final String primitiveType = _getType(module, method.returnType, primitive: true); indent.writeScoped( - 'if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) {', '}', () { + 'if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) {', '}', () { indent.writeln( '*return_value = static_cast<$primitiveType*>(malloc(sizeof($primitiveType)));'); indent.writeln('**return_value = $returnValue;'); + if (_isNumericListType(method.returnType)) { + indent + .writeln('*return_value_length = fl_value_get_length(rv);'); + } }); indent.writeScoped('else {', '}', () { indent.writeln('*return_value = nullptr;'); + if (_isNumericListType(method.returnType)) { + indent.writeln('*return_value_length = 0;'); + } + }); + } else if (method.returnType.isNullable) { + indent.writeScoped( + 'if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) {', '}', () { + indent.writeln( + '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(rv)')};'); + if (_isNumericListType(method.returnType)) { + indent + .writeln('*return_value_length = fl_value_get_length(rv);'); + } + }); + indent.writeScoped('else {', '}', () { + indent.writeln('*return_value = nullptr;'); + if (_isNumericListType(method.returnType)) { + indent.writeln('*return_value_length = 0;'); + } }); } else { indent.writeln( - '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(r)')};'); - } - if (_isNumericListType(method.returnType)) { - indent.writeln('*return_value_length = fl_value_get_length(r);'); + '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(rv)')};'); + if (_isNumericListType(method.returnType)) { + indent.writeln('*return_value_length = fl_value_get_length(rv);'); + } } } @@ -1152,7 +1193,8 @@ class GObjectSourceGenerator extends StructuredGenerator { _writeObjectNew(indent, module, api.name); indent.writeln( 'self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));'); - indent.writeln('self->suffix = g_strdup(suffix);'); + indent.writeln( + 'self->suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); indent.writeln('self->user_data_free_func = user_data_free_func;'); @@ -1165,7 +1207,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final String channelName = makeChannelName(api, method, dartPackageName); indent.writeln( - 'g_autofree gchar* ${methodName}_channel_name = self->suffix != nullptr ? g_strdup_printf("$channelName.%s", self->suffix) : g_strdup("$channelName");'); + 'g_autofree gchar* ${methodName}_channel_name = g_strdup_printf("$channelName%s", self->suffix);'); indent.writeln( 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); indent.writeln( diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index ba26cd7dd096..4bd53b814869 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -1872,7 +1872,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { final AnEnum? echoEnum = await api.callFlutterEchoNullableEnum(sentEnum); expect(echoEnum, sentEnum); }); - }, skip: _linuxBringup); + }); group('Flutter API with suffix', () { setUp(() { diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index ed0ab07f81d7..63f1ef37e4e2 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -10313,240 +10313,167 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = g_strdup(suffix); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); - g_autofree gchar* noop_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.noop.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.noop"); + g_autofree gchar* noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop%" + "s", + self->suffix); self->noop_channel = fl_basic_message_channel_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->noop_channel, core_tests_pigeon_test_host_integration_core_api_noop_cb, self, nullptr); - g_autofree gchar* echo_all_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllTypes"); + g_autofree gchar* echo_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllTypes%s", + self->suffix); self->echo_all_types_channel = fl_basic_message_channel_new( messenger, echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_all_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, self, nullptr); - g_autofree gchar* throw_error_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwError.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwError"); + g_autofree gchar* throw_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwError%s", + self->suffix); self->throw_error_channel = fl_basic_message_channel_new( messenger, throw_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_cb, self, nullptr); - g_autofree gchar* throw_error_from_void_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwErrorFromVoid.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwErrorFromVoid"); + g_autofree gchar* throw_error_from_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwErrorFromVoid%s", + self->suffix); self->throw_error_from_void_channel = fl_basic_message_channel_new( messenger, throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb, self, nullptr); - g_autofree gchar* throw_flutter_error_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwFlutterError.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwFlutterError"); + g_autofree gchar* throw_flutter_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwFlutterError%s", + self->suffix); self->throw_flutter_error_channel = fl_basic_message_channel_new( messenger, throw_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb, self, nullptr); - g_autofree gchar* echo_int_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoInt"); + g_autofree gchar* echo_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoInt%s", + self->suffix); self->echo_int_channel = fl_basic_message_channel_new( messenger, echo_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_int_cb, self, nullptr); - g_autofree gchar* echo_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoDouble"); + g_autofree gchar* echo_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoDouble%s", + self->suffix); self->echo_double_channel = fl_basic_message_channel_new( messenger, echo_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_double_cb, self, nullptr); - g_autofree gchar* echo_bool_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoBool"); + g_autofree gchar* echo_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoBool%s", + self->suffix); self->echo_bool_channel = fl_basic_message_channel_new( messenger, echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, self, nullptr); - g_autofree gchar* echo_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoString"); + g_autofree gchar* echo_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoString%s", + self->suffix); self->echo_string_channel = fl_basic_message_channel_new( messenger, echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_string_cb, self, nullptr); - g_autofree gchar* echo_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoUint8List"); + g_autofree gchar* echo_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoUint8List%s", + self->suffix); self->echo_uint8_list_channel = fl_basic_message_channel_new( messenger, echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, self, nullptr); - g_autofree gchar* echo_object_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoObject.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoObject"); + g_autofree gchar* echo_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoObject%s", + self->suffix); self->echo_object_channel = fl_basic_message_channel_new( messenger, echo_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_object_cb, self, nullptr); - g_autofree gchar* echo_list_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoList"); + g_autofree gchar* echo_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoList%s", + self->suffix); self->echo_list_channel = fl_basic_message_channel_new( messenger, echo_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_list_cb, self, nullptr); - g_autofree gchar* echo_map_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoMap"); + g_autofree gchar* echo_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoMap%s", + self->suffix); self->echo_map_channel = fl_basic_message_channel_new( messenger, echo_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_map_cb, self, nullptr); - g_autofree gchar* echo_class_wrapper_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoClassWrapper.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoClassWrapper"); + g_autofree gchar* echo_class_wrapper_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoClassWrapper%s", + self->suffix); self->echo_class_wrapper_channel = fl_basic_message_channel_new( messenger, echo_class_wrapper_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_class_wrapper_channel, core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb, self, nullptr); - g_autofree gchar* echo_enum_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.echoEnum"); + g_autofree gchar* echo_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoEnum%s", + self->suffix); self->echo_enum_channel = fl_basic_message_channel_new( messenger, echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, self, nullptr); - g_autofree gchar* echo_named_default_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNamedDefaultString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNamedDefaultString"); + g_autofree gchar* echo_named_default_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedDefaultString%s", + self->suffix); self->echo_named_default_string_channel = fl_basic_message_channel_new( messenger, echo_named_default_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10554,15 +10481,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_named_default_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb, self, nullptr); - g_autofree gchar* echo_optional_default_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoOptionalDefaultDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoOptionalDefaultDouble"); + g_autofree gchar* echo_optional_default_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalDefaultDouble%s", + self->suffix); self->echo_optional_default_double_channel = fl_basic_message_channel_new( messenger, echo_optional_default_double_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10570,30 +10492,20 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_optional_default_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb, self, nullptr); - g_autofree gchar* echo_required_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoRequiredInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoRequiredInt"); + g_autofree gchar* echo_required_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoRequiredInt%s", + self->suffix); self->echo_required_int_channel = fl_basic_message_channel_new( messenger, echo_required_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_required_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb, self, nullptr); - g_autofree gchar* echo_all_nullable_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllNullableTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllNullableTypes"); + g_autofree gchar* echo_all_nullable_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypes%s", + self->suffix); self->echo_all_nullable_types_channel = fl_basic_message_channel_new( messenger, echo_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -10601,15 +10513,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb, self, nullptr); g_autofree gchar* echo_all_nullable_types_without_recursion_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion.%" - "s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypesWithoutRecursion%s", + self->suffix); self->echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, echo_all_nullable_types_without_recursion_channel_name, @@ -10619,14 +10526,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb, self, nullptr); g_autofree gchar* extract_nested_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.extractNestedNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.extractNestedNullableString"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "extractNestedNullableString%s", + self->suffix); self->extract_nested_nullable_string_channel = fl_basic_message_channel_new( messenger, extract_nested_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10635,14 +10538,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb, self, nullptr); g_autofree gchar* create_nested_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.createNestedNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.createNestedNullableString"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "createNestedNullableString%s", + self->suffix); self->create_nested_nullable_string_channel = fl_basic_message_channel_new( messenger, create_nested_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10650,15 +10549,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->create_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb, self, nullptr); - g_autofree gchar* send_multiple_nullable_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.sendMultipleNullableTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.sendMultipleNullableTypes"); + g_autofree gchar* send_multiple_nullable_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "sendMultipleNullableTypes%s", + self->suffix); self->send_multiple_nullable_types_channel = fl_basic_message_channel_new( messenger, send_multiple_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10668,16 +10562,11 @@ core_tests_pigeon_test_host_integration_core_api_new( self, nullptr); g_autofree gchar* send_multiple_nullable_types_without_recursion_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "sendMultipleNullableTypesWithoutRecursion.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "sendMultipleNullableTypesWithoutRecursion"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion%s", + self->suffix); self->send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -10687,75 +10576,50 @@ core_tests_pigeon_test_host_integration_core_api_new( self->send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb, self, nullptr); - g_autofree gchar* echo_nullable_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableInt"); + g_autofree gchar* echo_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableInt%s", + self->suffix); self->echo_nullable_int_channel = fl_basic_message_channel_new( messenger, echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb, self, nullptr); - g_autofree gchar* echo_nullable_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableDouble"); + g_autofree gchar* echo_nullable_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableDouble%s", + self->suffix); self->echo_nullable_double_channel = fl_basic_message_channel_new( messenger, echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb, self, nullptr); - g_autofree gchar* echo_nullable_bool_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableBool"); + g_autofree gchar* echo_nullable_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableBool%s", + self->suffix); self->echo_nullable_bool_channel = fl_basic_message_channel_new( messenger, echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb, self, nullptr); - g_autofree gchar* echo_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableString"); + g_autofree gchar* echo_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableString%s", + self->suffix); self->echo_nullable_string_channel = fl_basic_message_channel_new( messenger, echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb, self, nullptr); - g_autofree gchar* echo_nullable_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableUint8List"); + g_autofree gchar* echo_nullable_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableUint8List%s", + self->suffix); self->echo_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, echo_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10763,75 +10627,50 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb, self, nullptr); - g_autofree gchar* echo_nullable_object_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableObject.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableObject"); + g_autofree gchar* echo_nullable_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableObject%s", + self->suffix); self->echo_nullable_object_channel = fl_basic_message_channel_new( messenger, echo_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb, self, nullptr); - g_autofree gchar* echo_nullable_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableList"); + g_autofree gchar* echo_nullable_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableList%s", + self->suffix); self->echo_nullable_list_channel = fl_basic_message_channel_new( messenger, echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb, self, nullptr); - g_autofree gchar* echo_nullable_map_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableMap"); + g_autofree gchar* echo_nullable_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableMap%s", + self->suffix); self->echo_nullable_map_channel = fl_basic_message_channel_new( messenger, echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb, self, nullptr); - g_autofree gchar* echo_nullable_enum_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNullableEnum"); + g_autofree gchar* echo_nullable_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableEnum%s", + self->suffix); self->echo_nullable_enum_channel = fl_basic_message_channel_new( messenger, echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb, self, nullptr); - g_autofree gchar* echo_optional_nullable_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoOptionalNullableInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoOptionalNullableInt"); + g_autofree gchar* echo_optional_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalNullableInt%s", + self->suffix); self->echo_optional_nullable_int_channel = fl_basic_message_channel_new( messenger, echo_optional_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10839,15 +10678,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_optional_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb, self, nullptr); - g_autofree gchar* echo_named_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNamedNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoNamedNullableString"); + g_autofree gchar* echo_named_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedNullableString%s", + self->suffix); self->echo_named_nullable_string_channel = fl_basic_message_channel_new( messenger, echo_named_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -10855,179 +10689,120 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_named_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb, self, nullptr); - g_autofree gchar* noop_async_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.noopAsync.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostIntegrationCoreApi.noopAsync"); + g_autofree gchar* noop_async_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "noopAsync%s", + self->suffix); self->noop_async_channel = fl_basic_message_channel_new( messenger, noop_async_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->noop_async_channel, core_tests_pigeon_test_host_integration_core_api_noop_async_cb, self, nullptr); - g_autofree gchar* echo_async_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncInt"); + g_autofree gchar* echo_async_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncInt%s", + self->suffix); self->echo_async_int_channel = fl_basic_message_channel_new( messenger, echo_async_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, self, nullptr); - g_autofree gchar* echo_async_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncDouble"); + g_autofree gchar* echo_async_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncDouble%s", + self->suffix); self->echo_async_double_channel = fl_basic_message_channel_new( messenger, echo_async_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb, self, nullptr); - g_autofree gchar* echo_async_bool_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncBool"); + g_autofree gchar* echo_async_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncBool%s", + self->suffix); self->echo_async_bool_channel = fl_basic_message_channel_new( messenger, echo_async_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, self, nullptr); - g_autofree gchar* echo_async_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncString"); + g_autofree gchar* echo_async_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncString%s", + self->suffix); self->echo_async_string_channel = fl_basic_message_channel_new( messenger, echo_async_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb, self, nullptr); - g_autofree gchar* echo_async_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncUint8List"); + g_autofree gchar* echo_async_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncUint8List%s", + self->suffix); self->echo_async_uint8_list_channel = fl_basic_message_channel_new( messenger, echo_async_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb, self, nullptr); - g_autofree gchar* echo_async_object_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncObject.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncObject"); + g_autofree gchar* echo_async_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncObject%s", + self->suffix); self->echo_async_object_channel = fl_basic_message_channel_new( messenger, echo_async_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb, self, nullptr); - g_autofree gchar* echo_async_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncList"); + g_autofree gchar* echo_async_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncList%s", + self->suffix); self->echo_async_list_channel = fl_basic_message_channel_new( messenger, echo_async_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, self, nullptr); - g_autofree gchar* echo_async_map_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncMap"); + g_autofree gchar* echo_async_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncMap%s", + self->suffix); self->echo_async_map_channel = fl_basic_message_channel_new( messenger, echo_async_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, self, nullptr); - g_autofree gchar* echo_async_enum_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncEnum"); + g_autofree gchar* echo_async_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncEnum%s", + self->suffix); self->echo_async_enum_channel = fl_basic_message_channel_new( messenger, echo_async_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, self, nullptr); - g_autofree gchar* throw_async_error_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncError.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncError"); + g_autofree gchar* throw_async_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncError%s", + self->suffix); self->throw_async_error_channel = fl_basic_message_channel_new( messenger, throw_async_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->throw_async_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, self, nullptr); - g_autofree gchar* throw_async_error_from_void_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncErrorFromVoid.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncErrorFromVoid"); + g_autofree gchar* throw_async_error_from_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncErrorFromVoid%s", + self->suffix); self->throw_async_error_from_void_channel = fl_basic_message_channel_new( messenger, throw_async_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11035,15 +10810,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->throw_async_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, self, nullptr); - g_autofree gchar* throw_async_flutter_error_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncFlutterError.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.throwAsyncFlutterError"); + g_autofree gchar* throw_async_flutter_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncFlutterError%s", + self->suffix); self->throw_async_flutter_error_channel = fl_basic_message_channel_new( messenger, throw_async_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11051,15 +10821,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->throw_async_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, self, nullptr); - g_autofree gchar* echo_async_all_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncAllTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncAllTypes"); + g_autofree gchar* echo_async_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncAllTypes%s", + self->suffix); self->echo_async_all_types_channel = fl_basic_message_channel_new( messenger, echo_async_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -11067,14 +10832,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, self, nullptr); g_autofree gchar* echo_async_nullable_all_nullable_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypes%s", + self->suffix); self->echo_async_nullable_all_nullable_types_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_all_nullable_types_channel_name, @@ -11085,16 +10846,11 @@ core_tests_pigeon_test_host_integration_core_api_new( self, nullptr); g_autofree gchar* echo_async_nullable_all_nullable_types_without_recursion_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "echoAsyncNullableAllNullableTypesWithoutRecursion.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "echoAsyncNullableAllNullableTypesWithoutRecursion"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypesWithoutRecursion%s", + self->suffix); self->echo_async_nullable_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -11104,30 +10860,20 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableInt"); + g_autofree gchar* echo_async_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableInt%s", + self->suffix); self->echo_async_nullable_int_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableDouble"); + g_autofree gchar* echo_async_nullable_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableDouble%s", + self->suffix); self->echo_async_nullable_double_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11135,15 +10881,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_bool_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableBool"); + g_autofree gchar* echo_async_nullable_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableBool%s", + self->suffix); self->echo_async_nullable_bool_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11151,15 +10892,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableString"); + g_autofree gchar* echo_async_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableString%s", + self->suffix); self->echo_async_nullable_string_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11168,14 +10904,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, self, nullptr); g_autofree gchar* echo_async_nullable_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableUint8List"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableUint8List%s", + self->suffix); self->echo_async_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11183,15 +10915,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_object_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableObject.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableObject"); + g_autofree gchar* echo_async_nullable_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableObject%s", + self->suffix); self->echo_async_nullable_object_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11199,15 +10926,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableList"); + g_autofree gchar* echo_async_nullable_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableList%s", + self->suffix); self->echo_async_nullable_list_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11215,30 +10937,20 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_map_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableMap"); + g_autofree gchar* echo_async_nullable_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableMap%s", + self->suffix); self->echo_async_nullable_map_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_async_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, self, nullptr); - g_autofree gchar* echo_async_nullable_enum_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.echoAsyncNullableEnum"); + g_autofree gchar* echo_async_nullable_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableEnum%s", + self->suffix); self->echo_async_nullable_enum_channel = fl_basic_message_channel_new( messenger, echo_async_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11246,30 +10958,20 @@ core_tests_pigeon_test_host_integration_core_api_new( self->echo_async_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, self, nullptr); - g_autofree gchar* call_flutter_noop_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterNoop.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterNoop"); + g_autofree gchar* call_flutter_noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterNoop%s", + self->suffix); self->call_flutter_noop_channel = fl_basic_message_channel_new( messenger, call_flutter_noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_noop_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, self, nullptr); - g_autofree gchar* call_flutter_throw_error_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterThrowError.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterThrowError"); + g_autofree gchar* call_flutter_throw_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowError%s", + self->suffix); self->call_flutter_throw_error_channel = fl_basic_message_channel_new( messenger, call_flutter_throw_error_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11278,14 +10980,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, self, nullptr); g_autofree gchar* call_flutter_throw_error_from_void_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterThrowErrorFromVoid.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterThrowErrorFromVoid"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowErrorFromVoid%s", + self->suffix); self->call_flutter_throw_error_from_void_channel = fl_basic_message_channel_new( messenger, call_flutter_throw_error_from_void_channel_name, @@ -11294,15 +10992,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->call_flutter_throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_all_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoAllTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoAllTypes"); + g_autofree gchar* call_flutter_echo_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllTypes%s", + self->suffix); self->call_flutter_echo_all_types_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11311,14 +11004,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, self, nullptr); g_autofree gchar* call_flutter_echo_all_nullable_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoAllNullableTypes.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoAllNullableTypes"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypes%s", + self->suffix); self->call_flutter_echo_all_nullable_types_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_all_nullable_types_channel_name, @@ -11328,15 +11017,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, self, nullptr); g_autofree gchar* call_flutter_send_multiple_nullable_types_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes.%" - "s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypes%s", + self->suffix); self->call_flutter_send_multiple_nullable_types_channel = fl_basic_message_channel_new( messenger, call_flutter_send_multiple_nullable_types_channel_name, @@ -11347,16 +11031,11 @@ core_tests_pigeon_test_host_integration_core_api_new( self, nullptr); g_autofree gchar* call_flutter_echo_all_nullable_types_without_recursion_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "callFlutterEchoAllNullableTypesWithoutRecursion.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "callFlutterEchoAllNullableTypesWithoutRecursion"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypesWithoutRecursion%s", + self->suffix); self->call_flutter_echo_all_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -11368,16 +11047,11 @@ core_tests_pigeon_test_host_integration_core_api_new( self, nullptr); g_autofree gchar* call_flutter_send_multiple_nullable_types_without_recursion_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "callFlutterSendMultipleNullableTypesWithoutRecursion.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi." - "callFlutterSendMultipleNullableTypesWithoutRecursion"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypesWithoutRecursion%s", + self->suffix); self->call_flutter_send_multiple_nullable_types_without_recursion_channel = fl_basic_message_channel_new( messenger, @@ -11387,45 +11061,30 @@ core_tests_pigeon_test_host_integration_core_api_new( self->call_flutter_send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_bool_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoBool"); + g_autofree gchar* call_flutter_echo_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoBool%s", + self->suffix); self->call_flutter_echo_bool_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoInt"); + g_autofree gchar* call_flutter_echo_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoInt%s", + self->suffix); self->call_flutter_echo_int_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_int_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoDouble"); + g_autofree gchar* call_flutter_echo_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoDouble%s", + self->suffix); self->call_flutter_echo_double_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_double_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11433,15 +11092,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->call_flutter_echo_double_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoString"); + g_autofree gchar* call_flutter_echo_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoString%s", + self->suffix); self->call_flutter_echo_string_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11449,15 +11103,10 @@ core_tests_pigeon_test_host_integration_core_api_new( self->call_flutter_echo_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoUint8List"); + g_autofree gchar* call_flutter_echo_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoUint8List%s", + self->suffix); self->call_flutter_echo_uint8_list_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11465,45 +11114,30 @@ core_tests_pigeon_test_host_integration_core_api_new( self->call_flutter_echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoList"); + g_autofree gchar* call_flutter_echo_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoList%s", + self->suffix); self->call_flutter_echo_list_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_map_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoMap"); + g_autofree gchar* call_flutter_echo_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoMap%s", + self->suffix); self->call_flutter_echo_map_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->call_flutter_echo_map_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, self, nullptr); - g_autofree gchar* call_flutter_echo_enum_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoEnum"); + g_autofree gchar* call_flutter_echo_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoEnum%s", + self->suffix); self->call_flutter_echo_enum_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -11511,14 +11145,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_bool_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableBool.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableBool"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableBool%s", + self->suffix); self->call_flutter_echo_nullable_bool_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11527,14 +11157,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_int_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableInt.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableInt"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableInt%s", + self->suffix); self->call_flutter_echo_nullable_int_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11543,14 +11169,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_double_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableDouble.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableDouble"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableDouble%s", + self->suffix); self->call_flutter_echo_nullable_double_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_double_channel_name, @@ -11560,14 +11182,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableString"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableString%s", + self->suffix); self->call_flutter_echo_nullable_string_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_string_channel_name, @@ -11577,14 +11195,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_uint8_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableUint8List.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableUint8List"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableUint8List%s", + self->suffix); self->call_flutter_echo_nullable_uint8_list_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_uint8_list_channel_name, @@ -11594,14 +11208,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_list_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableList.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableList"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableList%s", + self->suffix); self->call_flutter_echo_nullable_list_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11610,14 +11220,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_map_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableMap.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableMap"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableMap%s", + self->suffix); self->call_flutter_echo_nullable_map_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11626,14 +11232,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, self, nullptr); g_autofree gchar* call_flutter_echo_nullable_enum_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableEnum.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterEchoNullableEnum"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableEnum%s", + self->suffix); self->call_flutter_echo_nullable_enum_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); @@ -11642,14 +11244,10 @@ core_tests_pigeon_test_host_integration_core_api_new( core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, self, nullptr); g_autofree gchar* call_flutter_small_api_echo_string_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterSmallApiEchoString.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_tests." - "HostIntegrationCoreApi.callFlutterSmallApiEchoString"); + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSmallApiEchoString%s", + self->suffix); self->call_flutter_small_api_echo_string_channel = fl_basic_message_channel_new( messenger, call_flutter_small_api_echo_string_channel_name, @@ -13429,7 +13027,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter struct _CoreTestsPigeonTestFlutterIntegrationCoreApi { GObject parent_instance; - FlMethodChannel* channel; + FlBinaryMessenger* messenger; gchar* suffix; }; @@ -13441,8 +13039,8 @@ static void core_tests_pigeon_test_flutter_integration_core_api_dispose( GObject* object) { CoreTestsPigeonTestFlutterIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object); + g_clear_object(&self->messenger); g_clear_pointer(&self->suffix, g_free); - g_clear_object(&self->channel); G_OBJECT_CLASS( core_tests_pigeon_test_flutter_integration_core_api_parent_class) ->dispose(object); @@ -13464,98 +13062,167 @@ core_tests_pigeon_test_flutter_integration_core_api_new( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_flutter_integration_core_api_get_type(), nullptr)); - self->suffix = g_strdup(suffix); - g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = - core_tests_pigeon_test_message_codec_new(); - g_autoptr(FlStandardMethodCodec) codec = - fl_standard_method_codec_new_with_message_codec( - FL_STANDARD_MESSAGE_CODEC(message_codec)); - self->channel = fl_method_channel_new(messenger, "FlutterIntegrationCoreApi", - FL_METHOD_CODEC(codec)); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); return self; } +static void core_tests_pigeon_test_flutter_integration_core_api_noop_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_noop( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_method_channel_invoke_method(self->channel, "noop", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "noop%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_noop_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_throw_error_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_throw_error( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_method_channel_invoke_method(self->channel, "throwError", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "throwError%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, FlValue** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_ref(r); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = fl_value_ref(rv); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_method_channel_invoke_method(self->channel, "throwErrorFromVoid", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "throwErrorFromVoid%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, CoreTestsPigeonTestAllTypes* everything, GCancellable* cancellable, @@ -13563,31 +13230,54 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_custom_object(129, G_OBJECT(everything))); - fl_method_channel_invoke_method(self->channel, "echoAllTypes", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoAllTypes%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAllTypes** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } + FlValue* rv = fl_value_get_list_value(response, 0); *return_value = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref( - CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(r)))); + CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(rv)))); return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, CoreTestsPigeonTestAllNullableTypes* everything, GCancellable* cancellable, @@ -13597,32 +13287,59 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types args, everything != nullptr ? fl_value_new_custom_object(130, G_OBJECT(everything)) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoAllNullableTypes", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoAllNullableTypes%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(r)))); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(rv)))); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_nullable_bool, int64_t* a_nullable_int, @@ -13638,32 +13355,55 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ fl_value_append_take(args, a_nullable_string != nullptr ? fl_value_new_string(a_nullable_string) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "sendMultipleNullableTypes", - args, cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "sendMultipleNullableTypes%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } + FlValue* rv = fl_value_get_list_value(response, 0); *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(r)))); + fl_value_get_custom_value_object(rv)))); return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, @@ -13674,9 +13414,20 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types args, everything != nullptr ? fl_value_new_custom_object(131, G_OBJECT(everything)) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, - "echoAllNullableTypesWithoutRecursion", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoAllNullableTypesWithoutRecursion%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_cb, + task); } gboolean @@ -13684,24 +13435,40 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_with CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(r)))); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + g_object_ref( + CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(rv)))); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_nullable_bool, int64_t* a_nullable_int, @@ -13717,9 +13484,20 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ fl_value_append_take(args, a_nullable_string != nullptr ? fl_value_new_string(a_nullable_string) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, - "sendMultipleNullableTypesWithoutRecursion", - args, cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_cb, + task); } gboolean @@ -13727,231 +13505,390 @@ core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } + FlValue* rv = fl_value_get_list_value(response, 0); *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(r)))); + fl_value_get_custom_value_object(rv)))); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_bool_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean a_bool, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_bool(a_bool)); - fl_method_channel_invoke_method(self->channel, "echoBool", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoBool%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, gboolean* return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_get_bool(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = fl_value_get_bool(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_int_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_int( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t an_int, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_int(an_int)); - fl_method_channel_invoke_method(self->channel, "echoInt", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoInt%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_int_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, int64_t* return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_get_int(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = fl_value_get_int(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_double_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_double( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double a_double, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_float(a_double)); - fl_method_channel_invoke_method(self->channel, "echoDouble", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoDouble%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_double_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, double* return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_get_float(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = fl_value_get_float(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_string_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_string( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_string(a_string)); - fl_method_channel_invoke_method(self->channel, "echoString", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoString%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_string_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, gchar** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = g_strdup(fl_value_get_string(r)); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = g_strdup(fl_value_get_string(rv)); return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* list, size_t list_length, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_uint8_list(list, list_length)); - fl_method_channel_invoke_method(self->channel, "echoUint8List", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoUint8List%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, uint8_t** return_value, size_t* return_value_length, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = static_cast(memcpy(malloc(fl_value_get_length(r)), - fl_value_get_uint8_list(r), - fl_value_get_length(r))); - *return_value_length = fl_value_get_length(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = static_cast(memcpy(malloc(fl_value_get_length(rv)), + fl_value_get_uint8_list(rv), + fl_value_get_length(rv))); + *return_value_length = fl_value_get_length(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_list_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* list, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_ref(list)); - fl_method_channel_invoke_method(self->channel, "echoList", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoList%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_list_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, FlValue** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_ref(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = fl_value_ref(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_map_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_map( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_ref(a_map)); - fl_method_channel_invoke_method(self->channel, "echoMap", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoMap%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_map_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, FlValue** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_ref(r); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = fl_value_ref(rv); return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_echo_enum_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, @@ -13960,31 +13897,53 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( fl_value_append_take(args, fl_value_new_custom(134, fl_value_new_int(an_enum), (GDestroyNotify)fl_value_unref)); - fl_method_channel_invoke_method(self->channel, "echoEnum", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoEnum%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAnEnum* return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } + FlValue* rv = fl_value_get_list_value(response, 0); *return_value = static_cast( fl_value_get_int(reinterpret_cast( - const_cast(fl_value_get_custom_value(r))))); + const_cast(fl_value_get_custom_value(rv))))); return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_bool, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -13992,28 +13951,44 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, a_bool != nullptr ? fl_value_new_bool(*a_bool) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableBool", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableBool%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, gboolean** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { *return_value = static_cast(malloc(sizeof(gboolean))); - **return_value = fl_value_get_bool(r); + **return_value = fl_value_get_bool(rv); } else { *return_value = nullptr; } @@ -14021,6 +13996,13 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t* an_int, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14028,28 +14010,44 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, an_int != nullptr ? fl_value_new_int(*an_int) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableInt", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableInt%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, int64_t** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { *return_value = static_cast(malloc(sizeof(int64_t))); - **return_value = fl_value_get_int(r); + **return_value = fl_value_get_int(rv); } else { *return_value = nullptr; } @@ -14057,6 +14055,13 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14064,28 +14069,44 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, a_double != nullptr ? fl_value_new_float(*a_double) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableDouble", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableDouble%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, double** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { *return_value = static_cast(malloc(sizeof(double))); - **return_value = fl_value_get_float(r); + **return_value = fl_value_get_float(rv); } else { *return_value = nullptr; } @@ -14093,6 +14114,13 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14100,30 +14128,57 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, a_string != nullptr ? fl_value_new_string(a_string) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableString", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableString%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, gchar** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = g_strdup(fl_value_get_string(r)); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = g_strdup(fl_value_get_string(rv)); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* list, size_t list_length, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14132,33 +14187,61 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_lis fl_value_append_take(args, list != nullptr ? fl_value_new_uint8_list(list, list_length) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableUint8List", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableUint8List%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, uint8_t** return_value, size_t* return_value_length, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = static_cast(memcpy(malloc(fl_value_get_length(r)), - fl_value_get_uint8_list(r), - fl_value_get_length(r))); - *return_value_length = fl_value_get_length(r); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = static_cast( + memcpy(malloc(fl_value_get_length(rv)), fl_value_get_uint8_list(rv), + fl_value_get_length(rv))); + *return_value_length = fl_value_get_length(rv); + } else { + *return_value = nullptr; + *return_value_length = 0; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* list, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14166,30 +14249,57 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take( args, list != nullptr ? fl_value_ref(list) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableList", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableList%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, FlValue** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_ref(r); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = fl_value_ref(rv); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -14197,30 +14307,57 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take( args, a_map != nullptr ? fl_value_ref(a_map) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableMap", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableMap%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, FlValue** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = fl_value_ref(r); + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { + *return_value = fl_value_ref(rv); + } else { + *return_value = nullptr; + } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, @@ -14231,31 +14368,47 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( ? fl_value_new_custom(134, fl_value_new_int(*an_enum), (GDestroyNotify)fl_value_unref) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "echoNullableEnum", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableEnum%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, CoreTestsPigeonTestAnEnum** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - if (fl_value_get_type(r) != FL_VALUE_TYPE_NULL) { + FlValue* rv = fl_value_get_list_value(response, 0); + if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { *return_value = static_cast( malloc(sizeof(CoreTestsPigeonTestAnEnum))); **return_value = static_cast( fl_value_get_int(reinterpret_cast( - const_cast(fl_value_get_custom_value(r))))); + const_cast(fl_value_get_custom_value(rv))))); } else { *return_value = nullptr; } @@ -14263,58 +14416,101 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( return TRUE; } +static void core_tests_pigeon_test_flutter_integration_core_api_noop_async_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_noop_async( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); - fl_method_channel_invoke_method(self->channel, "noopAsync", args, cancellable, - callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "noopAsync%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_noop_async_cb, task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } return TRUE; } +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_string(a_string)); - fl_method_channel_invoke_method(self->channel, "echoAsyncString", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoAsyncString%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_cb, + task); } gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, gchar** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = g_strdup(fl_value_get_string(r)); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = g_strdup(fl_value_get_string(rv)); return TRUE; } @@ -14447,21 +14643,17 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = g_strdup(suffix); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); - g_autofree gchar* noop_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostTrivialApi.noop.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostTrivialApi.noop"); + g_autofree gchar* noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop%s", + self->suffix); self->noop_channel = fl_basic_message_channel_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -14670,34 +14862,25 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = g_strdup(suffix); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); - g_autofree gchar* echo_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostSmallApi.echo.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostSmallApi.echo"); + g_autofree gchar* echo_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo%s", + self->suffix); self->echo_channel = fl_basic_message_channel_new( messenger, echo_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, self, nullptr); - g_autofree gchar* void_void_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostSmallApi.voidVoid.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_integration_" - "tests.HostSmallApi.voidVoid"); + g_autofree gchar* void_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid%s", + self->suffix); self->void_void_channel = fl_basic_message_channel_new( messenger, void_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -14767,7 +14950,7 @@ void core_tests_pigeon_test_host_small_api_respond_error_void_void( struct _CoreTestsPigeonTestFlutterSmallApi { GObject parent_instance; - FlMethodChannel* channel; + FlBinaryMessenger* messenger; gchar* suffix; }; @@ -14777,8 +14960,8 @@ G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApi, static void core_tests_pigeon_test_flutter_small_api_dispose(GObject* object) { CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object); + g_clear_object(&self->messenger); g_clear_pointer(&self->suffix, g_free); - g_clear_object(&self->channel); G_OBJECT_CLASS(core_tests_pigeon_test_flutter_small_api_parent_class) ->dispose(object); } @@ -14798,73 +14981,110 @@ core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger, CoreTestsPigeonTestFlutterSmallApi* self = CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(g_object_new( core_tests_pigeon_test_flutter_small_api_get_type(), nullptr)); - self->suffix = g_strdup(suffix); - g_autoptr(CoreTestsPigeonTestMessageCodec) message_codec = - core_tests_pigeon_test_message_codec_new(); - g_autoptr(FlStandardMethodCodec) codec = - fl_standard_method_codec_new_with_message_codec( - FL_STANDARD_MESSAGE_CODEC(message_codec)); - self->channel = fl_method_channel_new(messenger, "FlutterSmallApi", - FL_METHOD_CODEC(codec)); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); return self; } +static void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( CoreTestsPigeonTestFlutterSmallApi* self, CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_custom_object(133, G_OBJECT(msg))); - fl_method_channel_invoke_method(self->channel, "echoWrappedList", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterSmallApi." + "echoWrappedList%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_cb, task); } gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, CoreTestsPigeonTestTestMessage** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } + FlValue* rv = fl_value_get_list_value(response, 0); *return_value = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( g_object_ref(CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( - fl_value_get_custom_value_object(r)))); + fl_value_get_custom_value_object(rv)))); return TRUE; } +static void core_tests_pigeon_test_flutter_small_api_echo_string_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void core_tests_pigeon_test_flutter_small_api_echo_string( CoreTestsPigeonTestFlutterSmallApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_string(a_string)); - fl_method_channel_invoke_method(self->channel, "echoString", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterSmallApi.echoString%" + "s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_small_api_echo_string_cb, task); } gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, gchar** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = g_strdup(fl_value_get_string(r)); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = g_strdup(fl_value_get_string(rv)); return TRUE; } From a4075bfd6aa1241c784fecd60b66f8b352fcd8f2 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 13:40:34 +1200 Subject: [PATCH 102/127] Last test working --- .../lib/integration_tests.dart | 7 +---- .../test_plugin/linux/test_plugin.cc | 27 ++++++++++++++++--- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 4bd53b814869..889a73f764a7 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -16,11 +16,6 @@ const int _biggerThanBigInt = 3000000000; const int _regularInt = 42; const double _doublePi = 3.14159; -/// Tests that haven't yet been made to work on Linux. -// TODO(stuartmorgan): Remove this before landing; this is only for the WIP -// development. -final bool _linuxBringup = Platform.isLinux; - /// Possible host languages that test can target. enum TargetGenerator { /// The Windows C++ generator. @@ -1894,7 +1889,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { await api.callFlutterSmallApiEchoString(sentObject); expect(echoObject, sentObject); }); - }, skip: _linuxBringup); + }); } class _FlutterApiTestImplementation implements FlutterIntegrationCoreApi { diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index a5843fca36c4..5ff30be86a73 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1210,8 +1210,8 @@ static void call_flutter_echo_nullable_enum( callback_data_new(self, response_handle)); } -static void small_api_echo_string_cb(GObject* object, GAsyncResult* result, - gpointer user_data) { +static void small_api_two_echo_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); g_autofree gchar* return_value = nullptr; @@ -1228,15 +1228,34 @@ static void small_api_echo_string_cb(GObject* object, GAsyncResult* result, data->self->host_core_api, data->response_handle, return_value); } +static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, + gpointer user_data) { + g_autoptr(CallbackData) data = static_cast(user_data); + TestPlugin* self = data->self; + + g_autofree gchar* return_value = nullptr; + g_autoptr(GError) error = nullptr; + if (!core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, + &return_value, &error)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( + data->self->host_core_api, data->response_handle, "", "", nullptr); + return; + } + + core_tests_pigeon_test_flutter_small_api_echo_string( + self->flutter_small_api_two, return_value, self->cancellable, + small_api_two_echo_string_cb, g_steal_pointer(&data)); +} + static void call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); - // FIXME: Them call flutter_small_api_two core_tests_pigeon_test_flutter_small_api_echo_string( self->flutter_small_api_one, a_string, self->cancellable, - small_api_echo_string_cb, callback_data_new(self, response_handle)); + small_api_one_echo_string_cb, callback_data_new(self, response_handle)); } static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { From f18369b80586da86cc38100f3750f824c5b8a36d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 13:56:26 +1200 Subject: [PATCH 103/127] Unused import --- .../shared_test_plugin_code/lib/integration_tests.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 889a73f764a7..de771318eb6c 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io'; - import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; From fe50981f873a11c2b1370080c8ab0aad290322ca Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 14:30:44 +1200 Subject: [PATCH 104/127] regen --- .../pigeon/example/app/linux/messages.g.cc | 89 ++++++++++--------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index f8ace1a89ef6..acdaaa838a1c 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -546,48 +546,35 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( pigeon_example_package_example_host_api_get_type(), nullptr)); self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = g_strdup(suffix); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; self->user_data_free_func = user_data_free_func; g_autoptr(PigeonExamplePackageMessageCodec) codec = pigeon_example_package_message_codec_new(); - g_autofree gchar* get_host_language_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_example_package." - "ExampleHostApi.getHostLanguage.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_example_package." - "ExampleHostApi.getHostLanguage"); + g_autofree gchar* get_host_language_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi." + "getHostLanguage%s", + self->suffix); self->get_host_language_channel = fl_basic_message_channel_new( messenger, get_host_language_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->get_host_language_channel, pigeon_example_package_example_host_api_get_host_language_cb, self, nullptr); - g_autofree gchar* add_channel_name = - self->suffix != nullptr - ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add.%" - "s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add"); + g_autofree gchar* add_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add%s", + self->suffix); self->add_channel = fl_basic_message_channel_new(messenger, add_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( self->add_channel, pigeon_example_package_example_host_api_add_cb, self, nullptr); - g_autofree gchar* send_message_channel_name = - self->suffix != nullptr ? g_strdup_printf( - "dev.flutter.pigeon.pigeon_example_package." - "ExampleHostApi.sendMessage.%s", - self->suffix) - : g_strdup( - "dev.flutter.pigeon.pigeon_example_package." - "ExampleHostApi.sendMessage"); + g_autofree gchar* send_message_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage%s", + self->suffix); self->send_message_channel = fl_basic_message_channel_new( messenger, send_message_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( @@ -632,7 +619,7 @@ void pigeon_example_package_example_host_api_respond_error_send_message( struct _PigeonExamplePackageMessageFlutterApi { GObject parent_instance; - FlMethodChannel* channel; + FlBinaryMessenger* messenger; gchar* suffix; }; @@ -643,8 +630,8 @@ static void pigeon_example_package_message_flutter_api_dispose( GObject* object) { PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object); + g_clear_object(&self->messenger); g_clear_pointer(&self->suffix, g_free); - g_clear_object(&self->channel); G_OBJECT_CLASS(pigeon_example_package_message_flutter_api_parent_class) ->dispose(object); } @@ -664,17 +651,18 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger, PigeonExamplePackageMessageFlutterApi* self = PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(g_object_new( pigeon_example_package_message_flutter_api_get_type(), nullptr)); - self->suffix = g_strdup(suffix); - g_autoptr(PigeonExamplePackageMessageCodec) message_codec = - pigeon_example_package_message_codec_new(); - g_autoptr(FlStandardMethodCodec) codec = - fl_standard_method_codec_new_with_message_codec( - FL_STANDARD_MESSAGE_CODEC(message_codec)); - self->channel = fl_method_channel_new(messenger, "MessageFlutterApi", - FL_METHOD_CODEC(codec)); + self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); + self->suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); return self; } +static void pigeon_example_package_message_flutter_api_flutter_method_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + void pigeon_example_package_message_flutter_api_flutter_method( PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, @@ -682,25 +670,40 @@ void pigeon_example_package_message_flutter_api_flutter_method( g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, a_string != nullptr ? fl_value_new_string(a_string) : fl_value_new_null()); - fl_method_channel_invoke_method(self->channel, "flutterMethod", args, - cancellable, callback, user_data); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.MessageFlutterApi." + "flutterMethod%s", + self->suffix); + g_autoptr(PigeonExamplePackageMessageCodec) codec = + pigeon_example_package_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + pigeon_example_package_message_flutter_api_flutter_method_cb, task); } gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, gchar** return_value, GError** error) { - g_autoptr(FlMethodResponse) response = - fl_method_channel_invoke_method_finish(self->channel, result, error); + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { return FALSE; } - - g_autoptr(FlValue) r = fl_method_response_get_result(response, error); - if (r == nullptr) { + if (fl_value_get_length(response) > 1) { + // FIXME: Set error return FALSE; } - *return_value = g_strdup(fl_value_get_string(r)); + FlValue* rv = fl_value_get_list_value(response, 0); + *return_value = g_strdup(fl_value_get_string(rv)); return TRUE; } From 2f94b19b76cfaf11dc6dd7efc93c9c1817d14ef8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 14 Jun 2024 17:10:05 +1200 Subject: [PATCH 105/127] Generate documentation comments --- .../pigeon/example/app/linux/messages.g.h | 184 +- packages/pigeon/lib/gobject_generator.dart | 200 +- .../test_plugin/linux/pigeon/core_tests.gen.h | 3876 +++++++++++++++-- 3 files changed, 3806 insertions(+), 454 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 34e9eb04c532..741665ff3fd6 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -11,30 +11,84 @@ G_BEGIN_DECLS +/** + * PigeonExamplePackageCode: + * PIGEON_EXAMPLE_PACKAGE_CODE_ONE: + * PIGEON_EXAMPLE_PACKAGE_CODE_TWO: + * + */ typedef enum { PIGEON_EXAMPLE_PACKAGE_CODE_ONE = 0, PIGEON_EXAMPLE_PACKAGE_CODE_TWO = 1 } PigeonExamplePackageCode; +/** + * PigeonExamplePackageMessageData: + * + */ + G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageData, pigeon_example_package_message_data, PIGEON_EXAMPLE_PACKAGE, MESSAGE_DATA, GObject) +/** + * pigeon_example_package_message_data_new: + * name: field in this object. + * description: field in this object. + * code: field in this object. + * data: field in this object. + * + * Creates a new #MessageData object. + * + * Returns: a new #PigeonExamplePackageMessageData + */ PigeonExamplePackageMessageData* pigeon_example_package_message_data_new( const gchar* name, const gchar* description, PigeonExamplePackageCode code, FlValue* data); +/** + * pigeon_example_package_message_data_get_name + * @object: a #PigeonExamplePackageMessageData. + * + * Gets the value of the name field of @object. + * + * Returns: the field value. + */ const gchar* pigeon_example_package_message_data_get_name( - PigeonExamplePackageMessageData* self); + PigeonExamplePackageMessageData* object); +/** + * pigeon_example_package_message_data_get_description + * @object: a #PigeonExamplePackageMessageData. + * + * Gets the value of the description field of @object. + * + * Returns: the field value. + */ const gchar* pigeon_example_package_message_data_get_description( - PigeonExamplePackageMessageData* self); + PigeonExamplePackageMessageData* object); +/** + * pigeon_example_package_message_data_get_code + * @object: a #PigeonExamplePackageMessageData. + * + * Gets the value of the code field of @object. + * + * Returns: the field value. + */ PigeonExamplePackageCode pigeon_example_package_message_data_get_code( - PigeonExamplePackageMessageData* self); + PigeonExamplePackageMessageData* object); +/** + * pigeon_example_package_message_data_get_data + * @object: a #PigeonExamplePackageMessageData. + * + * Gets the value of the data field of @object. + * + * Returns: the field value. + */ FlValue* pigeon_example_package_message_data_get_data( - PigeonExamplePackageMessageData* self); + PigeonExamplePackageMessageData* object); G_DECLARE_FINAL_TYPE( PigeonExamplePackageExampleHostApiGetHostLanguageResponse, @@ -42,10 +96,27 @@ G_DECLARE_FINAL_TYPE( PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_GET_HOST_LANGUAGE_RESPONSE, GObject) +/** + * pigeon_example_package_example_host_api_get_host_language_response_new: + * + * Creates a new response to ExampleHostApi.getHostLanguage. + * + * Returns: a new #PigeonExamplePackageExampleHostApiGetHostLanguageResponse + */ PigeonExamplePackageExampleHostApiGetHostLanguageResponse* pigeon_example_package_example_host_api_get_host_language_response_new( const gchar* return_value); +/** + * pigeon_example_package_example_host_api_get_host_language_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to ExampleHostApi.getHostLanguage. + * + * Returns: a new #PigeonExamplePackageExampleHostApiGetHostLanguageResponse + */ PigeonExamplePackageExampleHostApiGetHostLanguageResponse* pigeon_example_package_example_host_api_get_host_language_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -55,9 +126,26 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiAddResponse, PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_ADD_RESPONSE, GObject) +/** + * pigeon_example_package_example_host_api_add_response_new: + * + * Creates a new response to ExampleHostApi.add. + * + * Returns: a new #PigeonExamplePackageExampleHostApiAddResponse + */ PigeonExamplePackageExampleHostApiAddResponse* pigeon_example_package_example_host_api_add_response_new(int64_t return_value); +/** + * pigeon_example_package_example_host_api_add_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to ExampleHostApi.add. + * + * Returns: a new #PigeonExamplePackageExampleHostApiAddResponse + */ PigeonExamplePackageExampleHostApiAddResponse* pigeon_example_package_example_host_api_add_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -66,49 +154,123 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, pigeon_example_package_example_host_api, PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API, GObject) +/** + * PigeonExamplePackageExampleHostApiVTable: + * + * Table of functions exposed by ExampleHostApi to be implemented by the API + * provider. + */ typedef struct { PigeonExamplePackageExampleHostApiGetHostLanguageResponse* ( - *get_host_language)(PigeonExamplePackageExampleHostApi* self, + *get_host_language)(PigeonExamplePackageExampleHostApi* api, gpointer user_data); PigeonExamplePackageExampleHostApiAddResponse* (*add)( - PigeonExamplePackageExampleHostApi* self, int64_t a, int64_t b, + PigeonExamplePackageExampleHostApi* api, int64_t a, int64_t b, gpointer user_data); - void (*send_message)(PigeonExamplePackageExampleHostApi* self, + void (*send_message)(PigeonExamplePackageExampleHostApi* api, PigeonExamplePackageMessageData* message, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); } PigeonExamplePackageExampleHostApiVTable; +/** + * pigeon_example_package_example_host_api_new: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * @vtable: implementations of the methods in this API. + * @user_data: (closure): user data to pass to the functions in @vtable. + * @user_data_free_func: (allow-none): a function which gets called to free + * @user_data, or %NULL. + * + * Creates an object to implement the ExampleHostApi API. + * + * Returns: a new #PigeonExamplePackageExampleHostApi + */ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( FlBinaryMessenger* messenger, const gchar* suffix, const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * pigeon_example_package_example_host_api_respond_send_message: + * @api: a #PigeonExamplePackageExampleHostApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to ExampleHostApi.sendMessage. + */ void pigeon_example_package_example_host_api_respond_send_message( - PigeonExamplePackageExampleHostApi* self, + PigeonExamplePackageExampleHostApi* api, FlBasicMessageChannelResponseHandle* response_handle, gboolean return_value); +/** + * pigeon_example_package_example_host_api_respond_error_send_message: + * @api: a #PigeonExamplePackageExampleHostApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to ExampleHostApi.sendMessage. + */ void pigeon_example_package_example_host_api_respond_error_send_message( - PigeonExamplePackageExampleHostApi* self, + PigeonExamplePackageExampleHostApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * PigeonExamplePackageMessageFlutterApi: + * + */ + G_DECLARE_FINAL_TYPE(PigeonExamplePackageMessageFlutterApi, pigeon_example_package_message_flutter_api, PIGEON_EXAMPLE_PACKAGE, MESSAGE_FLUTTER_API, GObject) +/** + * pigeon_example_package_message_flutter_api_new: + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Creates a new object to access the MessageFlutterApi API. + * + * Returns: a new #PigeonExamplePackageMessageFlutterApi + */ PigeonExamplePackageMessageFlutterApi* pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger, const gchar* suffix); +/** + * pigeon_example_package_message_flutter_api_flutter_method: + * @api: a #PigeonExamplePackageMessageFlutterApi. + * @a_string: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + */ void pigeon_example_package_message_flutter_api_flutter_method( - PigeonExamplePackageMessageFlutterApi* self, const gchar* a_string, + PigeonExamplePackageMessageFlutterApi* api, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * pigeon_example_package_message_flutter_api_flutter_method_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a pigeon_example_package_message_flutter_api_flutter_method() call. + * + * Returns: %TRUE on success. + */ gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( - PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, + PigeonExamplePackageMessageFlutterApi* api, GAsyncResult* result, gchar** return_value, GError** error); G_END_DECLS diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index a50265d887b9..e430ba0b54f5 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -7,7 +7,7 @@ import 'generator.dart'; import 'generator_tools.dart'; /// General comment opening token. -const String _commentPrefix = '//'; +const String _commentPrefix = ' *'; /// Documentation comment spec. const DocumentCommentSpecification _docCommentSpec = @@ -118,8 +118,8 @@ class GObjectHeaderGenerator extends StructuredGenerator { if (generatorOptions.copyrightHeader != null) { addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); } - indent.writeln('$_commentPrefix ${getGeneratedCodeWarning()}'); - indent.writeln('$_commentPrefix $seeAlsoWarning'); + indent.writeln('// ${getGeneratedCodeWarning()}'); + indent.writeln('// $seeAlsoWarning'); } @override @@ -161,15 +161,25 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String enumName = _getClassName(module, anEnum.name); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * $enumName:'); + for (int i = 0; i < anEnum.members.length; i++) { + final EnumMember member = anEnum.members[i]; + final String itemName = + _getEnumValue(dartPackageName, anEnum.name, member.name); + indent.writeln(' * $itemName:'); + addDocumentationComments( + indent, member.documentationComments, _docCommentSpec); + } + indent.writeln(' *'); addDocumentationComments( indent, anEnum.documentationComments, _docCommentSpec); + indent.writeln(' */'); indent.writeScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; final String itemName = _getEnumValue(dartPackageName, anEnum.name, member.name); - addDocumentationComments( - indent, member.documentationComments, _docCommentSpec); indent.writeln( '$itemName = $i${i == anEnum.members.length - 1 ? '' : ','}'); } @@ -189,8 +199,14 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, classDefinition.name); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * $className:'); + indent.writeln(' *'); addDocumentationComments( indent, classDefinition.documentationComments, _docCommentSpec); + indent.writeln(' */'); + + indent.newln(); _writeDeclareFinalType(indent, module, classDefinition.name); indent.newln(); @@ -203,6 +219,20 @@ class GObjectHeaderGenerator extends StructuredGenerator { constructorArgs.add('size_t ${fieldName}_length'); } } + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_new:'); + for (final NamedType field in classDefinition.fields) { + final String fieldName = _getFieldName(field.name); + indent.writeln(' * $fieldName: field in this object.'); + if (_isNumericListType(field.type)) { + indent.writeln(' * ${fieldName}_length: length of @$fieldName.'); + } + } + indent.writeln(' *'); + indent.writeln(' * Creates a new #${classDefinition.name} object.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a new #$className'); + indent.writeln(' */'); indent.writeln( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')});"); @@ -211,10 +241,26 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, field.type); indent.newln(); - addDocumentationComments( - indent, field.documentationComments, _docCommentSpec); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_get_$fieldName'); + indent.writeln(' * @object: a #$className.'); + if (_isNumericListType(field.type)) { + indent + .writeln(' * @length: location to write the length of this value.'); + } + indent.writeln(' *'); + if (field.documentationComments.isNotEmpty) { + addDocumentationComments( + indent, field.documentationComments, _docCommentSpec); + } else { + indent.writeln( + ' * Gets the value of the ${field.name} field of @object.'); + } + indent.writeln(' *'); + indent.writeln(' * Returns: the field value.'); + indent.writeln(' */'); final List getterArgs = [ - '$className* self', + '$className* object', if (_isNumericListType(field.type)) 'size_t* length' ]; indent.writeln( @@ -242,20 +288,35 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); - indent.newln(); + indent.writeln('/**'); + indent.writeln(' * $className:'); + indent.writeln(' *'); addDocumentationComments( indent, api.documentationComments, _docCommentSpec); + indent.writeln(' */'); + + indent.newln(); _writeDeclareFinalType(indent, module, api.name); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_new:'); + indent.writeln(' * @messenger: an #FlBinaryMessenger.'); + indent.writeln( + ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); + indent.writeln(' *'); + indent.writeln(' * Creates a new object to access the ${api.name} API.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a new #$className'); + indent.writeln(' */'); indent.writeln( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix);'); for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); - final List asyncArgs = ['$className* self']; + final List asyncArgs = ['$className* api']; for (final Parameter param in method.parameters) { final String paramName = _snakeCaseFromCamelCase(param.name); asyncArgs.add('${_getType(module, param.type)} $paramName'); @@ -269,15 +330,34 @@ class GObjectHeaderGenerator extends StructuredGenerator { 'gpointer user_data' ]); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_$methodName:'); + indent.writeln(' * @api: a #$className.'); + for (final Parameter param in method.parameters) { + final String paramName = _snakeCaseFromCamelCase(param.name); + indent.writeln( + ' * @$paramName: ${param.type.isNullable ? '(allow-none): ' : ''}parameter for this method.'); + if (_isNumericListType(param.type)) { + indent.writeln(' * @${paramName}_length: length of $paramName.'); + } + } + indent + .writeln(' * @cancellable: (allow-none): a #GCancellable or %NULL.'); + indent.writeln( + ' * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when the call is complete or %NULL to ignore the response.'); + indent + .writeln(' * @user_data: (closure): user data to pass to @callback.'); + indent.writeln(' *'); addDocumentationComments( indent, method.documentationComments, _docCommentSpec); + indent.writeln(' */'); indent.writeln( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')});"); final String returnType = _getType(module, method.returnType, isOutput: true); final List finishArgs = [ - '$className* self', + '$className* api', 'GAsyncResult* result', if (returnType != 'void') '$returnType* return_value', if (_isNumericListType(method.returnType)) @@ -285,6 +365,25 @@ class GObjectHeaderGenerator extends StructuredGenerator { 'GError** error' ]; indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_${methodName}_finish:'); + indent.writeln(' * @api: a #className.'); + indent.writeln(' * @result: a #GAsyncResult.'); + if (returnType != 'void') { + indent.writeln( + ' * @return_value: location to write the value returned by this method.'); + } + if (_isNumericListType(method.returnType)) { + indent.writeln( + ' * @return_value_length: location to write length of @return_value.'); + } + indent.writeln( + ' * @error: (allow-none): #GError location to store the error occurring, or %NULL to ignore.'); + indent.writeln(' *'); + indent.writeln(' * Completes a ${methodPrefix}_$methodName() call.'); + indent.writeln(' *'); + indent.writeln(' * Returns: %TRUE on success.'); + indent.writeln(' */'); indent.writeln( "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); } @@ -315,8 +414,24 @@ class GObjectHeaderGenerator extends StructuredGenerator { _writeApiVTable(indent, module, api); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_new:'); + indent.writeln(' *'); + indent.writeln(' * @messenger: an #FlBinaryMessenger.'); + indent.writeln( + ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); + indent.writeln(' * @vtable: implementations of the methods in this API.'); + indent.writeln( + ' * @user_data: (closure): user data to pass to the functions in @vtable.'); indent.writeln( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar *suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + ' * @user_data_free_func: (allow-none): a function which gets called to free @user_data, or %NULL.'); + indent.writeln(' *'); + indent.writeln(' * Creates an object to implement the ${api.name} API.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a new #$className'); + indent.writeln(' */'); + indent.writeln( + '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { @@ -340,10 +455,28 @@ class GObjectHeaderGenerator extends StructuredGenerator { if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_new:'); + indent.writeln(' *'); + indent.writeln(' * Creates a new response to ${api.name}.${method.name}.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a new #$responseClassName'); + indent.writeln(' */'); indent.writeln( '$responseClassName* ${responseMethodPrefix}_new(${constructorArgs.join(', ')});'); indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_new_error:'); + indent.writeln(' * @code: error code.'); + indent.writeln(' * @message: error message.'); + indent.writeln(' * @details: (allow-none): error details or %NULL.'); + indent.writeln(' *'); + indent.writeln( + ' * Creates a new error response to ${api.name}.${method.name}.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a new #$responseClassName'); + indent.writeln(' */'); indent.writeln( '$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details);'); } @@ -353,13 +486,19 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String className = _getClassName(module, api.name); final String vtableName = _getVTableName(module, api.name); + indent.writeln('/**'); + indent.writeln(' * $vtableName:'); + indent.writeln(' *'); + indent.writeln( + ' * Table of functions exposed by ${api.name} to be implemented by the API provider.'); + indent.writeln(' */'); indent.writeScoped('typedef struct {', '} $vtableName;', () { for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); - final List methodArgs = ['$className* self']; + final List methodArgs = ['$className* api']; for (final Parameter param in method.parameters) { final String name = _snakeCaseFromCamelCase(param.name); methodArgs.add('${_getType(module, param.type)} $name'); @@ -389,22 +528,49 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List respondArgs = [ - '$className* self', + '$className* api', 'FlBasicMessageChannelResponseHandle* response_handle', if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_respond_$methodName:'); + indent.writeln(' * @api: a #$className.'); + indent.writeln( + ' * @response_handle: a #FlBasicMessageChannelResponseHandle.'); + if (returnType != 'void') { + indent.writeln( + ' * @return_value: location to write the value returned by this method.'); + } + if (_isNumericListType(method.returnType)) { + indent.writeln( + ' * @return_value_length: location to write length of @return_value.'); + } + indent.writeln(' *'); + indent.writeln(' * Responds to ${api.name}.${method.name}. '); + indent.writeln(' */'); indent.writeln( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); indent.newln(); final List respondErrorArgs = [ - '$className* self', + '$className* api', 'FlBasicMessageChannelResponseHandle* response_handle', 'const gchar* code', 'const gchar* message', 'FlValue* details' ]; + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_respond_error_$methodName:'); + indent.writeln(' * @api: a #$className.'); + indent.writeln( + ' * @response_handle: a #FlBasicMessageChannelResponseHandle.'); + indent.writeln(' * @code: error code.'); + indent.writeln(' * @message: error message.'); + indent.writeln(' * @details: (allow-none): error details or %NULL.'); + indent.writeln(' *'); + indent.writeln(' * Responds with an error to ${api.name}.${method.name}. '); + indent.writeln(' */'); indent.writeln( "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')});"); } @@ -440,8 +606,8 @@ class GObjectSourceGenerator extends StructuredGenerator { if (generatorOptions.copyrightHeader != null) { addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); } - indent.writeln('$_commentPrefix ${getGeneratedCodeWarning()}'); - indent.writeln('$_commentPrefix $seeAlsoWarning'); + indent.writeln('// ${getGeneratedCodeWarning()}'); + indent.writeln('// $seeAlsoWarning'); } @override diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index 54ec8b6a3022..d0d0fa085ddf 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -12,6 +12,15 @@ G_BEGIN_DECLS +/** + * CoreTestsPigeonTestAnEnum: + * PIGEON_INTEGRATION_TESTS_AN_ENUM_ONE: + * PIGEON_INTEGRATION_TESTS_AN_ENUM_TWO: + * PIGEON_INTEGRATION_TESTS_AN_ENUM_THREE: + * PIGEON_INTEGRATION_TESTS_AN_ENUM_FORTY_TWO: + * PIGEON_INTEGRATION_TESTS_AN_ENUM_FOUR_HUNDRED_TWENTY_TWO: + * + */ typedef enum { PIGEON_INTEGRATION_TESTS_AN_ENUM_ONE = 0, PIGEON_INTEGRATION_TESTS_AN_ENUM_TWO = 1, @@ -20,11 +29,44 @@ typedef enum { PIGEON_INTEGRATION_TESTS_AN_ENUM_FOUR_HUNDRED_TWENTY_TWO = 4 } CoreTestsPigeonTestAnEnum; -// A class containing all supported types. +/** + * CoreTestsPigeonTestAllTypes: + * + * A class containing all supported types. + */ + G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllTypes, core_tests_pigeon_test_all_types, CORE_TESTS_PIGEON_TEST, ALL_TYPES, GObject) +/** + * core_tests_pigeon_test_all_types_new: + * a_bool: field in this object. + * an_int: field in this object. + * an_int64: field in this object. + * a_double: field in this object. + * a_byte_array: field in this object. + * a_byte_array_length: length of @a_byte_array. + * a4_byte_array: field in this object. + * a4_byte_array_length: length of @a4_byte_array. + * a8_byte_array: field in this object. + * a8_byte_array_length: length of @a8_byte_array. + * a_float_array: field in this object. + * a_float_array_length: length of @a_float_array. + * an_enum: field in this object. + * a_string: field in this object. + * an_object: field in this object. + * list: field in this object. + * string_list: field in this object. + * int_list: field in this object. + * double_list: field in this object. + * bool_list: field in this object. + * map: field in this object. + * + * Creates a new #AllTypes object. + * + * Returns: a new #CoreTestsPigeonTestAllTypes + */ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( gboolean a_bool, int64_t an_int, int64_t an_int64, double a_double, const uint8_t* a_byte_array, size_t a_byte_array_length, @@ -35,62 +77,240 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( FlValue* an_object, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* map); +/** + * core_tests_pigeon_test_all_types_get_a_bool + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the aBool field of @object. + * + * Returns: the field value. + */ gboolean core_tests_pigeon_test_all_types_get_a_bool( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_an_int + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the anInt field of @object. + * + * Returns: the field value. + */ int64_t core_tests_pigeon_test_all_types_get_an_int( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_an_int64 + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the anInt64 field of @object. + * + * Returns: the field value. + */ int64_t core_tests_pigeon_test_all_types_get_an_int64( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_a_double + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the aDouble field of @object. + * + * Returns: the field value. + */ double core_tests_pigeon_test_all_types_get_a_double( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_a_byte_array + * @object: a #CoreTestsPigeonTestAllTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aByteArray field of @object. + * + * Returns: the field value. + */ const uint8_t* core_tests_pigeon_test_all_types_get_a_byte_array( - CoreTestsPigeonTestAllTypes* self, size_t* length); - + CoreTestsPigeonTestAllTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_types_get_a4_byte_array + * @object: a #CoreTestsPigeonTestAllTypes. + * @length: location to write the length of this value. + * + * Gets the value of the a4ByteArray field of @object. + * + * Returns: the field value. + */ const int32_t* core_tests_pigeon_test_all_types_get_a4_byte_array( - CoreTestsPigeonTestAllTypes* self, size_t* length); - + CoreTestsPigeonTestAllTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_types_get_a8_byte_array + * @object: a #CoreTestsPigeonTestAllTypes. + * @length: location to write the length of this value. + * + * Gets the value of the a8ByteArray field of @object. + * + * Returns: the field value. + */ const int64_t* core_tests_pigeon_test_all_types_get_a8_byte_array( - CoreTestsPigeonTestAllTypes* self, size_t* length); - + CoreTestsPigeonTestAllTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_types_get_a_float_array + * @object: a #CoreTestsPigeonTestAllTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aFloatArray field of @object. + * + * Returns: the field value. + */ const double* core_tests_pigeon_test_all_types_get_a_float_array( - CoreTestsPigeonTestAllTypes* self, size_t* length); - + CoreTestsPigeonTestAllTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_types_get_an_enum + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the anEnum field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAnEnum core_tests_pigeon_test_all_types_get_an_enum( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_a_string + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the aString field of @object. + * + * Returns: the field value. + */ const gchar* core_tests_pigeon_test_all_types_get_a_string( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_an_object + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the anObject field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_an_object( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the list field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_list( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_string_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the stringList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_string_list( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_int_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the intList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_int_list( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_double_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the doubleList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_double_list( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_bool_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the boolList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_bool_list( - CoreTestsPigeonTestAllTypes* self); - + CoreTestsPigeonTestAllTypes* object); + +/** + * core_tests_pigeon_test_all_types_get_map + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the map field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_types_get_map( - CoreTestsPigeonTestAllTypes* self); + CoreTestsPigeonTestAllTypes* object); + +/** + * CoreTestsPigeonTestAllNullableTypes: + * + * A class containing all supported nullable types. + */ -// A class containing all supported nullable types. G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllNullableTypes, core_tests_pigeon_test_all_nullable_types, CORE_TESTS_PIGEON_TEST, ALL_NULLABLE_TYPES, GObject) +/** + * core_tests_pigeon_test_all_nullable_types_new: + * a_nullable_bool: field in this object. + * a_nullable_int: field in this object. + * a_nullable_int64: field in this object. + * a_nullable_double: field in this object. + * a_nullable_byte_array: field in this object. + * a_nullable_byte_array_length: length of @a_nullable_byte_array. + * a_nullable4_byte_array: field in this object. + * a_nullable4_byte_array_length: length of @a_nullable4_byte_array. + * a_nullable8_byte_array: field in this object. + * a_nullable8_byte_array_length: length of @a_nullable8_byte_array. + * a_nullable_float_array: field in this object. + * a_nullable_float_array_length: length of @a_nullable_float_array. + * nullable_nested_list: field in this object. + * nullable_map_with_annotations: field in this object. + * nullable_map_with_object: field in this object. + * a_nullable_enum: field in this object. + * a_nullable_string: field in this object. + * a_nullable_object: field in this object. + * all_nullable_types: field in this object. + * list: field in this object. + * string_list: field in this object. + * int_list: field in this object. + * double_list: field in this object. + * bool_list: field in this object. + * nested_class_list: field in this object. + * map: field in this object. + * + * Creates a new #AllNullableTypes object. + * + * Returns: a new #CoreTestsPigeonTestAllNullableTypes + */ CoreTestsPigeonTestAllNullableTypes* core_tests_pigeon_test_all_nullable_types_new( gboolean* a_nullable_bool, int64_t* a_nullable_int, @@ -107,87 +327,303 @@ core_tests_pigeon_test_all_nullable_types_new( FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* nested_class_list, FlValue* map); +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableBool field of @object. + * + * Returns: the field value. + */ gboolean* core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_int + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableInt field of @object. + * + * Returns: the field value. + */ int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_int64 + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableInt64 field of @object. + * + * Returns: the field value. + */ int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_int64( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_double + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableDouble field of @object. + * + * Returns: the field value. + */ double* core_tests_pigeon_test_all_nullable_types_get_a_nullable_double( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aNullableByteArray field of @object. + * + * Returns: the field value. + */ const uint8_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable_byte_array( - CoreTestsPigeonTestAllNullableTypes* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable4_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aNullable4ByteArray field of @object. + * + * Returns: the field value. + */ const int32_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable4_byte_array( - CoreTestsPigeonTestAllNullableTypes* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable8_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aNullable8ByteArray field of @object. + * + * Returns: the field value. + */ const int64_t* core_tests_pigeon_test_all_nullable_types_get_a_nullable8_byte_array( - CoreTestsPigeonTestAllNullableTypes* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * @length: location to write the length of this value. + * + * Gets the value of the aNullableFloatArray field of @object. + * + * Returns: the field value. + */ const double* core_tests_pigeon_test_all_nullable_types_get_a_nullable_float_array( - CoreTestsPigeonTestAllNullableTypes* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypes* object, size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the nullableNestedList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_nested_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_annotations + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the nullableMapWithAnnotations field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_annotations( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_object + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the nullableMapWithObject field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_nullable_map_with_object( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_enum + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableEnum field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAnEnum* core_tests_pigeon_test_all_nullable_types_get_a_nullable_enum( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_string + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableString field of @object. + * + * Returns: the field value. + */ const gchar* core_tests_pigeon_test_all_nullable_types_get_a_nullable_string( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_a_nullable_object + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the aNullableObject field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_a_nullable_object( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_all_nullable_types + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the allNullableTypes field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAllNullableTypes* core_tests_pigeon_test_all_nullable_types_get_all_nullable_types( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the list field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_string_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the stringList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_string_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_int_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the intList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_int_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_double_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the doubleList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_double_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_bool_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the boolList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_nested_class_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the nestedClassList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_nested_class_list( - CoreTestsPigeonTestAllNullableTypes* self); - + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * core_tests_pigeon_test_all_nullable_types_get_map + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the map field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_get_map( - CoreTestsPigeonTestAllNullableTypes* self); + CoreTestsPigeonTestAllNullableTypes* object); + +/** + * CoreTestsPigeonTestAllNullableTypesWithoutRecursion: + * + * The primary purpose for this class is to ensure coverage of Swift structs + * with nullable items, as the primary [AllNullableTypes] class is being used to + * test Swift classes. + */ -// The primary purpose for this class is to ensure coverage of Swift structs -// with nullable items, as the primary [AllNullableTypes] class is being used to -// test Swift classes. G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestAllNullableTypesWithoutRecursion, core_tests_pigeon_test_all_nullable_types_without_recursion, CORE_TESTS_PIGEON_TEST, ALL_NULLABLE_TYPES_WITHOUT_RECURSION, GObject) +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_new: + * a_nullable_bool: field in this object. + * a_nullable_int: field in this object. + * a_nullable_int64: field in this object. + * a_nullable_double: field in this object. + * a_nullable_byte_array: field in this object. + * a_nullable_byte_array_length: length of @a_nullable_byte_array. + * a_nullable4_byte_array: field in this object. + * a_nullable4_byte_array_length: length of @a_nullable4_byte_array. + * a_nullable8_byte_array: field in this object. + * a_nullable8_byte_array_length: length of @a_nullable8_byte_array. + * a_nullable_float_array: field in this object. + * a_nullable_float_array_length: length of @a_nullable_float_array. + * nullable_nested_list: field in this object. + * nullable_map_with_annotations: field in this object. + * nullable_map_with_object: field in this object. + * a_nullable_enum: field in this object. + * a_nullable_string: field in this object. + * a_nullable_object: field in this object. + * list: field in this object. + * string_list: field in this object. + * int_list: field in this object. + * double_list: field in this object. + * bool_list: field in this object. + * map: field in this object. + * + * Creates a new #AllNullableTypesWithoutRecursion object. + * + * Returns: a new #CoreTestsPigeonTestAllNullableTypesWithoutRecursion + */ CoreTestsPigeonTestAllNullableTypesWithoutRecursion* core_tests_pigeon_test_all_nullable_types_without_recursion_new( gboolean* a_nullable_bool, int64_t* a_nullable_int, @@ -202,93 +638,276 @@ core_tests_pigeon_test_all_nullable_types_without_recursion_new( FlValue* a_nullable_object, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* map); +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_bool + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableBool field of @object. + * + * Returns: the field value. + */ gboolean* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_bool( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableInt field of @object. + * + * Returns: the field value. + */ int64_t* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int64 + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableInt64 field of @object. + * + * Returns: the field value. + */ int64_t* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_int64( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_double + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableDouble field of @object. + * + * Returns: the field value. + */ double* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_double( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * @length: location to write the length of this value. + * + * Gets the value of the aNullableByteArray field of @object. + * + * Returns: the field value. + */ const uint8_t* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_byte_array( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object, + size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable4_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * @length: location to write the length of this value. + * + * Gets the value of the aNullable4ByteArray field of @object. + * + * Returns: the field value. + */ const int32_t* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable4_byte_array( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object, + size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable8_byte_array + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * @length: location to write the length of this value. + * + * Gets the value of the aNullable8ByteArray field of @object. + * + * Returns: the field value. + */ const int64_t* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable8_byte_array( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object, + size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float_array + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * @length: location to write the length of this value. + * + * Gets the value of the aNullableFloatArray field of @object. + * + * Returns: the field value. + */ const double* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_float_array( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self, size_t* length); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object, + size_t* length); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the nullableNestedList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_nested_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_annotations + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the nullableMapWithAnnotations field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_annotations( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_object + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the nullableMapWithObject field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_nullable_map_with_object( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_enum + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableEnum field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAnEnum* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_enum( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_string + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableString field of @object. + * + * Returns: the field value. + */ const gchar* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_string( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_object + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the aNullableObject field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_a_nullable_object( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the list field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_string_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the stringList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_string_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_int_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the intList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_int_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_double_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the doubleList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_double_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_bool_list + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the boolList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_bool_list( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); - + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * core_tests_pigeon_test_all_nullable_types_without_recursion_get_map + * @object: a #CoreTestsPigeonTestAllNullableTypesWithoutRecursion. + * + * Gets the value of the map field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_all_nullable_types_without_recursion_get_map( - CoreTestsPigeonTestAllNullableTypesWithoutRecursion* self); + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* object); + +/** + * CoreTestsPigeonTestAllClassesWrapper: + * + * A class for testing nested class handling. + * + * This is needed to test nested nullable and non-nullable classes, + * `AllNullableTypes` is non-nullable here as it is easier to instantiate + * than `AllTypes` when testing doesn't require both (ie. testing null classes). + */ -// A class for testing nested class handling. -// -// This is needed to test nested nullable and non-nullable classes, -// `AllNullableTypes` is non-nullable here as it is easier to instantiate -// than `AllTypes` when testing doesn't require both (ie. testing null classes). G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllClassesWrapper, core_tests_pigeon_test_all_classes_wrapper, CORE_TESTS_PIGEON_TEST, ALL_CLASSES_WRAPPER, GObject) +/** + * core_tests_pigeon_test_all_classes_wrapper_new: + * all_nullable_types: field in this object. + * all_nullable_types_without_recursion: field in this object. + * all_types: field in this object. + * + * Creates a new #AllClassesWrapper object. + * + * Returns: a new #CoreTestsPigeonTestAllClassesWrapper + */ CoreTestsPigeonTestAllClassesWrapper* core_tests_pigeon_test_all_classes_wrapper_new( CoreTestsPigeonTestAllNullableTypes* all_nullable_types, @@ -296,37 +915,99 @@ core_tests_pigeon_test_all_classes_wrapper_new( all_nullable_types_without_recursion, CoreTestsPigeonTestAllTypes* all_types); +/** + * core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types + * @object: a #CoreTestsPigeonTestAllClassesWrapper. + * + * Gets the value of the allNullableTypes field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAllNullableTypes* core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types( - CoreTestsPigeonTestAllClassesWrapper* self); - + CoreTestsPigeonTestAllClassesWrapper* object); + +/** + * core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types_without_recursion + * @object: a #CoreTestsPigeonTestAllClassesWrapper. + * + * Gets the value of the allNullableTypesWithoutRecursion field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAllNullableTypesWithoutRecursion* core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types_without_recursion( - CoreTestsPigeonTestAllClassesWrapper* self); - + CoreTestsPigeonTestAllClassesWrapper* object); + +/** + * core_tests_pigeon_test_all_classes_wrapper_get_all_types + * @object: a #CoreTestsPigeonTestAllClassesWrapper. + * + * Gets the value of the allTypes field of @object. + * + * Returns: the field value. + */ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_classes_wrapper_get_all_types( - CoreTestsPigeonTestAllClassesWrapper* self); + CoreTestsPigeonTestAllClassesWrapper* object); + +/** + * CoreTestsPigeonTestTestMessage: + * + * A data class containing a List, used in unit tests. + */ -// A data class containing a List, used in unit tests. G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestTestMessage, core_tests_pigeon_test_test_message, CORE_TESTS_PIGEON_TEST, TEST_MESSAGE, GObject) +/** + * core_tests_pigeon_test_test_message_new: + * test_list: field in this object. + * + * Creates a new #TestMessage object. + * + * Returns: a new #CoreTestsPigeonTestTestMessage + */ CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( FlValue* test_list); +/** + * core_tests_pigeon_test_test_message_get_test_list + * @object: a #CoreTestsPigeonTestTestMessage. + * + * Gets the value of the testList field of @object. + * + * Returns: the field value. + */ FlValue* core_tests_pigeon_test_test_message_get_test_list( - CoreTestsPigeonTestTestMessage* self); + CoreTestsPigeonTestTestMessage* object); G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse, core_tests_pigeon_test_host_integration_core_api_noop_response, CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_NOOP_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_noop_response_new: + * + * Creates a new response to HostIntegrationCoreApi.noop. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* core_tests_pigeon_test_host_integration_core_api_noop_response_new(); +/** + * core_tests_pigeon_test_host_integration_core_api_noop_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.noop. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* core_tests_pigeon_test_host_integration_core_api_noop_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -337,10 +1018,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoAllTypes. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( CoreTestsPigeonTestAllTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoAllTypes. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -351,10 +1049,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_throw_error_response_new: + * + * Creates a new response to HostIntegrationCoreApi.throwError. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* core_tests_pigeon_test_host_integration_core_api_throw_error_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.throwError. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -365,9 +1080,28 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new: + * + * Creates a new response to HostIntegrationCoreApi.throwErrorFromVoid. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new(); +/** + * core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.throwErrorFromVoid. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -378,10 +1112,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_THROW_FLUTTER_ERROR_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new: + * + * Creates a new response to HostIntegrationCoreApi.throwFlutterError. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.throwFlutterError. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -392,10 +1145,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_INT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_int_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoInt. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( int64_t return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_int_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoInt. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_int_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -406,10 +1176,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_double_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoDouble. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( double return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_double_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoDouble. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_double_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -420,10 +1207,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoBool. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( gboolean return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoBool. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -434,10 +1238,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoString. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoString. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -448,10 +1269,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoUint8List. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoUint8List. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -462,10 +1302,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_OBJECT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_object_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoObject. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_object_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoObject. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* core_tests_pigeon_test_host_integration_core_api_echo_object_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -476,10 +1333,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_list_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoList. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_list_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoList. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* core_tests_pigeon_test_host_integration_core_api_echo_list_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -490,10 +1364,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_map_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoMap. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_map_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoMap. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* core_tests_pigeon_test_host_integration_core_api_echo_map_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -504,10 +1395,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_CLASS_WRAPPER_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoClassWrapper. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new( CoreTestsPigeonTestAllClassesWrapper* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoClassWrapper. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -518,10 +1428,27 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoEnum. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( CoreTestsPigeonTestAnEnum return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoEnum. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -532,10 +1459,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NAMED_DEFAULT_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNamedDefaultString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new( const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoNamedDefaultString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -546,10 +1493,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_DEFAULT_DOUBLE_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoOptionalDefaultDouble. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new( double return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoOptionalDefaultDouble. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -560,10 +1527,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_REQUIRED_INT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoRequiredInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new( int64_t return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoRequiredInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -574,10 +1560,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoAllNullableTypes. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new( CoreTestsPigeonTestAllNullableTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoAllNullableTypes. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -589,10 +1594,31 @@ G_DECLARE_FINAL_TYPE( HOST_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new: + * + * Creates a new response to + * HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -603,10 +1629,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_EXTRACT_NESTED_NULLABLE_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.extractNestedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new( const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.extractNestedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -617,10 +1663,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_CREATE_NESTED_NULLABLE_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.createNestedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new( CoreTestsPigeonTestAllClassesWrapper* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.createNestedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -631,10 +1697,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new: + * + * Creates a new response to HostIntegrationCoreApi.sendMultipleNullableTypes. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new( CoreTestsPigeonTestAllNullableTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.sendMultipleNullableTypes. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -646,10 +1732,31 @@ G_DECLARE_FINAL_TYPE( HOST_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new: + * + * Creates a new response to + * HostIntegrationCoreApi.sendMultipleNullableTypesWithoutRecursion. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.sendMultipleNullableTypesWithoutRecursion. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -660,10 +1767,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new( int64_t* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -674,10 +1800,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableDouble. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new( double* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableDouble. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -688,10 +1833,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableBool. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new( gboolean* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableBool. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -702,10 +1866,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new( const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -716,10 +1899,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableUint8List. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new( const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableUint8List. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -730,10 +1932,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_OBJECT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableObject. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableObject. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -744,10 +1965,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableList. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableList. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -758,10 +1998,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableMap. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new( FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableMap. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -772,10 +2031,29 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNullableEnum. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new( CoreTestsPigeonTestAnEnum* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostIntegrationCoreApi.echoNullableEnum. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -786,10 +2064,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_OPTIONAL_NULLABLE_INT_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoOptionalNullableInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new( int64_t* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoOptionalNullableInt. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -800,10 +2098,30 @@ G_DECLARE_FINAL_TYPE( CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_ECHO_NAMED_NULLABLE_STRING_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNamedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new( const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoNamedNullableString. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse + */ CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -812,1096 +2130,2651 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, core_tests_pigeon_test_host_integration_core_api, CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API, GObject) +/** + * CoreTestsPigeonTestHostIntegrationCoreApiVTable: + * + * Table of functions exposed by HostIntegrationCoreApi to be implemented by the + * API provider. + */ typedef struct { CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* (*noop)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* ( - *echo_all_types)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_all_types)(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* (*throw_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* ( - *throw_error_from_void)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *throw_error_from_void)(CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* ( - *throw_flutter_error)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *throw_flutter_error)(CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* (*echo_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* (*echo_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* (*echo_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* (*echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* ( - *echo_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* (*echo_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* (*echo_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* (*echo_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* ( - *echo_class_wrapper)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_class_wrapper)(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* (*echo_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* ( *echo_named_default_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* ( *echo_optional_default_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* ( - *echo_required_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_required_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* ( - *echo_all_nullable_types)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_all_nullable_types)(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* ( *echo_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* ( *extract_nested_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* ( *create_nested_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* nullable_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* ( *send_multiple_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - gboolean* a_nullable_bool, int64_t* a_nullable_int, - const gchar* a_nullable_string, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* ( *send_multiple_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - gboolean* a_nullable_bool, int64_t* a_nullable_int, - const gchar* a_nullable_string, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* ( - *echo_nullable_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* ( - *echo_nullable_double)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_double)(CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_nullable_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* ( - *echo_nullable_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* ( - *echo_nullable_string)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_string)(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* ( - *echo_nullable_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, - gpointer user_data); + *echo_nullable_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, + const uint8_t* a_nullable_uint8_list, + size_t a_nullable_uint8_list_length, + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* ( - *echo_nullable_object)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_object)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_object, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* ( - *echo_nullable_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* ( - *echo_nullable_map)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_map)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_nullable_map, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* ( - *echo_nullable_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + *echo_nullable_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* ( *echo_optional_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* a_nullable_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* ( *echo_named_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data); - void (*noop_async)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*noop_async)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_int)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*echo_async_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*echo_async_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_list)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*echo_async_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_map)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*echo_async_map)(CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* self, + void (*echo_async_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*throw_async_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*throw_async_error_from_void)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*throw_async_flutter_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_all_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_all_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* an_object, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_noop)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_throw_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_throw_error_from_void)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_send_multiple_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - gboolean* a_nullable_bool, int64_t* a_nullable_int, - const gchar* a_nullable_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_send_multiple_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, - gboolean* a_nullable_bool, int64_t* a_nullable_int, - const gchar* a_nullable_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, + int64_t* a_nullable_int, const gchar* a_nullable_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, size_t list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, gboolean* a_bool, + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, int64_t* an_int, + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, double* a_double, + CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const uint8_t* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, size_t list_length, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); void (*call_flutter_small_api_echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); } CoreTestsPigeonTestHostIntegrationCoreApiVTable; +/** + * core_tests_pigeon_test_host_integration_core_api_new: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * @vtable: implementations of the methods in this API. + * @user_data: (closure): user data to pass to the functions in @vtable. + * @user_data_free_func: (allow-none): a function which gets called to free + * @user_data, or %NULL. + * + * Creates an object to implement the HostIntegrationCoreApi API. + * + * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApi + */ CoreTestsPigeonTestHostIntegrationCoreApi* core_tests_pigeon_test_host_integration_core_api_new( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_noop_async: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * + * Responds to HostIntegrationCoreApi.noopAsync. + */ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.noopAsync. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, double return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gboolean return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * + * Responds to HostIntegrationCoreApi.echoAsyncUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncObject. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncObject. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.throwAsyncError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.throwAsyncError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * + * Responds to HostIntegrationCoreApi.throwAsyncErrorFromVoid. + */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.throwAsyncErrorFromVoid. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.throwAsyncFlutterError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.throwAsyncFlutterError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncAllTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncAllTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to + * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, int64_t* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, double* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gboolean* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableObject. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableObject. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.echoAsyncNullableEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * + * Responds to HostIntegrationCoreApi.callFlutterNoop. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterNoop. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterThrowError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterThrowError. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * + * Responds to HostIntegrationCoreApi.callFlutterThrowErrorFromVoid. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterThrowErrorFromVoid. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoAllTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoAllTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoAllNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterEchoAllNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to + * HostIntegrationCoreApi.callFlutterEchoAllNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterEchoAllNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to + * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypesWithoutRecursion. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gboolean return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, double return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, gboolean* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableBool. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, int64_t* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableInt. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, double* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterEchoNullableDouble. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterEchoNullableString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterEchoNullableUint8List. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableList. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, FlValue* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableMap. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterEchoNullableEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableEnum. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostIntegrationCoreApi.callFlutterSmallApiEchoString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string: + * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to + * HostIntegrationCoreApi.callFlutterSmallApiEchoString. + */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); -// The core interface that the Dart platform_test code implements for host -// integration tests to call into. +/** + * CoreTestsPigeonTestFlutterIntegrationCoreApi: + * + * The core interface that the Dart platform_test code implements for host + * integration tests to call into. + */ + G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApi, core_tests_pigeon_test_flutter_integration_core_api, CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API, GObject) +/** + * core_tests_pigeon_test_flutter_integration_core_api_new: + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Creates a new object to access the FlutterIntegrationCoreApi API. + * + * Returns: a new #CoreTestsPigeonTestFlutterIntegrationCoreApi + */ CoreTestsPigeonTestFlutterIntegrationCoreApi* core_tests_pigeon_test_flutter_integration_core_api_new( FlBinaryMessenger* messenger, const gchar* suffix); -// A no-op function taking no arguments and returning no value, to sanity -// test basic calling. +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * A no-op function taking no arguments and returning no value, to sanity + * test basic calling. + */ void core_tests_pigeon_test_flutter_integration_core_api_noop( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_noop() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); -// Responds with an error from an async function returning a value. +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Responds with an error from an async function returning a value. + */ void core_tests_pigeon_test_flutter_integration_core_api_throw_error( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_throw_error() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, FlValue** return_value, GError** error); -// Responds with an error from an async void function. +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Responds with an error from an async void function. + */ void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); -// Returns the passed object, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @everything: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed object, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAllTypes** return_value, GError** error); -// Returns the passed object, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @everything: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed object, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); -// Returns passed in arguments of multiple types. -// -// Tests multiple-arity FlutterApi handling. +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_nullable_bool: (allow-none): parameter for this method. + * @a_nullable_int: (allow-none): parameter for this method. + * @a_nullable_string: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); -// Returns the passed object, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @everything: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed object, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error); -// Returns passed in arguments of multiple types. -// -// Tests multiple-arity FlutterApi handling. +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_nullable_bool: (allow-none): parameter for this method. + * @a_nullable_int: (allow-none): parameter for this method. + * @a_nullable_string: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error); -// Returns the passed boolean, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_bool: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed boolean, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean a_bool, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, gboolean a_bool, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_bool() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, gboolean* return_value, GError** error); -// Returns the passed int, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @an_int: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed int, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_int( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t an_int, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, int64_t an_int, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_int() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, int64_t* return_value, GError** error); -// Returns the passed double, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_double: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed double, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_double( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double a_double, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, double a_double, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_double() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, double* return_value, GError** error); -// Returns the passed string, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_string: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed string, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_string( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_string() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, gchar** return_value, GError** error); -// Returns the passed byte list, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @list: parameter for this method. + * @list_length: length of list. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed byte list, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* list, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, const uint8_t* list, size_t list_length, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, uint8_t** return_value, size_t* return_value_length, GError** error); -// Returns the passed list, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @list: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed list, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_list( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, FlValue* list, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_list() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, FlValue** return_value, GError** error); -// Returns the passed map, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_map: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed map, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_map( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, FlValue* a_map, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_map() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, FlValue** return_value, GError** error); -// Returns the passed enum to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @an_enum: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed enum to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_enum() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAnEnum* return_value, GError** error); -// Returns the passed boolean, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_bool: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed boolean, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, gboolean* a_bool, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, gboolean* a_bool, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, gboolean** return_value, GError** error); -// Returns the passed int, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @an_int: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed int, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t* an_int, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, int64_t* an_int, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, int64_t** return_value, GError** error); -// Returns the passed double, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_double: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed double, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, double* a_double, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, double** return_value, GError** error); -// Returns the passed string, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_string: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed string, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, gchar** return_value, GError** error); -// Returns the passed byte list, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @list: (allow-none): parameter for this method. + * @list_length: length of list. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed byte list, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const uint8_t* list, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, const uint8_t* list, size_t list_length, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @return_value_length: location to write length of @return_value. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, uint8_t** return_value, size_t* return_value_length, GError** error); -// Returns the passed list, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @list: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed list, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* list, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, FlValue* list, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, FlValue** return_value, GError** error); -// Returns the passed map, to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_map: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed map, to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, FlValue* a_map, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, FlValue** return_value, GError** error); -// Returns the passed enum to test serialization and deserialization. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @an_enum: (allow-none): parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed enum to test serialization and deserialization. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, CoreTestsPigeonTestAnEnum** return_value, GError** error); -// A no-op function taking no arguments and returning no value, to sanity -// test basic asynchronous calling. +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * A no-op function taking no arguments and returning no value, to sanity + * test basic asynchronous calling. + */ void core_tests_pigeon_test_flutter_integration_core_api_noop_async( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_integration_core_api_noop_async() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); -// Returns the passed in generic Object asynchronously. +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string: + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. + * @a_string: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + * Returns the passed in generic Object asynchronously. + */ void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, const gchar* a_string, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, gchar** return_value, GError** error); G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApiNoopResponse, @@ -1909,9 +4782,26 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApiNoopResponse, CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API_NOOP_RESPONSE, GObject) +/** + * core_tests_pigeon_test_host_trivial_api_noop_response_new: + * + * Creates a new response to HostTrivialApi.noop. + * + * Returns: a new #CoreTestsPigeonTestHostTrivialApiNoopResponse + */ CoreTestsPigeonTestHostTrivialApiNoopResponse* core_tests_pigeon_test_host_trivial_api_noop_response_new(); +/** + * core_tests_pigeon_test_host_trivial_api_noop_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to HostTrivialApi.noop. + * + * Returns: a new #CoreTestsPigeonTestHostTrivialApiNoopResponse + */ CoreTestsPigeonTestHostTrivialApiNoopResponse* core_tests_pigeon_test_host_trivial_api_noop_response_new_error( const gchar* code, const gchar* message, FlValue* details); @@ -1920,11 +4810,31 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApi, core_tests_pigeon_test_host_trivial_api, CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API, GObject) +/** + * CoreTestsPigeonTestHostTrivialApiVTable: + * + * Table of functions exposed by HostTrivialApi to be implemented by the API + * provider. + */ typedef struct { CoreTestsPigeonTestHostTrivialApiNoopResponse* (*noop)( - CoreTestsPigeonTestHostTrivialApi* self, gpointer user_data); + CoreTestsPigeonTestHostTrivialApi* api, gpointer user_data); } CoreTestsPigeonTestHostTrivialApiVTable; +/** + * core_tests_pigeon_test_host_trivial_api_new: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * @vtable: implementations of the methods in this API. + * @user_data: (closure): user data to pass to the functions in @vtable. + * @user_data_free_func: (allow-none): a function which gets called to free + * @user_data, or %NULL. + * + * Creates an object to implement the HostTrivialApi API. + * + * Returns: a new #CoreTestsPigeonTestHostTrivialApi + */ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, @@ -1934,64 +4844,178 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, core_tests_pigeon_test_host_small_api, CORE_TESTS_PIGEON_TEST, HOST_SMALL_API, GObject) +/** + * CoreTestsPigeonTestHostSmallApiVTable: + * + * Table of functions exposed by HostSmallApi to be implemented by the API + * provider. + */ typedef struct { - void (*echo)(CoreTestsPigeonTestHostSmallApi* self, const gchar* a_string, + void (*echo)(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*void_void)(CoreTestsPigeonTestHostSmallApi* self, + void (*void_void)(CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); } CoreTestsPigeonTestHostSmallApiVTable; +/** + * core_tests_pigeon_test_host_small_api_new: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * @vtable: implementations of the methods in this API. + * @user_data: (closure): user data to pass to the functions in @vtable. + * @user_data_free_func: (allow-none): a function which gets called to free + * @user_data, or %NULL. + * + * Creates an object to implement the HostSmallApi API. + * + * Returns: a new #CoreTestsPigeonTestHostSmallApi + */ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * core_tests_pigeon_test_host_small_api_respond_echo: + * @api: a #CoreTestsPigeonTestHostSmallApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @return_value: location to write the value returned by this method. + * + * Responds to HostSmallApi.echo. + */ void core_tests_pigeon_test_host_small_api_respond_echo( - CoreTestsPigeonTestHostSmallApi* self, + CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* return_value); +/** + * core_tests_pigeon_test_host_small_api_respond_error_echo: + * @api: a #CoreTestsPigeonTestHostSmallApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostSmallApi.echo. + */ void core_tests_pigeon_test_host_small_api_respond_error_echo( - CoreTestsPigeonTestHostSmallApi* self, + CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +/** + * core_tests_pigeon_test_host_small_api_respond_void_void: + * @api: a #CoreTestsPigeonTestHostSmallApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * + * Responds to HostSmallApi.voidVoid. + */ void core_tests_pigeon_test_host_small_api_respond_void_void( - CoreTestsPigeonTestHostSmallApi* self, + CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle); +/** + * core_tests_pigeon_test_host_small_api_respond_error_void_void: + * @api: a #CoreTestsPigeonTestHostSmallApi. + * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Responds with an error to HostSmallApi.voidVoid. + */ void core_tests_pigeon_test_host_small_api_respond_error_void_void( - CoreTestsPigeonTestHostSmallApi* self, + CoreTestsPigeonTestHostSmallApi* api, FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); -// A simple API called in some unit tests. +/** + * CoreTestsPigeonTestFlutterSmallApi: + * + * A simple API called in some unit tests. + */ + G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestFlutterSmallApi, core_tests_pigeon_test_flutter_small_api, CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API, GObject) +/** + * core_tests_pigeon_test_flutter_small_api_new: + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Creates a new object to access the FlutterSmallApi API. + * + * Returns: a new #CoreTestsPigeonTestFlutterSmallApi + */ CoreTestsPigeonTestFlutterSmallApi* core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger, const gchar* suffix); +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list: + * @api: a #CoreTestsPigeonTestFlutterSmallApi. + * @msg: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + */ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( - CoreTestsPigeonTestFlutterSmallApi* self, + CoreTestsPigeonTestFlutterSmallApi* api, CoreTestsPigeonTestTestMessage* msg, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_small_api_echo_wrapped_list() + * call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( - CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterSmallApi* api, GAsyncResult* result, CoreTestsPigeonTestTestMessage** return_value, GError** error); +/** + * core_tests_pigeon_test_flutter_small_api_echo_string: + * @api: a #CoreTestsPigeonTestFlutterSmallApi. + * @a_string: parameter for this method. + * @cancellable: (allow-none): a #GCancellable or %NULL. + * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when + * the call is complete or %NULL to ignore the response. + * @user_data: (closure): user data to pass to @callback. + * + */ void core_tests_pigeon_test_flutter_small_api_echo_string( - CoreTestsPigeonTestFlutterSmallApi* self, const gchar* a_string, + CoreTestsPigeonTestFlutterSmallApi* api, const gchar* a_string, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data); +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_finish: + * @api: a #className. + * @result: a #GAsyncResult. + * @return_value: location to write the value returned by this method. + * @error: (allow-none): #GError location to store the error occurring, or %NULL + * to ignore. + * + * Completes a core_tests_pigeon_test_flutter_small_api_echo_string() call. + * + * Returns: %TRUE on success. + */ gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( - CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, + CoreTestsPigeonTestFlutterSmallApi* api, GAsyncResult* result, gchar** return_value, GError** error); G_END_DECLS From 65c12fa80f42c18d948351dca383e4cc6d8b5e7d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 17 Jun 2024 16:59:35 +1200 Subject: [PATCH 106/127] Use an object for the return value from Flutter calls --- .../pigeon/example/app/linux/messages.g.cc | 132 +- .../pigeon/example/app/linux/messages.g.h | 75 +- packages/pigeon/lib/gobject_generator.dart | 326 +- .../linux/pigeon/core_tests.gen.cc | 3783 +++++++++++++++-- .../test_plugin/linux/pigeon/core_tests.gen.h | 2237 +++++++++- .../test_plugin/linux/test_plugin.cc | 745 +++- 6 files changed, 6573 insertions(+), 725 deletions(-) diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index acdaaa838a1c..ec7d8f41cb27 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -657,6 +657,120 @@ pigeon_example_package_message_flutter_api_new(FlBinaryMessenger* messenger, return self; } +struct _PigeonExamplePackageMessageFlutterApiFlutterMethodResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse, + pigeon_example_package_message_flutter_api_flutter_method_response, + G_TYPE_OBJECT) + +static void +pigeon_example_package_message_flutter_api_flutter_method_response_dispose( + GObject* object) { + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + pigeon_example_package_message_flutter_api_flutter_method_response_parent_class) + ->dispose(object); +} + +static void +pigeon_example_package_message_flutter_api_flutter_method_response_init( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) {} + +static void +pigeon_example_package_message_flutter_api_flutter_method_response_class_init( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_message_flutter_api_flutter_method_response_dispose; +} + +static PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* +pigeon_example_package_message_flutter_api_flutter_method_response_new( + FlValue* response) { + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self = + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE(g_object_new( + pigeon_example_package_message_flutter_api_flutter_method_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); + } + return self; +} + +gboolean +pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) { + g_return_val_if_fail( + PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_code( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) { + g_return_val_if_fail( + PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + self), + nullptr); + g_assert( + pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_message( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) { + g_return_val_if_fail( + PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + self), + nullptr); + g_assert( + pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_details( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) { + g_return_val_if_fail( + PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + self), + nullptr); + g_assert( + pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_return_value( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* self) { + g_return_val_if_fail( + PIGEON_EXAMPLE_PACKAGE_IS_MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE( + self), + nullptr); + g_assert( + !pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + self)); + return fl_value_get_string(self->return_value); +} + static void pigeon_example_package_message_flutter_api_flutter_method_cb( GObject* object, GAsyncResult* result, gpointer user_data) { GTask* task = G_TASK(user_data); @@ -685,9 +799,10 @@ void pigeon_example_package_message_flutter_api_flutter_method( pigeon_example_package_message_flutter_api_flutter_method_cb, task); } -gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( +PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* +pigeon_example_package_message_flutter_api_flutter_method_finish( PigeonExamplePackageMessageFlutterApi* self, GAsyncResult* result, - gchar** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -695,15 +810,8 @@ gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } - - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = g_strdup(fl_value_get_string(rv)); - - return TRUE; + return pigeon_example_package_message_flutter_api_flutter_method_response_new( + response); } diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 741665ff3fd6..690256ce0952 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -220,6 +220,72 @@ void pigeon_example_package_example_host_api_respond_error_send_message( FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +G_DECLARE_FINAL_TYPE( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse, + pigeon_example_package_message_flutter_api_flutter_method_response, + PIGEON_EXAMPLE_PACKAGE, MESSAGE_FLUTTER_API_FLUTTER_METHOD_RESPONSE, + GObject) + +/** + * pigeon_example_package_message_flutter_api_flutter_method_response_is_error: + * @response: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse. + * + * Checks if a response to MessageFlutterApi.flutterMethod is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +pigeon_example_package_message_flutter_api_flutter_method_response_is_error( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* response); + +/** + * pigeon_example_package_message_flutter_api_flutter_method_response_get_error_code: + * @response: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_code( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* response); + +/** + * pigeon_example_package_message_flutter_api_flutter_method_response_get_error_message: + * @response: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_message( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* response); + +/** + * pigeon_example_package_message_flutter_api_flutter_method_response_get_error_details: + * @response: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +pigeon_example_package_message_flutter_api_flutter_method_response_get_error_details( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* response); + +/** + * pigeon_example_package_message_flutter_api_flutter_method_response_get_return_value: + * @response: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +const gchar* +pigeon_example_package_message_flutter_api_flutter_method_response_get_return_value( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* response); + /** * PigeonExamplePackageMessageFlutterApi: * @@ -261,17 +327,18 @@ void pigeon_example_package_message_flutter_api_flutter_method( * pigeon_example_package_message_flutter_api_flutter_method_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a pigeon_example_package_message_flutter_api_flutter_method() call. * - * Returns: %TRUE on success. + * Returns: a #PigeonExamplePackageMessageFlutterApiFlutterMethodResponse or + * %NULL on error. */ -gboolean pigeon_example_package_message_flutter_api_flutter_method_finish( +PigeonExamplePackageMessageFlutterApiFlutterMethodResponse* +pigeon_example_package_message_flutter_api_flutter_method_finish( PigeonExamplePackageMessageFlutterApi* api, GAsyncResult* result, - gchar** return_value, GError** error); + GError** error); G_END_DECLS diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index e430ba0b54f5..978f2e6a596f 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -287,6 +287,10 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String module = _getModule(generatorOptions, dartPackageName); final String className = _getClassName(module, api.name); + for (final Method method in api.methods) { + _writeFlutterApiRespondClass(indent, module, api, method); + } + final String methodPrefix = _getMethodPrefix(module, api.name); indent.newln(); indent.writeln('/**'); @@ -315,6 +319,8 @@ class GObjectHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = _getClassName(module, responseName); final List asyncArgs = ['$className* api']; for (final Parameter param in method.parameters) { @@ -354,14 +360,9 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.writeln( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')});"); - final String returnType = - _getType(module, method.returnType, isOutput: true); final List finishArgs = [ '$className* api', 'GAsyncResult* result', - if (returnType != 'void') '$returnType* return_value', - if (_isNumericListType(method.returnType)) - 'size_t* return_value_length', 'GError** error' ]; indent.newln(); @@ -369,23 +370,102 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.writeln(' * ${methodPrefix}_${methodName}_finish:'); indent.writeln(' * @api: a #className.'); indent.writeln(' * @result: a #GAsyncResult.'); - if (returnType != 'void') { - indent.writeln( - ' * @return_value: location to write the value returned by this method.'); - } - if (_isNumericListType(method.returnType)) { - indent.writeln( - ' * @return_value_length: location to write length of @return_value.'); - } indent.writeln( ' * @error: (allow-none): #GError location to store the error occurring, or %NULL to ignore.'); indent.writeln(' *'); indent.writeln(' * Completes a ${methodPrefix}_$methodName() call.'); indent.writeln(' *'); - indent.writeln(' * Returns: %TRUE on success.'); + indent.writeln(' * Returns: a #$responseClassName or %NULL on error.'); indent.writeln(' */'); indent.writeln( - "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); + "$responseClassName* ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); + } + } + + // Write the API response classes. + void _writeFlutterApiRespondClass( + Indent indent, String module, Api api, Method method) { + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = _getClassName(module, responseName); + final String responseMethodPrefix = _getMethodPrefix(module, responseName); + final String primitiveType = + _getType(module, method.returnType, primitive: true); + + indent.newln(); + _writeDeclareFinalType(indent, module, responseName); + + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_is_error:'); + indent.writeln(' * @response: a #$responseClassName.'); + indent.writeln(' *'); + indent.writeln( + ' * Checks if a response to ${api.name}.${method.name} is an error.'); + indent.writeln(' *'); + indent.writeln(' * Returns: a %TRUE if this response is an error.'); + indent.writeln(' */'); + indent.writeln( + 'gboolean ${responseMethodPrefix}_is_error($responseClassName* response);'); + + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_get_error_code:'); + indent.writeln(' * @response: a #$responseClassName.'); + indent.writeln(' *'); + indent.writeln(' * Get the error code for this response.'); + indent.writeln(' *'); + indent.writeln(' * Returns: an error code or %NULL if not an error.'); + indent.writeln(' */'); + indent.writeln( + 'const gchar* ${responseMethodPrefix}_get_error_code($responseClassName* response);'); + + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_get_error_message:'); + indent.writeln(' * @response: a #$responseClassName.'); + indent.writeln(' *'); + indent.writeln(' * Get the error message for this response.'); + indent.writeln(' *'); + indent.writeln(' * Returns: an error message.'); + indent.writeln(' */'); + indent.writeln( + 'const gchar* ${responseMethodPrefix}_get_error_message($responseClassName* response);'); + + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_get_error_details:'); + indent.writeln(' * @response: a #$responseClassName.'); + indent.writeln(' *'); + indent.writeln(' * Get the error details for this response.'); + indent.writeln(' *'); + indent.writeln(' * Returns: (allow-none): an error details or %NULL.'); + indent.writeln(' */'); + indent.writeln( + 'FlValue* ${responseMethodPrefix}_get_error_details($responseClassName* response);'); + + if (!method.returnType.isVoid) { + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${responseMethodPrefix}_get_return_value:'); + indent.writeln(' * @response: a #$responseClassName.'); + if (_isNumericListType(method.returnType)) { + indent.writeln( + ' * @return_value_length: (allow-none): location to write length of the return value or %NULL to ignore.'); + } + indent.writeln(' *'); + indent.writeln(' * Get the return value for this response.'); + indent.writeln(' *'); + if (method.returnType.isNullable) { + indent.writeln(' * Returns: (allow-none): a return value or %NULL.'); + } else { + indent.writeln(' * Returns: a return value.'); + } + indent.writeln(' */'); + final String returnType = _isNullablePrimitiveType(method.returnType) + ? '$primitiveType*' + : primitiveType; + indent.writeln( + '$returnType ${responseMethodPrefix}_get_return_value($responseClassName* response${_isNumericListType(method.returnType) ? ', size_t* return_value_length' : ''});'); } } @@ -404,7 +484,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { - _writeApiRespondClass(indent, module, api, method); + _writeHostApiRespondClass(indent, module, api, method); } indent.newln(); @@ -435,12 +515,12 @@ class GObjectHeaderGenerator extends StructuredGenerator { for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { - _writeApiRespondFunctionPrototype(indent, module, api, method); + _writeHostApiRespondFunctionPrototype(indent, module, api, method); } } // Write the API response classes. - void _writeApiRespondClass( + void _writeHostApiRespondClass( Indent indent, String module, Api api, Method method) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -519,7 +599,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { } // Write the function prototype for an API method response. - void _writeApiRespondFunctionPrototype( + void _writeHostApiRespondFunctionPrototype( Indent indent, String module, Api api, Method method) { final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); @@ -544,7 +624,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { } if (_isNumericListType(method.returnType)) { indent.writeln( - ' * @return_value_length: location to write length of @return_value.'); + ' * @return_value_length: (allow-none): location to write length of @return_value or %NULL to ignore.'); } indent.writeln(' *'); indent.writeln(' * Responds to ${api.name}.${method.name}. '); @@ -771,7 +851,7 @@ class GObjectSourceGenerator extends StructuredGenerator { final String fieldType = _getType(module, field.type); final String fieldValue = _fromFlValue(module, field.type, 'value$i'); indent - .writeln('FlValue *value$i = fl_value_get_list_value(values, $i);'); + .writeln('FlValue* value$i = fl_value_get_list_value(values, $i);'); args.add(fieldName); if (_isNullablePrimitiveType(field.type)) { indent.writeln('$fieldType $fieldName = nullptr;'); @@ -1020,6 +1100,143 @@ class GObjectSourceGenerator extends StructuredGenerator { for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); + final String responseName = _getResponseName(api.name, method.name); + final String responseClassName = _getClassName(module, responseName); + final String responseMethodPrefix = + _getMethodPrefix(module, responseName); + final String testResponseMacro = + '${_snakeCaseFromCamelCase(module)}_IS_${_snakeCaseFromCamelCase(responseName)}' + .toUpperCase(); + + indent.newln(); + _writeObjectStruct(indent, module, responseName, () { + indent.writeln('FlValue* error;'); + if (!method.returnType.isVoid) { + indent.writeln('FlValue* return_value;'); + if (_isNullablePrimitiveType(method.returnType)) { + final String primitiveType = + _getType(module, method.returnType, primitive: true); + indent.writeln('$primitiveType return_value_;'); + } + } + }); + + indent.newln(); + _writeDefineType(indent, module, responseName); + + indent.newln(); + _writeDispose(indent, module, responseName, () { + _writeCastSelf(indent, module, responseName, 'object'); + indent.writeln('g_clear_pointer(&self->error, fl_value_unref);'); + if (!method.returnType.isVoid) { + indent + .writeln('g_clear_pointer(&self->return_value, fl_value_unref);'); + } + }); + + indent.newln(); + _writeInit(indent, module, responseName, () {}); + + indent.newln(); + _writeClassInit(indent, module, responseName, () {}); + + indent.newln(); + indent.writeScoped( + 'static $responseClassName* ${responseMethodPrefix}_new(FlValue* response) {', + '}', () { + _writeObjectNew(indent, module, responseName); + indent.writeScoped('if (fl_value_get_length(response) > 1) {', '}', () { + indent.writeln('self->error = fl_value_ref(response);'); + }); + if (!method.returnType.isVoid) { + indent.writeScoped('else {', '}', () { + indent.writeln( + 'FlValue* value = fl_value_get_list_value(response, 0);'); + indent.writeln('self->return_value = fl_value_ref(value);'); + }); + } + indent.writeln('return self;'); + }); + + indent.newln(); + indent.writeScoped( + 'gboolean ${responseMethodPrefix}_is_error($responseClassName* self) {', + '}', () { + indent + .writeln('g_return_val_if_fail($testResponseMacro(self), FALSE);'); + indent.writeln('return self->error != nullptr;'); + }); + + indent.newln(); + indent.writeScoped( + 'const gchar* ${responseMethodPrefix}_get_error_code($responseClassName* self) {', + '}', () { + indent.writeln( + 'g_return_val_if_fail($testResponseMacro(self), nullptr);'); + indent.writeln('g_assert(${responseMethodPrefix}_is_error(self));'); + indent.writeln( + 'return fl_value_get_string(fl_value_get_list_value(self->error, 0));'); + }); + + indent.newln(); + indent.writeScoped( + 'const gchar* ${responseMethodPrefix}_get_error_message($responseClassName* self) {', + '}', () { + indent.writeln( + 'g_return_val_if_fail($testResponseMacro(self), nullptr);'); + indent.writeln('g_assert(${responseMethodPrefix}_is_error(self));'); + indent.writeln( + 'return fl_value_get_string(fl_value_get_list_value(self->error, 1));'); + }); + + indent.newln(); + indent.writeScoped( + 'FlValue* ${responseMethodPrefix}_get_error_details($responseClassName* self) {', + '}', () { + indent.writeln( + 'g_return_val_if_fail($testResponseMacro(self), nullptr);'); + indent.writeln('g_assert(${responseMethodPrefix}_is_error(self));'); + indent.writeln('return fl_value_get_list_value(self->error, 2);'); + }); + + if (!method.returnType.isVoid) { + final String primitiveType = + _getType(module, method.returnType, primitive: true); + + indent.newln(); + final String returnType = _isNullablePrimitiveType(method.returnType) + ? '$primitiveType*' + : primitiveType; + indent.writeScoped( + '$returnType ${responseMethodPrefix}_get_return_value($responseClassName* self${_isNumericListType(method.returnType) ? ', size_t* return_value_length' : ''}) {', + '}', () { + indent.writeln( + 'g_return_val_if_fail($testResponseMacro(self), ${_getDefaultValue(module, method.returnType)});'); + indent.writeln('g_assert(!${responseMethodPrefix}_is_error(self));'); + if (method.returnType.isNullable) { + indent.writeScoped( + 'if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) {', + '}', () { + indent.writeln('return nullptr;'); + }); + } + if (_isNumericListType(method.returnType)) { + indent.writeScoped('if (return_value_length != nullptr) {', '}', + () { + indent.writeln( + '*return_value_length = fl_value_get_length(self->return_value);'); + }); + } + if (_isNullablePrimitiveType(method.returnType)) { + indent.writeln( + 'self->return_value_ = ${_fromFlValue(module, method.returnType, 'self->return_value')};'); + indent.writeln('return &self->return_value_;'); + } else { + indent.writeln( + 'return ${_fromFlValue(module, method.returnType, 'self->return_value')};'); + } + }); + } indent.newln(); indent.writeScoped( @@ -1068,19 +1285,14 @@ class GObjectSourceGenerator extends StructuredGenerator { 'fl_basic_message_channel_send(channel, args, cancellable, ${methodPrefix}_${methodName}_cb, task);'); }); - final String returnType = - _getType(module, method.returnType, isOutput: true); final List finishArgs = [ '$className* self', 'GAsyncResult* result', - if (returnType != 'void') '$returnType* return_value', - if (_isNumericListType(method.returnType)) - 'size_t* return_value_length', 'GError** error', ]; indent.newln(); indent.writeScoped( - "gboolean ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", + "$responseClassName* ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')}) {", '}', () { indent.writeln('g_autoptr(GTask) task = G_TASK(result);'); indent.writeln( @@ -1089,64 +1301,10 @@ class GObjectSourceGenerator extends StructuredGenerator { 'FlBasicMessageChannel* channel = FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task));'); indent.writeln( 'g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error);'); - indent.writeScoped('if (response == nullptr) {', '}', () { - indent.writeln('return FALSE;'); - }); - indent.writeScoped('if (fl_value_get_length(response) > 1) {', '}', () { - indent.writeln('// FIXME: Set error'); - indent.writeln('return FALSE;'); + indent.writeScoped('if (response == nullptr) { ', '}', () { + indent.writeln('return nullptr;'); }); - if (returnType != 'void') { - indent.newln(); - indent.writeln('FlValue* rv = fl_value_get_list_value(response, 0);'); - final String returnValue = - _fromFlValue(module, method.returnType, 'rv'); - if (_isNullablePrimitiveType(method.returnType)) { - final String primitiveType = - _getType(module, method.returnType, primitive: true); - indent.writeScoped( - 'if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) {', '}', () { - indent.writeln( - '*return_value = static_cast<$primitiveType*>(malloc(sizeof($primitiveType)));'); - indent.writeln('**return_value = $returnValue;'); - if (_isNumericListType(method.returnType)) { - indent - .writeln('*return_value_length = fl_value_get_length(rv);'); - } - }); - indent.writeScoped('else {', '}', () { - indent.writeln('*return_value = nullptr;'); - if (_isNumericListType(method.returnType)) { - indent.writeln('*return_value_length = 0;'); - } - }); - } else if (method.returnType.isNullable) { - indent.writeScoped( - 'if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) {', '}', () { - indent.writeln( - '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(rv)')};'); - if (_isNumericListType(method.returnType)) { - indent - .writeln('*return_value_length = fl_value_get_length(rv);'); - } - }); - indent.writeScoped('else {', '}', () { - indent.writeln('*return_value = nullptr;'); - if (_isNumericListType(method.returnType)) { - indent.writeln('*return_value_length = 0;'); - } - }); - } else { - indent.writeln( - '*return_value = ${_referenceValue(module, method.returnType, returnValue, lengthVariableName: 'fl_value_get_length(rv)')};'); - if (_isNumericListType(method.returnType)) { - indent.writeln('*return_value_length = fl_value_get_length(rv);'); - } - } - } - - indent.newln(); - indent.writeln('return TRUE;'); + indent.writeln('return ${responseMethodPrefix}_new(response);'); }); } } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 63f1ef37e4e2..8f855b586b33 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -13068,6 +13068,100 @@ core_tests_pigeon_test_flutter_integration_core_api_new( return self; } +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse { + GObject parent_instance; + + FlValue* error; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse, + core_tests_pigeon_test_flutter_integration_core_api_noop_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE(object); + g_clear_pointer(&self->error, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_noop_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_noop_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE(g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); + } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + static void core_tests_pigeon_test_flutter_integration_core_api_noop_cb( GObject* object, GAsyncResult* result, gpointer user_data) { GTask* task = G_TASK(user_data); @@ -13094,7 +13188,8 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop( core_tests_pigeon_test_flutter_integration_core_api_noop_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { g_autoptr(GTask) task = G_TASK(result); @@ -13104,14 +13199,129 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_noop_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + return self->return_value; } static void core_tests_pigeon_test_flutter_integration_core_api_throw_error_cb( @@ -13140,9 +13350,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error( core_tests_pigeon_test_flutter_integration_core_api_throw_error_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - FlValue** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13150,21 +13361,113 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse { + GObject parent_instance; + + FlValue* error; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = fl_value_ref(rv); - } else { - *return_value = nullptr; - } +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); } static void @@ -13195,7 +13498,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { @@ -13206,14 +13509,127 @@ core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +CoreTestsPigeonTestAllTypes* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + self)); + return CORE_TESTS_PIGEON_TEST_ALL_TYPES( + fl_value_get_custom_value_object(self->return_value)); } static void @@ -13246,10 +13662,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAllTypes** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13257,18 +13673,137 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_new( + response); +} + +struct + _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = CORE_TESTS_PIGEON_TEST_ALL_TYPES(g_object_ref( - CORE_TESTS_PIGEON_TEST_ALL_TYPES(fl_value_get_custom_value_object(rv)))); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + return CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(self->return_value)); } static void @@ -13303,10 +13838,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13314,23 +13849,135 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_fini g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_new( + response); +} + +struct + _CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_dispose; +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(rv)))); +static CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + self)); + return CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( + fl_value_get_custom_value_object(self->return_value)); } static void @@ -13371,10 +14018,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypes** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13382,19 +14029,138 @@ core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_new( + response); +} + +struct + _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( - fl_value_get_custom_value_object(rv)))); +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + return CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(self->return_value)); } static void @@ -13430,10 +14196,9 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); @@ -13442,24 +14207,135 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_with g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_new( + response); +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - g_object_ref( - CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(rv)))); +struct + _CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self = CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + self)); + return CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( + fl_value_get_custom_value_object(self->return_value)); } static void @@ -13500,10 +14376,9 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); @@ -13512,19 +14387,125 @@ core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - g_object_ref(CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( - fl_value_get_custom_value_object(rv)))); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE( + self), + FALSE); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + self)); + return fl_value_get_bool(self->return_value); } static void core_tests_pigeon_test_flutter_integration_core_api_echo_bool_cb( @@ -13554,9 +14535,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( core_tests_pigeon_test_flutter_integration_core_api_echo_bool_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - gboolean* return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13564,26 +14546,134 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = fl_value_get_bool(rv); - - return TRUE; +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + self), + FALSE); + return self->error != nullptr; } -static void core_tests_pigeon_test_flutter_integration_core_api_echo_int_cb( - GObject* object, GAsyncResult* result, gpointer user_data) { - GTask* task = G_TASK(user_data); - g_task_return_pointer(task, result, g_object_unref); +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); } -void core_tests_pigeon_test_flutter_integration_core_api_echo_int( +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +int64_t +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE( + self), + 0); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + self)); + return fl_value_get_int(self->return_value); +} + +static void core_tests_pigeon_test_flutter_integration_core_api_echo_int_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_int( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, int64_t an_int, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -13604,9 +14694,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_int( core_tests_pigeon_test_flutter_integration_core_api_echo_int_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - int64_t* return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13614,17 +14705,126 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = fl_value_get_int(rv); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +double +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE( + self), + 0.0); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + self)); + return fl_value_get_float(self->return_value); } static void core_tests_pigeon_test_flutter_integration_core_api_echo_double_cb( @@ -13654,9 +14854,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_double( core_tests_pigeon_test_flutter_integration_core_api_echo_double_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - double* return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13664,17 +14865,126 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = fl_value_get_float(rv); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + self)); + return fl_value_get_string(self->return_value); } static void core_tests_pigeon_test_flutter_integration_core_api_echo_string_cb( @@ -13704,9 +15014,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_string( core_tests_pigeon_test_flutter_integration_core_api_echo_string_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - gchar** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13714,17 +15025,130 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = g_strdup(fl_value_get_string(rv)); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +const uint8_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* self, + size_t* return_value_length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + self)); + if (return_value_length != nullptr) { + *return_value_length = fl_value_get_length(self->return_value); + } + return fl_value_get_uint8_list(self->return_value); } static void @@ -13756,10 +15180,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - uint8_t** return_value, size_t* return_value_length, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13767,20 +15191,125 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = static_cast(memcpy(malloc(fl_value_get_length(rv)), - fl_value_get_uint8_list(rv), - fl_value_get_length(rv))); - *return_value_length = fl_value_get_length(rv); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + self)); + return self->return_value; } static void core_tests_pigeon_test_flutter_integration_core_api_echo_list_cb( @@ -13810,9 +15339,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_list( core_tests_pigeon_test_flutter_integration_core_api_echo_list_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - FlValue** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13820,34 +15350,142 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = fl_value_ref(rv); +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response, + G_TYPE_OBJECT) - return TRUE; +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_parent_class) + ->dispose(object); } -static void core_tests_pigeon_test_flutter_integration_core_api_echo_map_cb( - GObject* object, GAsyncResult* result, gpointer user_data) { - GTask* task = G_TASK(user_data); - g_task_return_pointer(task, result, g_object_unref); +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_dispose; } -void core_tests_pigeon_test_flutter_integration_core_api_echo_map( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, - GCancellable* cancellable, GAsyncReadyCallback callback, - gpointer user_data) { - g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, fl_value_ref(a_map)); - g_autofree gchar* channel_name = g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." - "echoMap%s", +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); + } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + self)); + return self->return_value; +} + +static void core_tests_pigeon_test_flutter_integration_core_api_echo_map_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_map( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, FlValue* a_map, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, fl_value_ref(a_map)); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoMap%s", self->suffix); g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); @@ -13860,9 +15498,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_map( core_tests_pigeon_test_flutter_integration_core_api_echo_map_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - FlValue** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13870,17 +15509,127 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = fl_value_ref(rv); +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +CoreTestsPigeonTestAnEnum +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE( + self), + static_cast(0)); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + self)); + return static_cast( + fl_value_get_int(reinterpret_cast(const_cast( + fl_value_get_custom_value(self->return_value))))); } static void core_tests_pigeon_test_flutter_integration_core_api_echo_enum_cb( @@ -13912,9 +15661,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( core_tests_pigeon_test_flutter_integration_core_api_echo_enum_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAnEnum* return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13922,19 +15672,137 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; + gboolean return_value_; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = static_cast( - fl_value_get_int(reinterpret_cast( - const_cast(fl_value_get_custom_value(rv))))); +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - return TRUE; +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +gboolean* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + self->return_value_ = fl_value_get_bool(self->return_value); + return &self->return_value_; } static void @@ -13967,10 +15835,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - gboolean** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -13978,22 +15846,132 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; + int64_t return_value_; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = static_cast(malloc(sizeof(gboolean))); - **return_value = fl_value_get_bool(rv); +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} - return TRUE; +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +int64_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + self->return_value_ = fl_value_get_int(self->return_value); + return &self->return_value_; } static void @@ -14026,10 +16004,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - int64_t** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14037,81 +16015,309 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; + double return_value_; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = static_cast(malloc(sizeof(int64_t))); - **return_value = fl_value_get_int(rv); +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +double* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + self->return_value_ = fl_value_get_float(self->return_value); + return &self->return_value_; +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb( + GObject* object, GAsyncResult* result, gpointer user_data) { + GTask* task = G_TASK(user_data); + g_task_return_pointer(task, result, g_object_unref); +} + +void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, + GCancellable* cancellable, GAsyncReadyCallback callback, + gpointer user_data) { + g_autoptr(FlValue) args = fl_value_new_list(); + fl_value_append_take(args, a_double != nullptr ? fl_value_new_float(*a_double) + : fl_value_new_null()); + g_autofree gchar* channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." + "echoNullableDouble%s", + self->suffix); + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + FlBasicMessageChannel* channel = fl_basic_message_channel_new( + self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); + GTask* task = g_task_new(self, cancellable, callback, user_data); + g_task_set_task_data(task, channel, g_object_unref); + fl_basic_message_channel_send( + channel, args, cancellable, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb, + task); +} + +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error) { + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); + if (response == nullptr) { + return nullptr; + } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); } -static void -core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb( - GObject* object, GAsyncResult* result, gpointer user_data) { - GTask* task = G_TASK(user_data); - g_task_return_pointer(task, result, g_object_unref); +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); } -void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, double* a_double, - GCancellable* cancellable, GAsyncReadyCallback callback, - gpointer user_data) { - g_autoptr(FlValue) args = fl_value_new_list(); - fl_value_append_take(args, a_double != nullptr ? fl_value_new_float(*a_double) - : fl_value_new_null()); - g_autofree gchar* channel_name = g_strdup_printf( - "dev.flutter.pigeon.pigeon_integration_tests.FlutterIntegrationCoreApi." - "echoNullableDouble%s", - self->suffix); - g_autoptr(CoreTestsPigeonTestMessageCodec) codec = - core_tests_pigeon_test_message_codec_new(); - FlBasicMessageChannel* channel = fl_basic_message_channel_new( - self->messenger, channel_name, FL_MESSAGE_CODEC(codec)); - GTask* task = g_task_new(self, cancellable, callback, user_data); - g_task_set_task_data(task, channel, g_object_unref); - fl_basic_message_channel_send( - channel, args, cancellable, - core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_cb, - task); +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); } -gboolean -core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - double** return_value, GError** error) { - g_autoptr(GTask) task = G_TASK(result); - GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); - FlBasicMessageChannel* channel = - FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); - g_autoptr(FlValue) response = - fl_basic_message_channel_send_finish(channel, r, error); - if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; - } - - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = static_cast(malloc(sizeof(double))); - **return_value = fl_value_get_float(rv); - } else { - *return_value = nullptr; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; } - - return TRUE; + return fl_value_get_string(self->return_value); } static void @@ -14144,10 +16350,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - gchar** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14155,21 +16361,140 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_new( + response); +} + +struct + _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = g_strdup(fl_value_get_string(rv)); +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +const uint8_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + self, + size_t* return_value_length) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + if (return_value_length != nullptr) { + *return_value_length = fl_value_get_length(self->return_value); + } + return fl_value_get_uint8_list(self->return_value); } static void @@ -14203,10 +16528,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_lis task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - uint8_t** return_value, size_t* return_value_length, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14214,25 +16539,135 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_fin g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_dispose; +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = static_cast( - memcpy(malloc(fl_value_get_length(rv)), fl_value_get_uint8_list(rv), - fl_value_get_length(rv))); - *return_value_length = fl_value_get_length(rv); +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; - *return_value_length = 0; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + return self->return_value; } static void @@ -14265,10 +16700,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - FlValue** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14276,21 +16711,130 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = fl_value_ref(rv); +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - return TRUE; +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + return self->return_value; } static void @@ -14323,32 +16867,150 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( task); } -gboolean -core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( - CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - FlValue** return_value, GError** error) { - g_autoptr(GTask) task = G_TASK(result); - GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); - FlBasicMessageChannel* channel = - FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); - g_autoptr(FlValue) response = - fl_basic_message_channel_send_finish(channel, r, error); - if (response == nullptr) { - return FALSE; - } +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, + GError** error) { + g_autoptr(GTask) task = G_TASK(result); + GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); + FlBasicMessageChannel* channel = + FL_BASIC_MESSAGE_CHANNEL(g_task_get_task_data(task)); + g_autoptr(FlValue) response = + fl_basic_message_channel_send_finish(channel, r, error); + if (response == nullptr) { + return nullptr; + } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; + CoreTestsPigeonTestAnEnum return_value_; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; - } - - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = fl_value_ref(rv); + self->error = fl_value_ref(response); } else { - *return_value = nullptr; + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + self)); + if (fl_value_get_type(self->return_value) == FL_VALUE_TYPE_NULL) { + return nullptr; + } + self->return_value_ = static_cast( + fl_value_get_int(reinterpret_cast(const_cast( + fl_value_get_custom_value(self->return_value))))); + return &self->return_value_; } static void @@ -14384,10 +17046,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - CoreTestsPigeonTestAnEnum** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14395,25 +17057,107 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse { + GObject parent_instance; + + FlValue* error; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse, + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self) {} + +static void +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); } + return self; +} - FlValue* rv = fl_value_get_list_value(response, 0); - if (fl_value_get_type(rv) != FL_VALUE_TYPE_NULL) { - *return_value = static_cast( - malloc(sizeof(CoreTestsPigeonTestAnEnum))); - **return_value = static_cast( - fl_value_get_int(reinterpret_cast( - const_cast(fl_value_get_custom_value(rv))))); - } else { - *return_value = nullptr; - } +gboolean +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); } static void core_tests_pigeon_test_flutter_integration_core_api_noop_async_cb( @@ -14442,7 +17186,8 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop_async( core_tests_pigeon_test_flutter_integration_core_api_noop_async_cb, task); } -gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, GError** error) { g_autoptr(GTask) task = G_TASK(result); @@ -14452,14 +17197,127 @@ gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { +} + +static void +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_class_init( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_dispose; +} + +static CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + g_object_new( + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + self)); + return fl_value_get_string(self->return_value); } static void @@ -14491,10 +17349,10 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( task); } -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* self, GAsyncResult* result, - gchar** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -14502,17 +17360,10 @@ core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } - - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = g_strdup(fl_value_get_string(rv)); - - return TRUE; + return core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_new( + response); } struct _CoreTestsPigeonTestHostTrivialApiNoopResponse { @@ -14987,6 +17838,121 @@ core_tests_pigeon_test_flutter_small_api_new(FlBinaryMessenger* messenger, return self; } +struct _CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse, + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_init( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) {} + +static void +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_class_init( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_dispose; +} + +static CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE(g_object_new( + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_type(), + nullptr)); + if (fl_value_get_length(response) > 1) { + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); + } + return self; +} + +gboolean +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_code( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_message( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} + +FlValue* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_details( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} + +CoreTestsPigeonTestTestMessage* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_return_value( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE( + self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + self)); + return CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( + fl_value_get_custom_value_object(self->return_value)); +} + static void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_cb( GObject* object, GAsyncResult* result, gpointer user_data) { GTask* task = G_TASK(user_data); @@ -15014,9 +17980,10 @@ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_cb, task); } -gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( +CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, - CoreTestsPigeonTestTestMessage** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -15024,19 +17991,115 @@ gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; + return nullptr; } + return core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_new( + response); +} + +struct _CoreTestsPigeonTestFlutterSmallApiEchoStringResponse { + GObject parent_instance; + + FlValue* error; + FlValue* return_value; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestFlutterSmallApiEchoStringResponse, + core_tests_pigeon_test_flutter_small_api_echo_string_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_flutter_small_api_echo_string_response_dispose( + GObject* object) { + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(object); + g_clear_pointer(&self->error, fl_value_unref); + g_clear_pointer(&self->return_value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_flutter_small_api_echo_string_response_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_flutter_small_api_echo_string_response_init( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) {} + +static void +core_tests_pigeon_test_flutter_small_api_echo_string_response_class_init( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponseClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_flutter_small_api_echo_string_response_dispose; +} + +static CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* +core_tests_pigeon_test_flutter_small_api_echo_string_response_new( + FlValue* response) { + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self = + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(g_object_new( + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_type(), + nullptr)); if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + self->error = fl_value_ref(response); + } else { + FlValue* value = fl_value_get_list_value(response, 0); + self->return_value = fl_value_ref(value); } + return self; +} + +gboolean core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(self), + FALSE); + return self->error != nullptr; +} + +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 0)); +} + +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + self)); + return fl_value_get_string(fl_value_get_list_value(self->error, 1)); +} - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( - g_object_ref(CORE_TESTS_PIGEON_TEST_TEST_MESSAGE( - fl_value_get_custom_value_object(rv)))); +FlValue* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_details( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(self), + nullptr); + g_assert( + core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + self)); + return fl_value_get_list_value(self->error, 2); +} - return TRUE; +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* self) { + g_return_val_if_fail( + CORE_TESTS_PIGEON_TEST_IS_FLUTTER_SMALL_API_ECHO_STRING_RESPONSE(self), + nullptr); + g_assert( + !core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + self)); + return fl_value_get_string(self->return_value); } static void core_tests_pigeon_test_flutter_small_api_echo_string_cb( @@ -15066,9 +18129,10 @@ void core_tests_pigeon_test_flutter_small_api_echo_string( core_tests_pigeon_test_flutter_small_api_echo_string_cb, task); } -gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( +CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* +core_tests_pigeon_test_flutter_small_api_echo_string_finish( CoreTestsPigeonTestFlutterSmallApi* self, GAsyncResult* result, - gchar** return_value, GError** error) { + GError** error) { g_autoptr(GTask) task = G_TASK(result); GAsyncResult* r = G_ASYNC_RESULT(g_task_propagate_pointer(task, nullptr)); FlBasicMessageChannel* channel = @@ -15076,15 +18140,8 @@ gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( g_autoptr(FlValue) response = fl_basic_message_channel_send_finish(channel, r, error); if (response == nullptr) { - return FALSE; - } - if (fl_value_get_length(response) > 1) { - // FIXME: Set error - return FALSE; + return nullptr; } - - FlValue* rv = fl_value_get_list_value(response, 0); - *return_value = g_strdup(fl_value_get_string(rv)); - - return TRUE; + return core_tests_pigeon_test_flutter_small_api_echo_string_response_new( + response); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index d0d0fa085ddf..abf60e0e00dc 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -2593,7 +2593,8 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #FlBasicMessageChannelResponseHandle. * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. + * @return_value_length: (allow-none): location to write length of @return_value + * or %NULL to ignore. * * Responds to HostIntegrationCoreApi.echoAsyncUint8List. */ @@ -3014,7 +3015,8 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #FlBasicMessageChannelResponseHandle. * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. + * @return_value_length: (allow-none): location to write length of @return_value + * or %NULL to ignore. * * Responds to HostIntegrationCoreApi.echoAsyncNullableUint8List. */ @@ -3492,7 +3494,8 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #FlBasicMessageChannelResponseHandle. * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. + * @return_value_length: (allow-none): location to write length of @return_value + * or %NULL to ignore. * * Responds to HostIntegrationCoreApi.callFlutterEchoUint8List. */ @@ -3718,7 +3721,8 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #FlBasicMessageChannelResponseHandle. * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. + * @return_value_length: (allow-none): location to write length of @return_value + * or %NULL to ignore. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableUint8List. */ @@ -3856,6 +3860,1860 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse, + core_tests_pigeon_test_flutter_integration_core_api_noop_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_NOOP_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.noop is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.throwError is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_THROW_ERROR_FROM_VOID_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.throwErrorFromVoid is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_TYPES_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoAllTypes is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +CoreTestsPigeonTestAllTypes* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoAllNullableTypes is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.sendMultipleNullableTypes + * is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +CoreTestsPigeonTestAllNullableTypes* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_ALL_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse. + * + * Checks if a response to + * FlutterIntegrationCoreApi.echoAllNullableTypesWithoutRecursion is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_SEND_MULTIPLE_NULLABLE_TYPES_WITHOUT_RECURSION_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse. + * + * Checks if a response to + * FlutterIntegrationCoreApi.sendMultipleNullableTypesWithoutRecursion is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +CoreTestsPigeonTestAllNullableTypesWithoutRecursion* +core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_BOOL_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoBool is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_INT_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoInt is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +int64_t +core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_DOUBLE_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoDouble is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +double +core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_STRING_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoString is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_UINT8_LIST_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoUint8List is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse. + * @return_value_length: (allow-none): location to write length of the return + * value or %NULL to ignore. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +const uint8_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* response, + size_t* return_value_length); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_LIST_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoList is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_MAP_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoMap is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_ECHO_ENUM_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoEnum is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +CoreTestsPigeonTestAnEnum +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_BOOL_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableBool is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +gboolean* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_INT_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableInt is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +int64_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_DOUBLE_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableDouble is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +double* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_STRING_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableString is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_UINT8_LIST_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableUint8List is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse. + * @return_value_length: (allow-none): location to write length of the return + * value or %NULL to ignore. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +const uint8_t* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* + response, + size_t* return_value_length); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_LIST_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableList is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_MAP_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableMap is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_NULLABLE_ENUM_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoNullableEnum is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse. + * + * Get the return value for this response. + * + * Returns: (allow-none): a return value or %NULL. + */ +CoreTestsPigeonTestAnEnum* +core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* + response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse, + core_tests_pigeon_test_flutter_integration_core_api_noop_async_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_INTEGRATION_CORE_API_NOOP_ASYNC_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.noopAsync is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse, + core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response, + CORE_TESTS_PIGEON_TEST, + FLUTTER_INTEGRATION_CORE_API_ECHO_ASYNC_STRING_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse. + * + * Checks if a response to FlutterIntegrationCoreApi.echoAsyncString is an + * error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_is_error( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_code: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_code( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_message: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_message( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_details: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_error_details( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* + response); + +/** + * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_return_value: + * @response: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +const gchar* +core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_response_get_return_value( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* + response); + /** * CoreTestsPigeonTestFlutterIntegrationCoreApi: * @@ -3906,9 +5764,11 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop( * * Completes a core_tests_pigeon_test_flutter_integration_core_api_noop() call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse or %NULL + * on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); @@ -3931,18 +5791,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error( * core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_throw_error() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse* +core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - FlValue** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void: @@ -3970,9 +5831,11 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse* core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); @@ -3997,19 +5860,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types() call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse + * or %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAllTypes** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types: @@ -4031,7 +5894,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4039,12 +5901,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types: @@ -4071,7 +5935,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4079,12 +5942,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse + * or %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse* core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypes** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion: @@ -4107,7 +5972,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4115,12 +5979,13 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse + * or %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error); /** @@ -4148,7 +6013,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4156,12 +6020,13 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse + * or %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAllNullableTypesWithoutRecursion** return_value, GError** error); /** @@ -4184,18 +6049,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_bool() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - gboolean* return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_int: @@ -4217,18 +6083,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_int( * core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_int() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - int64_t* return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_double: @@ -4250,18 +6117,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_double( * core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_double() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - double* return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_string: @@ -4283,18 +6151,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_string( * core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_string() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - gchar** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list: @@ -4317,20 +6186,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list() call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse + * or %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - uint8_t** return_value, size_t* return_value_length, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_list: @@ -4352,18 +6220,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_list( * core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_list() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - FlValue** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_map: @@ -4385,18 +6254,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_map( * core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_map() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - FlValue** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_enum: @@ -4418,18 +6288,19 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_integration_core_api_echo_enum() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse* +core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAnEnum* return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool: @@ -4451,7 +6322,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4459,12 +6329,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - gboolean** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int: @@ -4486,19 +6358,20 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int() call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse or %NULL + * on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - int64_t** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double: @@ -4520,7 +6393,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4528,12 +6400,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - double** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string: @@ -4555,7 +6429,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4563,12 +6436,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - gchar** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list: @@ -4591,8 +6466,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_lis * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. - * @return_value_length: location to write length of @return_value. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4600,12 +6473,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_lis * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - uint8_t** return_value, size_t* return_value_length, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list: @@ -4627,7 +6502,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4635,12 +6509,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - FlValue** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map: @@ -4662,19 +6538,20 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map() call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse or %NULL + * on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - FlValue** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum: @@ -4696,7 +6573,6 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * @@ -4704,12 +6580,14 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum() * call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse or + * %NULL on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - CoreTestsPigeonTestAnEnum** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_integration_core_api_noop_async: @@ -4737,9 +6615,11 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop_async( * Completes a core_tests_pigeon_test_flutter_integration_core_api_noop_async() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( +CoreTestsPigeonTestFlutterIntegrationCoreApiNoopAsyncResponse* +core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, GError** error); @@ -4763,19 +6643,20 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string() call. * - * Returns: %TRUE on success. + * Returns: a + * #CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse or %NULL + * on error. */ -gboolean +CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAsyncStringResponse* core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish( CoreTestsPigeonTestFlutterIntegrationCoreApi* api, GAsyncResult* result, - gchar** return_value, GError** error); + GError** error); G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApiNoopResponse, core_tests_pigeon_test_host_trivial_api_noop_response, @@ -4932,6 +6813,136 @@ void core_tests_pigeon_test_host_small_api_respond_error_void_void( FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse, + core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API_ECHO_WRAPPED_LIST_RESPONSE, + GObject) + +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse. + * + * Checks if a response to FlutterSmallApi.echoWrappedList is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_is_error( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_code( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_message( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_error_details( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +CoreTestsPigeonTestTestMessage* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_response_get_return_value( + CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* response); + +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse, + core_tests_pigeon_test_flutter_small_api_echo_string_response, + CORE_TESTS_PIGEON_TEST, FLUTTER_SMALL_API_ECHO_STRING_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse. + * + * Checks if a response to FlutterSmallApi.echoString is an error. + * + * Returns: a %TRUE if this response is an error. + */ +gboolean core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse. + * + * Get the error code for this response. + * + * Returns: an error code or %NULL if not an error. + */ +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse. + * + * Get the error message for this response. + * + * Returns: an error message. + */ +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_details: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse. + * + * Get the error details for this response. + * + * Returns: (allow-none): an error details or %NULL. + */ +FlValue* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_details( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* response); + +/** + * core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value: + * @response: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse. + * + * Get the return value for this response. + * + * Returns: a return value. + */ +const gchar* +core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value( + CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* response); + /** * CoreTestsPigeonTestFlutterSmallApi: * @@ -4974,18 +6985,19 @@ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_small_api_echo_wrapped_list() * call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse or + * %NULL on error. */ -gboolean core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( +CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse* +core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish( CoreTestsPigeonTestFlutterSmallApi* api, GAsyncResult* result, - CoreTestsPigeonTestTestMessage** return_value, GError** error); + GError** error); /** * core_tests_pigeon_test_flutter_small_api_echo_string: @@ -5006,17 +7018,18 @@ void core_tests_pigeon_test_flutter_small_api_echo_string( * core_tests_pigeon_test_flutter_small_api_echo_string_finish: * @api: a #className. * @result: a #GAsyncResult. - * @return_value: location to write the value returned by this method. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. * * Completes a core_tests_pigeon_test_flutter_small_api_echo_string() call. * - * Returns: %TRUE on success. + * Returns: a #CoreTestsPigeonTestFlutterSmallApiEchoStringResponse or %NULL on + * error. */ -gboolean core_tests_pigeon_test_flutter_small_api_echo_string_finish( +CoreTestsPigeonTestFlutterSmallApiEchoStringResponse* +core_tests_pigeon_test_flutter_small_api_echo_string_finish( CoreTestsPigeonTestFlutterSmallApi* api, GAsyncResult* result, - gchar** return_value, GError** error); + GError** error); G_END_DECLS diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 5ff30be86a73..55dc590911d1 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -211,7 +211,6 @@ static CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringRespon create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* nullable_string, gpointer user_data) { - // FIXME: Make new_full? g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = core_tests_pigeon_test_all_nullable_types_new( nullptr, nullptr, nullptr, nullptr, nullptr, 0, nullptr, 0, nullptr, @@ -524,11 +523,26 @@ static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_noop_finish( + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_noop_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_details( + response)); return; } @@ -550,18 +564,35 @@ static void throw_error_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_return_value( + response)); } static void call_flutter_throw_error( @@ -579,11 +610,28 @@ static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, g_autoptr(CallbackData) data = static_cast(user_data); g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiThrowErrorFromVoidResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_details( + response)); return; } @@ -605,18 +653,35 @@ static void echo_all_types_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(CoreTestsPigeonTestAllTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllTypesResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_return_value( + response)); } static void call_flutter_echo_all_types( @@ -634,18 +699,36 @@ static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_return_value( + response)); } static void call_flutter_echo_all_nullable_types( @@ -664,18 +747,36 @@ static void send_multiple_nullable_types_cb(GObject* object, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(CoreTestsPigeonTestAllNullableTypes) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_return_value( + response)); } static void call_flutter_send_multiple_nullable_types( @@ -695,19 +796,36 @@ static void echo_all_nullable_types_without_recursion_cb(GObject* object, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = - nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_return_value( + response)); } static void call_flutter_echo_all_nullable_types_without_recursion( @@ -726,19 +844,36 @@ static void send_multiple_nullable_types_without_recursion_cb( GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) return_value = - nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_return_value( + response)); } static void call_flutter_send_multiple_nullable_types_without_recursion( @@ -758,18 +893,35 @@ static void echo_bool_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - gboolean return_value; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoBoolResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_return_value( + response)); } static void call_flutter_echo_bool( @@ -786,18 +938,35 @@ static void echo_int_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - int64_t return_value; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoIntResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_return_value( + response)); } static void call_flutter_echo_int( @@ -814,18 +983,35 @@ static void echo_double_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - double return_value; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoDoubleResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_return_value( + response)); } static void call_flutter_echo_double( @@ -842,18 +1028,35 @@ static void echo_string_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoStringResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_return_value( + response)); } static void call_flutter_echo_string( @@ -870,17 +1073,35 @@ static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree uint8_t* return_value = nullptr; - size_t return_value_length; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoUint8ListResponse) response = + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish( CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &return_value_length, &error)) { + &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_details( + response)); return; } + size_t return_value_length; + const uint8_t* return_value = + core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_return_value( + response, &return_value_length); core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( data->self->host_core_api, data->response_handle, return_value, return_value_length); @@ -901,18 +1122,35 @@ static void echo_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoListResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_return_value( + response)); } static void call_flutter_echo_list( @@ -929,18 +1167,35 @@ static void echo_map_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoMapResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_return_value( + response)); } static void call_flutter_echo_map( @@ -957,18 +1212,35 @@ static void echo_enum_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - CoreTestsPigeonTestAnEnum return_value; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoEnumResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_return_value( + response)); } static void call_flutter_echo_enum( @@ -986,18 +1258,36 @@ static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree gboolean* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableBoolResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_return_value( + response)); } static void call_flutter_echo_nullable_bool( @@ -1014,18 +1304,35 @@ static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree int64_t* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableIntResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_return_value( + response)); } static void call_flutter_echo_nullable_int( @@ -1042,18 +1349,36 @@ static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree double* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableDoubleResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_return_value( + response)); } static void call_flutter_echo_nullable_double( @@ -1070,18 +1395,36 @@ static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableStringResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_return_value( + response)); } static void call_flutter_echo_nullable_string( @@ -1098,17 +1441,36 @@ static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree uint8_t* return_value = nullptr; - size_t return_value_length; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &return_value_length, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableUint8ListResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_details( + response)); return; } + size_t return_value_length; + const uint8_t* return_value = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_return_value( + response, &return_value_length); core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( data->self->host_core_api, data->response_handle, return_value, return_value_length); @@ -1129,18 +1491,36 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableListResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_return_value( + response)); } static void call_flutter_echo_nullable_list( @@ -1157,18 +1537,35 @@ static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autoptr(FlValue) return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableMapResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_return_value( + response)); } static void call_flutter_echo_nullable_map( @@ -1185,18 +1582,36 @@ static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree CoreTestsPigeonTestAnEnum* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), result, - &return_value, &error)) { + g_autoptr( + CoreTestsPigeonTestFlutterIntegrationCoreApiEchoNullableEnumResponse) + response = + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_INTEGRATION_CORE_API(object), + result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_code( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_message( + response), + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_return_value( + response)); } static void call_flutter_echo_nullable_enum( @@ -1214,18 +1629,33 @@ static void small_api_two_echo_string_cb(GObject* object, GAsyncResult* result, gpointer user_data) { g_autoptr(CallbackData) data = static_cast(user_data); - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_small_api_echo_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterSmallApiEchoStringResponse) response = + core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( + response), + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( + response), + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_details( + response)); return; } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, return_value); + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value( + response)); } static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, @@ -1233,19 +1663,34 @@ static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, g_autoptr(CallbackData) data = static_cast(user_data); TestPlugin* self = data->self; - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!core_tests_pigeon_test_flutter_small_api_echo_string_finish( - CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, - &return_value, &error)) { + g_autoptr(CoreTestsPigeonTestFlutterSmallApiEchoStringResponse) response = + core_tests_pigeon_test_flutter_small_api_echo_string_finish( + CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &error); + if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, "", "", nullptr); + data->self->host_core_api, data->response_handle, "Internal Error", + error->message, nullptr); + return; + } + if (core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( + response)) { + core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( + data->self->host_core_api, data->response_handle, + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( + response), + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( + response), + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_details( + response)); return; } core_tests_pigeon_test_flutter_small_api_echo_string( - self->flutter_small_api_two, return_value, self->cancellable, - small_api_two_echo_string_cb, g_steal_pointer(&data)); + self->flutter_small_api_two, + core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value( + response), + self->cancellable, small_api_two_echo_string_cb, g_steal_pointer(&data)); } static void call_flutter_small_api_echo_string( From 52c201b2e73f690a5d17ccc3ce12750e949edacd Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Jun 2024 12:08:21 +1200 Subject: [PATCH 107/127] Update example --- packages/pigeon/example/README.md | 14 +++++++++----- .../pigeon/example/app/linux/my_application.cc | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index a839d4998c14..7d1384f82bdd 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -328,16 +328,20 @@ void TestPlugin::CallFlutterMethod( ```c++ static void flutter_method_cb(GObject* object, GAsyncResult* result, gpointer user_data) { - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!pigeon_example_package_message_flutter_api_flutter_method_finish( - PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, - &return_value, &error)) { + g_autoptr( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse) response = + pigeon_example_package_message_flutter_api_flutter_method_finish( + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, &error); + if (response == nullptr) { g_warning("Failed to call Flutter method: %s", error->message); return; } - g_printerr("Got result from Flutter method: %s\n", return_value); + g_printerr( + "Got result from Flutter method: %s\n", + pigeon_example_package_message_flutter_api_flutter_method_response_get_return_value( + response)); } ``` diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index 773d46812c6c..2bc51f7337fc 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -69,16 +69,20 @@ static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { // #docregion flutter-method-callback static void flutter_method_cb(GObject* object, GAsyncResult* result, gpointer user_data) { - g_autofree gchar* return_value = nullptr; g_autoptr(GError) error = nullptr; - if (!pigeon_example_package_message_flutter_api_flutter_method_finish( - PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, - &return_value, &error)) { + g_autoptr( + PigeonExamplePackageMessageFlutterApiFlutterMethodResponse) response = + pigeon_example_package_message_flutter_api_flutter_method_finish( + PIGEON_EXAMPLE_PACKAGE_MESSAGE_FLUTTER_API(object), result, &error); + if (response == nullptr) { g_warning("Failed to call Flutter method: %s", error->message); return; } - g_printerr("Got result from Flutter method: %s\n", return_value); + g_printerr( + "Got result from Flutter method: %s\n", + pigeon_example_package_message_flutter_api_flutter_method_response_get_return_value( + response)); } // #enddocregion flutter-method-callback From 9ec2da4ccef61c127e512969be8bc0cfb2e3df9e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Jun 2024 12:43:37 +1200 Subject: [PATCH 108/127] Add real tests --- .../test_plugin/linux/CMakeLists.txt | 5 +- .../linux/test/non_null_fields_test.cc | 16 +++++ .../linux/test/null_fields_test.cc | 61 +++++++++++++++++++ .../linux/test/test_plugin_test.cc | 36 ----------- 4 files changed, 80 insertions(+), 38 deletions(-) create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc delete mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc diff --git a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt index f37b200815d0..8671c2cea080 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt +++ b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt @@ -94,8 +94,9 @@ FetchContent_MakeAvailable(googletest) # The plugin's exported API is not very useful for unit testing, so build the # sources directly into the test binary rather than using the shared library. add_executable(${TEST_RUNNER} - # TODO(stuartmorgan): Add real tests. - test/test_plugin_test.cc + # Tests. + test/non_null_fields_test.cc + test/null_fields_test.cc ${PLUGIN_SOURCES} ) apply_standard_settings(${TEST_RUNNER}) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc new file mode 100644 index 000000000000..ef5e63b70964 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc @@ -0,0 +1,16 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "pigeon/non_null_fields.gen.h" + +TEST(NonNullFields, Build) { + g_autoptr(NonNullFieldsPigeonTestNonNullFieldSearchRequest) request = + non_null_fields_pigeon_test_non_null_field_search_request_new("hello"); + + EXPECT_EQ(non_null_fields_pigeon_test_non_null_field_search_request_get_query( + request), + "hello"); +} diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc new file mode 100644 index 000000000000..3e6b97871cd6 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc @@ -0,0 +1,61 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "pigeon/null_fields.gen.h" + +TEST(NullFields, BuildWithValues) { + g_autoptr(NullFieldsPigeonTestNullFieldsSearchRequest) request = + null_fields_pigeon_test_null_fields_search_request_new("hello", 0); + + int64_t indicies_values[] = {1, 2, 3}; + g_autoptr(FlValue) indicies = fl_value_new_int64_list(indicies_values, 3); + NullFieldsPigeonTestNullFieldsSearchReplyType type = + PIGEON_INTEGRATION_TESTS_NULL_FIELDS_SEARCH_REPLY_TYPE_SUCCESS; + g_autoptr(NullFieldsPigeonTestNullFieldsSearchReply) reply = + null_fields_pigeon_test_null_fields_search_reply_new( + "result", "error", indicies, request, &type); + + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_result(reply), + "result"); + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_error(reply), + "error"); + EXPECT_EQ( + fl_value_get_length( + null_fields_pigeon_test_null_fields_search_reply_get_indices(reply)), + 3); + EXPECT_EQ( + null_fields_pigeon_test_null_fields_search_request_get_query( + null_fields_pigeon_test_null_fields_search_reply_get_request(reply)), + "hello"); + EXPECT_EQ(*null_fields_pigeon_test_null_fields_search_reply_get_type_(reply), + PIGEON_INTEGRATION_TESTS_NULL_FIELDS_SEARCH_REPLY_TYPE_SUCCESS); +} + +TEST(NullFields, BuildRequestWithNulls) { + g_autoptr(NullFieldsPigeonTestNullFieldsSearchRequest) request = + null_fields_pigeon_test_null_fields_search_request_new(nullptr, 0); + + EXPECT_EQ( + null_fields_pigeon_test_null_fields_search_request_get_query(request), + nullptr); +} + +TEST(NullFields, BuildReplyWithNulls) { + g_autoptr(NullFieldsPigeonTestNullFieldsSearchReply) reply = + null_fields_pigeon_test_null_fields_search_reply_new( + nullptr, nullptr, nullptr, nullptr, nullptr); + + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_result(reply), + nullptr); + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_error(reply), + nullptr); + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_indices(reply), + nullptr); + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_request(reply), + nullptr); + EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_type_(reply), + nullptr); +} diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc deleted file mode 100644 index 9f8e24b3b3ee..000000000000 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/test_plugin_test.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "include/test_plugin/test_plugin.h" - -#include -#include -#include - -#include "test_plugin_private.h" - -// This demonstrates a simple unit test of the C portion of this plugin's -// implementation. -// -// Once you have built the plugin's example app, you can run these tests -// from the command line. For instance, for a plugin called my_plugin -// built for x64 debug, run: -// $ build/linux/x64/debug/plugins/my_plugin/my_plugin_test - -namespace test_plugin { -namespace test { - -TEST(TestPlugin, GetPlatformVersion) { - g_autoptr(FlMethodResponse) response = get_platform_version(); - ASSERT_NE(response, nullptr); - ASSERT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response)); - FlValue* result = fl_method_success_response_get_result( - FL_METHOD_SUCCESS_RESPONSE(response)); - ASSERT_EQ(fl_value_get_type(result), FL_VALUE_TYPE_STRING); - // The full string varies, so just validate that it has the right format. - EXPECT_THAT(fl_value_get_string(result), testing::StartsWith("Linux ")); -} - -} // namespace test -} // namespace test_plugin From 32b464548786419cdeebb75fda4b21778f4889a4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Jun 2024 23:17:13 +1200 Subject: [PATCH 109/127] Add test that require a fake messenger --- .../test_plugin/linux/CMakeLists.txt | 5 + .../linux/test/multiple_arity_test.cc | 44 +++++ .../linux/test/nullable_returns_test.cc | 127 ++++++++++++ .../linux/test/utils/fake_host_messenger.cc | 180 ++++++++++++++++++ .../linux/test/utils/fake_host_messenger.h | 28 +++ .../test_plugin/linux/test_plugin.cc | 32 ---- 6 files changed, 384 insertions(+), 32 deletions(-) create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h diff --git a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt index 8671c2cea080..f533c60872ed 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt +++ b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt @@ -95,8 +95,13 @@ FetchContent_MakeAvailable(googletest) # sources directly into the test binary rather than using the shared library. add_executable(${TEST_RUNNER} # Tests. + test/multiple_arity_test.cc test/non_null_fields_test.cc + test/nullable_returns_test.cc test/null_fields_test.cc + # Test utilities. + test/utils/fake_host_messenger.cc + test/utils/fake_host_messenger.h ${PLUGIN_SOURCES} ) apply_standard_settings(${TEST_RUNNER}) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc new file mode 100644 index 000000000000..852fe866567e --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc @@ -0,0 +1,44 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "pigeon/multiple_arity.gen.h" +#include "test/utils/fake_host_messenger.h" + +static MultipleArityPigeonTestMultipleArityHostApiSubtractResponse* subtract( + MultipleArityPigeonTestMultipleArityHostApi* api, int64_t x, int64_t y, + gpointer user_data) { + return multiple_arity_pigeon_test_multiple_arity_host_api_subtract_response_new( + x - y); +} + +static MultipleArityPigeonTestMultipleArityHostApiVTable vtable = { + .subtract = subtract}; + +static void subtract_reply_cb(FlValue* reply, gpointer user_data) { + int64_t* result = reinterpret_cast(user_data); + *result = fl_value_get_int(fl_value_get_list_value(reply, 0)); +} + +TEST(MultipleArity, HostSimple) { + g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(MultipleArityPigeonTestMultipleArityHostApi) api = + multiple_arity_pigeon_test_multiple_arity_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + int64_t result = 0; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_int(30)); + fl_value_append_take(message, fl_value_new_int(10)); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.MultipleArityHostApi." + "subtract", + message, subtract_reply_cb, nullptr); + + EXPECT_EQ(result, 20); +} + +// TODO(stuartmorgan): Add a FlutterApi version of the test. diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc new file mode 100644 index 000000000000..8ccff21c2b62 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc @@ -0,0 +1,127 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "pigeon/nullable_returns.gen.h" +#include "test/utils/fake_host_messenger.h" + +static NullableReturnsPigeonTestNullableArgHostApiDoitResponse* arg_doit( + NullableReturnsPigeonTestNullableArgHostApi* api, int64_t* x, + gpointer user_data) { + return nullable_returns_pigeon_test_nullable_arg_host_api_doit_response_new( + x == nullptr ? 42 : *x); +} + +static NullableReturnsPigeonTestNullableArgHostApiVTable arg_vtable = { + .doit = arg_doit}; + +static void arg_doit_reply_cb(FlValue* reply, gpointer user_data) { + int64_t* result = reinterpret_cast(user_data); + *result = fl_value_get_int(fl_value_get_list_value(reply, 0)); +} + +TEST(NullableReturns, HostNullableArgNull) { + g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = + nullable_returns_pigeon_test_nullable_arg_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, + nullptr); + + int64_t result = 0; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_null()); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.NullableArgHostApi.doit", + message, arg_doit_reply_cb, &result); + + EXPECT_EQ(result, 42); +} + +TEST(NullableReturns, HostNullableArgNonNull) { + g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = + nullable_returns_pigeon_test_nullable_arg_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, + nullptr); + + int64_t result = 0; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_int(7)); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.NullableArgHostApi.doit", + message, arg_doit_reply_cb, &result); + + EXPECT_EQ(result, 7); +} + +static NullableReturnsPigeonTestNullableReturnHostApiDoitResponse* +return_null_doit(NullableReturnsPigeonTestNullableReturnHostApi* api, + gpointer user_data) { + return nullable_returns_pigeon_test_nullable_return_host_api_doit_response_new( + nullptr); +} + +static NullableReturnsPigeonTestNullableReturnHostApiVTable return_null_vtable = + {.doit = return_null_doit}; + +static NullableReturnsPigeonTestNullableReturnHostApiDoitResponse* +return_nonnull_doit(NullableReturnsPigeonTestNullableReturnHostApi* api, + gpointer user_data) { + int64_t return_value = 42; + return nullable_returns_pigeon_test_nullable_return_host_api_doit_response_new( + &return_value); +} + +static NullableReturnsPigeonTestNullableReturnHostApiVTable + return_nonnull_vtable = {.doit = return_nonnull_doit}; + +static void return_doit_reply_cb(FlValue* reply, gpointer user_data) { + int64_t* result = reinterpret_cast(user_data); + *result = fl_value_get_int(fl_value_get_list_value(reply, 0)); +} + +TEST(NullableReturns, HostNullableReturnNull) { + g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = + nullable_returns_pigeon_test_nullable_return_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &return_null_vtable, nullptr, + nullptr); + + // Initialize to a non-null value to ensure that it's actually set to null, + // rather than just never set. + int64_t result_ = 99; + int64_t* result = &result_; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_null()); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.NullableReturnHostApi.doit", + message, return_doit_reply_cb, &result); + + EXPECT_EQ(result, nullptr); +} + +TEST(NullableReturns, HostNullableReturnNonNull) { + g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = + nullable_returns_pigeon_test_nullable_return_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &return_nonnull_vtable, + nullptr, nullptr); + + int64_t* result = nullptr; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_null()); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.NullableReturnHostApi.doit", + message, return_doit_reply_cb, &result); + + EXPECT_NE(result, nullptr); + EXPECT_EQ(*result, 42); +} + +// TODO(stuartmorgan): Add FlutterApi versions of the tests. diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc new file mode 100644 index 000000000000..461154865a7c --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc @@ -0,0 +1,180 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "fake_host_messenger.h" + +struct _FakeHostMessenger { + GObject parent_instance; + + FlMessageCodec* codec; + GHashTable* message_handlers; +}; + +G_DECLARE_FINAL_TYPE(FakeHostMessengerResponseHandle, + fake_host_messenger_response_handle, FAKE, + HOST_MESSENGER_RESPONSE_HANDLE, + FlBinaryMessengerResponseHandle) + +struct _FakeHostMessengerResponseHandle { + FlBinaryMessengerResponseHandle parent_instance; + + FakeHostMessengerReplyHandler reply_callback; + gpointer user_data; +}; + +static void fake_host_messenger_response_handle_class_init( + FakeHostMessengerResponseHandleClass* klass) {} + +static void fake_host_messenger_response_handle_init( + FakeHostMessengerResponseHandle* self) {} + +G_DEFINE_TYPE(FakeHostMessengerResponseHandle, + fake_host_messenger_response_handle, + fl_binary_messenger_response_handle_get_type()) + +FakeHostMessengerResponseHandle* fake_host_messenger_response_handle_new( + FakeHostMessengerReplyHandler reply_callback, gpointer user_data) { + FakeHostMessengerResponseHandle* self = FAKE_HOST_MESSENGER_RESPONSE_HANDLE( + g_object_new(fake_host_messenger_response_handle_get_type(), nullptr)); + + self->reply_callback = reply_callback; + self->user_data = user_data; + + return self; +} + +typedef struct { + FlBinaryMessengerMessageHandler message_handler; + gpointer message_handler_data; + GDestroyNotify message_handler_destroy_notify; +} MessageHandler; + +static MessageHandler* message_handler_new( + FlBinaryMessengerMessageHandler handler, gpointer user_data, + GDestroyNotify destroy_notify) { + MessageHandler* self = + static_cast(g_malloc0(sizeof(MessageHandler))); + self->message_handler = handler; + self->message_handler_data = user_data; + self->message_handler_destroy_notify = destroy_notify; + return self; +} + +static void message_handler_free(gpointer data) { + MessageHandler* self = static_cast(data); + if (self->message_handler_destroy_notify) { + self->message_handler_destroy_notify(self->message_handler_data); + } + + g_free(self); +} + +static void fake_host_messenger_binary_messenger_iface_init( + FlBinaryMessengerInterface* iface); + +G_DEFINE_TYPE_WITH_CODE( + FakeHostMessenger, fake_host_messenger, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE(fl_binary_messenger_get_type(), + fake_host_messenger_binary_messenger_iface_init)) + +static void set_message_handler_on_channel( + FlBinaryMessenger* messenger, const gchar* channel, + FlBinaryMessengerMessageHandler handler, gpointer user_data, + GDestroyNotify destroy_notify) { + FakeHostMessenger* self = FAKE_HOST_MESSENGER(messenger); + g_hash_table_replace(self->message_handlers, g_strdup(channel), + message_handler_new(handler, user_data, destroy_notify)); +} + +static gboolean send_response(FlBinaryMessenger* messenger, + FlBinaryMessengerResponseHandle* response_handle, + GBytes* response, GError** error) { + FakeHostMessenger* self = FAKE_HOST_MESSENGER(messenger); + g_autoptr(FakeHostMessengerResponseHandle) r = + FAKE_HOST_MESSENGER_RESPONSE_HANDLE(response_handle); + g_autoptr(FlValue) reply = + fl_message_codec_decode_message(self->codec, response, error); + if (reply == nullptr) { + return FALSE; + } + + if (r->reply_callback != nullptr) { + r->reply_callback(reply, r->user_data); + } + + return TRUE; +} + +static void send_on_channel(FlBinaryMessenger* messenger, const gchar* channel, + GBytes* message, GCancellable* cancellable, + GAsyncReadyCallback callback, gpointer user_data) {} + +static GBytes* send_on_channel_finish(FlBinaryMessenger* messenger, + GAsyncResult* result, GError** error) { + return g_bytes_new(nullptr, 0); +} + +static void resize_channel(FlBinaryMessenger* messenger, const gchar* channel, + int64_t new_size) {} + +static void set_warns_on_channel_overflow(FlBinaryMessenger* messenger, + const gchar* channel, bool warns) {} + +static void fake_host_messenger_dispose(GObject* object) { + FakeHostMessenger* self = FAKE_HOST_MESSENGER(object); + + g_clear_pointer(&self->message_handlers, g_hash_table_unref); + g_clear_object(&self->codec); + + G_OBJECT_CLASS(fake_host_messenger_parent_class)->dispose(object); +} + +static void fake_host_messenger_class_init(FakeHostMessengerClass* klass) { + G_OBJECT_CLASS(klass)->dispose = fake_host_messenger_dispose; +} + +static void fake_host_messenger_binary_messenger_iface_init( + FlBinaryMessengerInterface* iface) { + iface->set_message_handler_on_channel = set_message_handler_on_channel; + iface->send_response = send_response; + iface->send_on_channel = send_on_channel; + iface->send_on_channel_finish = send_on_channel_finish; + iface->resize_channel = resize_channel; + iface->set_warns_on_channel_overflow = set_warns_on_channel_overflow; +} + +static void fake_host_messenger_init(FakeHostMessenger* self) { + self->codec = FL_MESSAGE_CODEC(fl_standard_message_codec_new()); + self->message_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, message_handler_free); +} + +FakeHostMessenger* fake_host_messenger_new() { + return FAKE_HOST_MESSENGER( + g_object_new(fake_host_messenger_get_type(), nullptr)); +} + +void fake_host_messenger_send_host_message( + FakeHostMessenger* self, const gchar* channel, FlValue* message, + FakeHostMessengerReplyHandler reply_callback, gpointer user_data) { + MessageHandler* handler = static_cast( + g_hash_table_lookup(self->message_handlers, channel)); + if (handler == nullptr) { + return; + } + + g_autoptr(GError) error = nullptr; + g_autoptr(GBytes) encoded_message = + fl_message_codec_encode_message(self->codec, message, &error); + if (encoded_message == nullptr) { + g_warning("Failed to encode message: %s", error->message); + return; + } + + FakeHostMessengerResponseHandle* response_handle = + fake_host_messenger_response_handle_new(reply_callback, user_data); + handler->message_handler(FL_BINARY_MESSENGER(self), channel, encoded_message, + FL_BINARY_MESSENGER_RESPONSE_HANDLE(response_handle), + handler->message_handler_data); +} diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h new file mode 100644 index 000000000000..18cf5a0b5b94 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h @@ -0,0 +1,28 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PLATFORM_TESTS_TEST_PLUGIN_LINUX_TEST_UTILS_FAKE_HOST_MESSENGER_H_ +#define PLATFORM_TESTS_TEST_PLUGIN_LINUX_TEST_UTILS_FAKE_HOST_MESSENGER_H_ + +#include + +typedef void (*FakeHostMessengerReplyHandler)(FlValue* reply, + gpointer user_data); + +// A BinaryMessenger that allows tests to act as the engine to call host APIs. +G_DECLARE_FINAL_TYPE(FakeHostMessenger, fake_host_messenger, FAKE, + HOST_MESSENGER, GObject) + +FakeHostMessenger* fake_host_messenger_new(); + +// Calls the registered handler for the given channel, and calls reply_handler +// with the response. +// +// This allows a test to simulate a message from the Dart side, exercising the +// encoding and decoding logic generated for a host API. +void fake_host_messenger_send_host_message( + FakeHostMessenger* messenger, const gchar* channel, FlValue* message, + FakeHostMessengerReplyHandler reply_callback, gpointer user_data); + +#endif // PLATFORM_TESTS_TEST_PLUGIN_LINUX_TEST_UTILS_FAKE_HOST_MESSENGER_H_ diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 55dc590911d1..a0f32fbbcf13 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1815,30 +1815,6 @@ static void void_void(CoreTestsPigeonTestHostSmallApi* api, static CoreTestsPigeonTestHostSmallApiVTable host_small_api_vtable = { .echo = echo, .void_void = void_void}; -// Called when a method call is received from Flutter. -static void test_plugin_handle_method_call(TestPlugin* self, - FlMethodCall* method_call) { - g_autoptr(FlMethodResponse) response = nullptr; - - const gchar* method = fl_method_call_get_name(method_call); - - if (strcmp(method, "getPlatformVersion") == 0) { - response = get_platform_version(); - } else { - response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new()); - } - - fl_method_call_respond(method_call, response, nullptr); -} - -FlMethodResponse* get_platform_version() { - struct utsname uname_data = {}; - uname(&uname_data); - g_autofree gchar* version = g_strdup_printf("Linux %s", uname_data.version); - g_autoptr(FlValue) result = fl_value_new_string(version); - return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); -} - static void test_plugin_dispose(GObject* object) { TestPlugin* self = TEST_PLUGIN(object); @@ -1886,12 +1862,6 @@ static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { return self; } -static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, - gpointer user_data) { - TestPlugin* plugin = TEST_PLUGIN(user_data); - test_plugin_handle_method_call(plugin, method_call); -} - void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { g_autoptr(TestPlugin) plugin = test_plugin_new(fl_plugin_registrar_get_messenger(registrar)); @@ -1900,6 +1870,4 @@ void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { g_autoptr(FlMethodChannel) channel = fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), "test_plugin", FL_METHOD_CODEC(codec)); - fl_method_channel_set_method_call_handler( - channel, method_call_cb, g_object_ref(plugin), g_object_unref); } From 5c3c82e7339aa4aa17992a53a949ca11553d8756 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Jun 2024 23:22:11 +1200 Subject: [PATCH 110/127] Fix str checks in tests --- .../test_plugin/linux/test/non_null_fields_test.cc | 7 ++++--- .../test_plugin/linux/test/null_fields_test.cc | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc index ef5e63b70964..93c3938149aa 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/non_null_fields_test.cc @@ -10,7 +10,8 @@ TEST(NonNullFields, Build) { g_autoptr(NonNullFieldsPigeonTestNonNullFieldSearchRequest) request = non_null_fields_pigeon_test_non_null_field_search_request_new("hello"); - EXPECT_EQ(non_null_fields_pigeon_test_non_null_field_search_request_get_query( - request), - "hello"); + EXPECT_STREQ( + non_null_fields_pigeon_test_non_null_field_search_request_get_query( + request), + "hello"); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc index 3e6b97871cd6..fc0410f312ea 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/null_fields_test.cc @@ -18,15 +18,17 @@ TEST(NullFields, BuildWithValues) { null_fields_pigeon_test_null_fields_search_reply_new( "result", "error", indicies, request, &type); - EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_result(reply), - "result"); - EXPECT_EQ(null_fields_pigeon_test_null_fields_search_reply_get_error(reply), - "error"); + EXPECT_STREQ( + null_fields_pigeon_test_null_fields_search_reply_get_result(reply), + "result"); + EXPECT_STREQ( + null_fields_pigeon_test_null_fields_search_reply_get_error(reply), + "error"); EXPECT_EQ( fl_value_get_length( null_fields_pigeon_test_null_fields_search_reply_get_indices(reply)), 3); - EXPECT_EQ( + EXPECT_STREQ( null_fields_pigeon_test_null_fields_search_request_get_query( null_fields_pigeon_test_null_fields_search_reply_get_request(reply)), "hello"); From eb185f7bc3f161bbf65dc82618d04564f091afc6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Jun 2024 23:36:58 +1200 Subject: [PATCH 111/127] Fix test for updated generated code --- .../pigeon/test/gobject_generator_test.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 0c6543660d39..2efeff8094c0 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -161,15 +161,15 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* self, TestPackageInput* some_input, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* api, TestPackageInput* some_input, gpointer user_data);')); expect( code, contains( - 'gboolean test_package_input_get_input_field(TestPackageInput* self);')); + 'gboolean test_package_input_get_input_field(TestPackageInput* api);')); expect( code, contains( - 'gboolean test_package_output_get_output_field(TestPackageOutput* self);')); + 'gboolean test_package_output_get_output_field(TestPackageOutput* api);')); } { final StringBuffer sink = StringBuffer(); @@ -531,27 +531,27 @@ void main() { expect( code, contains( - ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* api, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* api, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* api, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* api, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* api, gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* self, gpointer user_data);')); + ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* api, gpointer user_data);')); } }); @@ -653,7 +653,7 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* self, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* api, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); } { final StringBuffer sink = StringBuffer(); @@ -765,8 +765,8 @@ void main() { ); final String code = sink.toString(); for (final String comment in comments) { - expect(code, contains('//$comment')); + expect(code, contains(' *$comment')); } - expect(code, contains('// ///')); + expect(code, contains(' * ///')); }); } From 96c7537067c81272e6652261550261304bd47594 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 19 Jun 2024 09:38:35 +1200 Subject: [PATCH 112/127] Add primitive test --- .../test_plugin/linux/CMakeLists.txt | 1 + .../linux/test/multiple_arity_test.cc | 4 +- .../linux/test/nullable_returns_test.cc | 16 +- .../test_plugin/linux/test/primitive_test.cc | 231 ++++++++++++++++++ .../linux/test/utils/fake_host_messenger.cc | 9 +- .../linux/test/utils/fake_host_messenger.h | 2 +- 6 files changed, 254 insertions(+), 9 deletions(-) create mode 100644 packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc diff --git a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt index f533c60872ed..3d2845f8d3e4 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt +++ b/packages/pigeon/platform_tests/test_plugin/linux/CMakeLists.txt @@ -99,6 +99,7 @@ add_executable(${TEST_RUNNER} test/non_null_fields_test.cc test/nullable_returns_test.cc test/null_fields_test.cc + test/primitive_test.cc # Test utilities. test/utils/fake_host_messenger.cc test/utils/fake_host_messenger.h diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc index 852fe866567e..b8a7467d6999 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc @@ -23,7 +23,9 @@ static void subtract_reply_cb(FlValue* reply, gpointer user_data) { } TEST(MultipleArity, HostSimple) { - g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); g_autoptr(MultipleArityPigeonTestMultipleArityHostApi) api = multiple_arity_pigeon_test_multiple_arity_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc index 8ccff21c2b62..a1aef9dc2bb8 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc @@ -23,7 +23,9 @@ static void arg_doit_reply_cb(FlValue* reply, gpointer user_data) { } TEST(NullableReturns, HostNullableArgNull) { - g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = nullable_returns_pigeon_test_nullable_arg_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, @@ -41,7 +43,9 @@ TEST(NullableReturns, HostNullableArgNull) { } TEST(NullableReturns, HostNullableArgNonNull) { - g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = nullable_returns_pigeon_test_nullable_arg_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, @@ -85,7 +89,9 @@ static void return_doit_reply_cb(FlValue* reply, gpointer user_data) { } TEST(NullableReturns, HostNullableReturnNull) { - g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = nullable_returns_pigeon_test_nullable_return_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &return_null_vtable, nullptr, @@ -106,7 +112,9 @@ TEST(NullableReturns, HostNullableReturnNull) { } TEST(NullableReturns, HostNullableReturnNonNull) { - g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(); + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = nullable_returns_pigeon_test_nullable_return_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &return_nonnull_vtable, diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc new file mode 100644 index 000000000000..1906b1bbd65d --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc @@ -0,0 +1,231 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "pigeon/primitive.gen.h" +#include "test/utils/fake_host_messenger.h" + +static PrimitivePigeonTestPrimitiveHostApiAnIntResponse* an_int( + PrimitivePigeonTestPrimitiveHostApi* api, int64_t value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_an_int_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiABoolResponse* a_bool( + PrimitivePigeonTestPrimitiveHostApi* api, gboolean value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_bool_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiAStringResponse* a_string( + PrimitivePigeonTestPrimitiveHostApi* api, const gchar* value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_string_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiADoubleResponse* a_double( + PrimitivePigeonTestPrimitiveHostApi* api, double value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_double_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiAMapResponse* a_map( + PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_map_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiAListResponse* a_list( + PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_list_response_new(value); +} + +static PrimitivePigeonTestPrimitiveHostApiAnInt32ListResponse* an_int32_list( + PrimitivePigeonTestPrimitiveHostApi* api, const int32_t* value, + size_t value_length, gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_an_int32_list_response_new( + value, value_length); +} + +static PrimitivePigeonTestPrimitiveHostApiABoolListResponse* a_bool_list( + PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_bool_list_response_new( + value); +} + +static PrimitivePigeonTestPrimitiveHostApiAStringIntMapResponse* +a_string_int_map(PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, + gpointer user_data) { + return primitive_pigeon_test_primitive_host_api_a_string_int_map_response_new( + value); +} + +static PrimitivePigeonTestPrimitiveHostApiVTable vtable = { + .an_int = an_int, + .a_bool = a_bool, + .a_string = a_string, + .a_double = a_double, + .a_map = a_map, + .a_list = a_list, + .an_int32_list = an_int32_list, + .a_bool_list = a_bool_list, + .a_string_int_map = a_string_int_map}; + +static void an_int_reply_cb(FlValue* reply, gpointer user_data) { + int64_t* result = reinterpret_cast(user_data); + *result = fl_value_get_int(fl_value_get_list_value(reply, 0)); +} + +TEST(Primitive, HostInt) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + int64_t result = 0; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_int(7)); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.anInt", + message, an_int_reply_cb, &result); + + EXPECT_EQ(result, 7); +} + +static void a_bool_reply_cb(FlValue* reply, gpointer user_data) { + gboolean* result = reinterpret_cast(user_data); + *result = fl_value_get_bool(fl_value_get_list_value(reply, 0)); +} + +TEST(Primitive, HostBool) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + bool result = false; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_bool(TRUE)); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.aBool", + message, a_bool_reply_cb, &result); + + EXPECT_EQ(result, true); +} + +static void a_double_reply_cb(FlValue* reply, gpointer user_data) { + double* result = reinterpret_cast(user_data); + *result = fl_value_get_float(fl_value_get_list_value(reply, 0)); +} + +TEST(Primitive, HostDouble) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + double result = 0.0; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_float(3.0)); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.aDouble", + message, a_double_reply_cb, &result); + + EXPECT_EQ(result, 3.0); +} + +static void a_string_reply_cb(FlValue* reply, gpointer user_data) { + gchar** result = reinterpret_cast(user_data); + *result = g_strdup(fl_value_get_string(fl_value_get_list_value(reply, 0))); +} + +TEST(Primitive, HostString) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + g_autofree gchar* result = nullptr; + g_autoptr(FlValue) message = fl_value_new_list(); + fl_value_append_take(message, fl_value_new_string("hello")); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.aString", + message, a_string_reply_cb, &result); + + EXPECT_STREQ(result, "hello"); +} + +static void a_list_reply_cb(FlValue* reply, gpointer user_data) { + FlValue** result = reinterpret_cast(user_data); + *result = fl_value_ref(fl_value_get_list_value(reply, 0)); +} + +TEST(Primitive, HostList) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + g_autoptr(FlValue) result = nullptr; + g_autoptr(FlValue) message = fl_value_new_list(); + g_autoptr(FlValue) list = fl_value_new_list(); + fl_value_append_take(list, fl_value_new_int(1)); + fl_value_append_take(list, fl_value_new_int(2)); + fl_value_append_take(list, fl_value_new_int(3)); + fl_value_append(message, list); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.aList", + message, a_list_reply_cb, &result); + + EXPECT_EQ(fl_value_get_length(result), 3); + EXPECT_EQ(fl_value_get_int(fl_value_get_list_value(result, 2)), 3); +} + +static void a_map_reply_cb(FlValue* reply, gpointer user_data) { + FlValue** result = reinterpret_cast(user_data); + *result = fl_value_ref(fl_value_get_list_value(reply, 0)); +} + +TEST(Primitive, HostMap) { + g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); + g_autoptr(FakeHostMessenger) messenger = + fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); + g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = + primitive_pigeon_test_primitive_host_api_new( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + + g_autoptr(FlValue) result = nullptr; + g_autoptr(FlValue) message = fl_value_new_list(); + g_autoptr(FlValue) map = fl_value_new_map(); + fl_value_set_string_take(map, "foo", fl_value_new_string("bar")); + fl_value_append(message, map); + fake_host_messenger_send_host_message( + messenger, + "dev.flutter.pigeon.pigeon_integration_tests.PrimitiveHostApi.aMap", + message, a_map_reply_cb, &result); + + EXPECT_EQ(fl_value_get_length(result), 1); + EXPECT_STREQ(fl_value_get_string(fl_value_lookup_string(result, "foo")), + "bar"); +} + +// TODO(stuartmorgan): Add FlutterApi versions of the tests. diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc index 461154865a7c..b78301cec7f0 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.cc @@ -145,14 +145,17 @@ static void fake_host_messenger_binary_messenger_iface_init( } static void fake_host_messenger_init(FakeHostMessenger* self) { - self->codec = FL_MESSAGE_CODEC(fl_standard_message_codec_new()); self->message_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, message_handler_free); } -FakeHostMessenger* fake_host_messenger_new() { - return FAKE_HOST_MESSENGER( +FakeHostMessenger* fake_host_messenger_new(FlMessageCodec* codec) { + FakeHostMessenger* self = FAKE_HOST_MESSENGER( g_object_new(fake_host_messenger_get_type(), nullptr)); + + self->codec = FL_MESSAGE_CODEC(g_object_ref(codec)); + + return self; } void fake_host_messenger_send_host_message( diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h index 18cf5a0b5b94..d8f1952781ac 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/utils/fake_host_messenger.h @@ -14,7 +14,7 @@ typedef void (*FakeHostMessengerReplyHandler)(FlValue* reply, G_DECLARE_FINAL_TYPE(FakeHostMessenger, fake_host_messenger, FAKE, HOST_MESSENGER, GObject) -FakeHostMessenger* fake_host_messenger_new(); +FakeHostMessenger* fake_host_messenger_new(FlMessageCodec* codec); // Calls the registered handler for the given channel, and calls reply_handler // with the response. From 6ee9fd3550937cf581366065f1e3b825ba5cdb51 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 19 Jun 2024 09:39:00 +1200 Subject: [PATCH 113/127] Fix generated code test --- packages/pigeon/test/gobject_generator_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 2efeff8094c0..4babb19d9464 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -165,11 +165,11 @@ void main() { expect( code, contains( - 'gboolean test_package_input_get_input_field(TestPackageInput* api);')); + 'gboolean test_package_input_get_input_field(TestPackageInput* object);')); expect( code, contains( - 'gboolean test_package_output_get_output_field(TestPackageOutput* api);')); + 'gboolean test_package_output_get_output_field(TestPackageOutput* object);')); } { final StringBuffer sink = StringBuffer(); From 55e2f205bcf42b4bd34dfa71c32e75a09d55af90 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 19 Jun 2024 09:44:56 +1200 Subject: [PATCH 114/127] unused variables --- .../test_plugin/linux/test/multiple_arity_test.cc | 1 + .../test_plugin/linux/test/nullable_returns_test.cc | 4 ++++ .../platform_tests/test_plugin/linux/test/primitive_test.cc | 6 ++++++ .../pigeon/platform_tests/test_plugin/linux/test_plugin.cc | 2 ++ 4 files changed, 13 insertions(+) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc index b8a7467d6999..962191dd6711 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc @@ -29,6 +29,7 @@ TEST(MultipleArity, HostSimple) { g_autoptr(MultipleArityPigeonTestMultipleArityHostApi) api = multiple_arity_pigeon_test_multiple_arity_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc index a1aef9dc2bb8..8f5adb506a9a 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc @@ -30,6 +30,7 @@ TEST(NullableReturns, HostNullableArgNull) { nullable_returns_pigeon_test_nullable_arg_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, nullptr); + (void)api; // unused variable int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -50,6 +51,7 @@ TEST(NullableReturns, HostNullableArgNonNull) { nullable_returns_pigeon_test_nullable_arg_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, nullptr); + (void)api; // unused variable int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -96,6 +98,7 @@ TEST(NullableReturns, HostNullableReturnNull) { nullable_returns_pigeon_test_nullable_return_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &return_null_vtable, nullptr, nullptr); + (void)api; // unused variable // Initialize to a non-null value to ensure that it's actually set to null, // rather than just never set. @@ -119,6 +122,7 @@ TEST(NullableReturns, HostNullableReturnNonNull) { nullable_returns_pigeon_test_nullable_return_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &return_nonnull_vtable, nullptr, nullptr); + (void)api; // unused variable int64_t* result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc index 1906b1bbd65d..ef935656fb29 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc @@ -87,6 +87,7 @@ TEST(Primitive, HostInt) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -111,6 +112,7 @@ TEST(Primitive, HostBool) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable bool result = false; g_autoptr(FlValue) message = fl_value_new_list(); @@ -135,6 +137,7 @@ TEST(Primitive, HostDouble) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable double result = 0.0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -159,6 +162,7 @@ TEST(Primitive, HostString) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable g_autofree gchar* result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); @@ -183,6 +187,7 @@ TEST(Primitive, HostList) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable g_autoptr(FlValue) result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); @@ -212,6 +217,7 @@ TEST(Primitive, HostMap) { g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = primitive_pigeon_test_primitive_host_api_new( FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); + (void)api; // unused variable g_autoptr(FlValue) result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index a0f32fbbcf13..7f1f0991d480 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -1865,9 +1865,11 @@ static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { void test_plugin_register_with_registrar(FlPluginRegistrar* registrar) { g_autoptr(TestPlugin) plugin = test_plugin_new(fl_plugin_registrar_get_messenger(registrar)); + (void)plugin; // unused variable g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); g_autoptr(FlMethodChannel) channel = fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar), "test_plugin", FL_METHOD_CODEC(codec)); + (void)channel; // unused variable } From e91154e032060b69b0885ca4f2be54d6d4a0110b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 19 Jun 2024 11:35:39 +1200 Subject: [PATCH 115/127] Set changelog version --- packages/pigeon/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 166f48d2d77e..11e62c4167c7 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,4 +1,4 @@ -## NEXT +## 20.1.0 * [swift] Fully-qualifies types in Equatable extension test. * Adds GObject (Linux) support. From 1316e96294ba7ed13a3c684dc1627349fe375f7c Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Mon, 24 Jun 2024 14:29:13 -0400 Subject: [PATCH 116/127] Try running unit tests under xvfb --- packages/pigeon/tool/shared/test_suites.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/pigeon/tool/shared/test_suites.dart b/packages/pigeon/tool/shared/test_suites.dart index d113eee5d349..aa3588cd2931 100644 --- a/packages/pigeon/tool/shared/test_suites.dart +++ b/packages/pigeon/tool/shared/test_suites.dart @@ -370,10 +370,15 @@ Future _runLinuxUnitTests({bool ciMode = false}) async { 'debug/plugins/test_plugin/test_plugin_test'; const String arm64Path = '$buildDirBase/arm64/$buildRelativeBinaryPath'; const String x64Path = '$buildDirBase/x64/$buildRelativeBinaryPath'; - if (File(arm64Path).existsSync()) { - return runProcess(arm64Path, []); + final testBinary = File(arm64Path).existsSync() ? arm64Path : x64Path; + if (ciMode) { + // To avoid having all custom tests in the repo run under xvfb, xvfb-run is + // done here rather than at the CI config level. Ideally, Pigeon tests + // should be incorporated into the repo tooling's standard runs, at which + // point this won't be necessary. + return runProcess('xvfb-run', [testBinary]); } else { - return runProcess(x64Path, []); + return runProcess(testBinary, []); } } From 67b80a25b0736f2d5db3c14c15273511861be973 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 25 Jun 2024 13:11:45 +1200 Subject: [PATCH 117/127] Fix test crashes --- .../test_plugin/linux/test/multiple_arity_test.cc | 2 +- .../test_plugin/linux/test/nullable_returns_test.cc | 12 +++++++++--- .../test_plugin/linux/test/primitive_test.cc | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc index 962191dd6711..8623c128326e 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc @@ -39,7 +39,7 @@ TEST(MultipleArity, HostSimple) { messenger, "dev.flutter.pigeon.pigeon_integration_tests.MultipleArityHostApi." "subtract", - message, subtract_reply_cb, nullptr); + message, subtract_reply_cb, &result); EXPECT_EQ(result, 20); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc index 8f5adb506a9a..d4ef36521237 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc @@ -86,8 +86,14 @@ static NullableReturnsPigeonTestNullableReturnHostApiVTable return_nonnull_vtable = {.doit = return_nonnull_doit}; static void return_doit_reply_cb(FlValue* reply, gpointer user_data) { - int64_t* result = reinterpret_cast(user_data); - *result = fl_value_get_int(fl_value_get_list_value(reply, 0)); + int64_t** result = reinterpret_cast(user_data); + FlValue* value = fl_value_get_list_value(reply, 0); + if (fl_value_get_type(value) == FL_VALUE_TYPE_NULL) { + *result = nullptr; + } else { + *result = reinterpret_cast(malloc(sizeof(int64_t))); + **result = fl_value_get_int(value); + } } TEST(NullableReturns, HostNullableReturnNull) { @@ -124,7 +130,7 @@ TEST(NullableReturns, HostNullableReturnNonNull) { nullptr, nullptr); (void)api; // unused variable - int64_t* result = nullptr; + g_autofree int64_t* result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); fl_value_append_take(message, fl_value_new_null()); fake_host_messenger_send_host_message( diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc index ef935656fb29..8bcb3b82aa82 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc @@ -114,7 +114,7 @@ TEST(Primitive, HostBool) { FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); (void)api; // unused variable - bool result = false; + gboolean result = false; g_autoptr(FlValue) message = fl_value_new_list(); fl_value_append_take(message, fl_value_new_bool(TRUE)); fake_host_messenger_send_host_message( From 2570cde000c0fdb5ca3c3ee837061d8a12638a45 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 25 Jun 2024 13:28:09 +1200 Subject: [PATCH 118/127] Fix analyze --- packages/pigeon/tool/shared/test_suites.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/tool/shared/test_suites.dart b/packages/pigeon/tool/shared/test_suites.dart index aa3588cd2931..c37c388d03f7 100644 --- a/packages/pigeon/tool/shared/test_suites.dart +++ b/packages/pigeon/tool/shared/test_suites.dart @@ -370,7 +370,7 @@ Future _runLinuxUnitTests({bool ciMode = false}) async { 'debug/plugins/test_plugin/test_plugin_test'; const String arm64Path = '$buildDirBase/arm64/$buildRelativeBinaryPath'; const String x64Path = '$buildDirBase/x64/$buildRelativeBinaryPath'; - final testBinary = File(arm64Path).existsSync() ? arm64Path : x64Path; + final String testBinary = File(arm64Path).existsSync() ? arm64Path : x64Path; if (ciMode) { // To avoid having all custom tests in the repo run under xvfb, xvfb-run is // done here rather than at the CI config level. Ideally, Pigeon tests From 96fa38f4a956ff23db7387a246b2b265569c4256 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 27 Jun 2024 10:30:16 +1200 Subject: [PATCH 119/127] Fix mocked data --- .../pigeon/test/gobject_generator_test.dart | 242 +++++++++--------- 1 file changed, 124 insertions(+), 118 deletions(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 4babb19d9464..8201d9459f71 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -9,15 +9,24 @@ import 'package:test/test.dart'; const String DEFAULT_PACKAGE_NAME = 'test_package'; -final Class emptyClass = Class(name: 'className', fields: [ - NamedType( - name: 'namedTypeName', - type: const TypeDeclaration(baseName: 'baseName', isNullable: false), - ) -]); - void main() { test('gen one api', () { + final Class inputClass = Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'input') + ]); + final Class outputClass = Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'output') + ]); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -27,7 +36,7 @@ void main() { type: TypeDeclaration( baseName: 'Input', isNullable: false, - associatedClass: emptyClass, + associatedClass: inputClass, ), name: 'input') ], @@ -35,27 +44,13 @@ void main() { returnType: TypeDeclaration( baseName: 'Output', isNullable: false, - associatedClass: emptyClass, + associatedClass: outputClass, ), ) ]) ], classes: [ - Class(name: 'Input', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'String', - isNullable: true, - ), - name: 'input') - ]), - Class(name: 'Output', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'String', - isNullable: true, - ), - name: 'output') - ]) + inputClass, + outputClass ], enums: []); { final StringBuffer sink = StringBuffer(); @@ -108,6 +103,22 @@ void main() { }); test('naming follows style', () { + final Class inputClass = Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'inputField') + ]); + final Class outputClass = Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'outputField') + ]); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -117,7 +128,7 @@ void main() { type: TypeDeclaration( baseName: 'Input', isNullable: false, - associatedClass: emptyClass, + associatedClass: inputClass, ), name: 'someInput') ], @@ -125,27 +136,13 @@ void main() { returnType: TypeDeclaration( baseName: 'Output', isNullable: false, - associatedClass: emptyClass, + associatedClass: outputClass, ), ) ]) ], classes: [ - Class(name: 'Input', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'inputField') - ]), - Class(name: 'Output', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'outputField') - ]) + inputClass, + outputClass ], enums: []); { final StringBuffer sink = StringBuffer(); @@ -194,6 +191,22 @@ void main() { }); test('Spaces before {', () { + final Class inputClass = Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'input') + ]); + final Class outputClass = Class(name: 'Output', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: true, + ), + name: 'output') + ]); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -204,34 +217,20 @@ void main() { type: TypeDeclaration( baseName: 'Input', isNullable: false, - associatedClass: emptyClass, + associatedClass: inputClass, ), name: 'input') ], returnType: TypeDeclaration( baseName: 'Output', isNullable: false, - associatedClass: emptyClass, + associatedClass: outputClass, ), ) ]) ], classes: [ - Class(name: 'Input', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'String', - isNullable: true, - ), - name: 'input') - ]), - Class(name: 'Output', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'String', - isNullable: true, - ), - name: 'output') - ]) + inputClass, + outputClass ], enums: []); { final StringBuffer sink = StringBuffer(); @@ -330,6 +329,41 @@ void main() { }); test('data classes handle non-nullable fields', () { + final Class nestedClass = Class(name: 'Nested', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'nestedValue'), + ]); + final Class inputClass = Class(name: 'Input', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'nonNullableBool'), + NamedType( + type: const TypeDeclaration( + baseName: 'int', + isNullable: false, + ), + name: 'nonNullableInt'), + NamedType( + type: const TypeDeclaration( + baseName: 'String', + isNullable: false, + ), + name: 'nonNullableString'), + NamedType( + type: TypeDeclaration( + baseName: 'Nested', + isNullable: false, + associatedClass: nestedClass, + ), + name: 'nonNullableNested'), + ]); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -340,7 +374,7 @@ void main() { type: TypeDeclaration( baseName: 'Input', isNullable: false, - associatedClass: emptyClass, + associatedClass: inputClass, ), name: 'someInput') ], @@ -348,41 +382,8 @@ void main() { ) ]) ], classes: [ - Class(name: 'Nested', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'nestedValue'), - ]), - Class(name: 'Input', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'nonNullableBool'), - NamedType( - type: const TypeDeclaration( - baseName: 'int', - isNullable: false, - ), - name: 'nonNullableInt'), - NamedType( - type: const TypeDeclaration( - baseName: 'String', - isNullable: false, - ), - name: 'nonNullableString'), - NamedType( - type: TypeDeclaration( - baseName: 'Nested', - isNullable: false, - associatedClass: emptyClass, - ), - name: 'nonNullableNested'), - ]), + nestedClass, + inputClass ], enums: []); { final StringBuffer sink = StringBuffer(); @@ -429,6 +430,14 @@ void main() { }); test('host non-nullable return types map correctly', () { + final Class returnDataClass = Class(name: 'ReturnData', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'aValue'), + ]); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -499,19 +508,12 @@ void main() { returnType: TypeDeclaration( baseName: 'ReturnData', isNullable: false, - associatedClass: emptyClass, + associatedClass: returnDataClass, ), ), ]) ], classes: [ - Class(name: 'ReturnData', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'aValue'), - ]), + returnDataClass ], enums: []); { final StringBuffer sink = StringBuffer(); @@ -556,6 +558,16 @@ void main() { }); test('host non-nullable arguments map correctly', () { + final Class parameterObjectClass = + Class(name: 'ParameterObject', fields: [ + NamedType( + type: const TypeDeclaration( + baseName: 'bool', + isNullable: false, + ), + name: 'aValue'), + ]); + final Class objectClass = Class(name: 'Object', fields: []); final Root root = Root(apis: [ AstHostApi(name: 'Api', methods: [ Method( @@ -588,7 +600,7 @@ void main() { TypeDeclaration( baseName: 'Object', isNullable: true, - associatedClass: emptyClass, + associatedClass: objectClass, ) ], isNullable: false, @@ -602,7 +614,7 @@ void main() { TypeDeclaration( baseName: 'Object', isNullable: true, - associatedClass: emptyClass, + associatedClass: objectClass, ), ], isNullable: false, @@ -612,28 +624,22 @@ void main() { type: TypeDeclaration( baseName: 'ParameterObject', isNullable: false, - associatedClass: emptyClass, + associatedClass: parameterObjectClass, )), Parameter( name: 'aGenericObject', type: TypeDeclaration( baseName: 'Object', isNullable: false, - associatedClass: emptyClass, + associatedClass: objectClass, )), ], returnType: const TypeDeclaration.voidDeclaration(), ), ]) ], classes: [ - Class(name: 'ParameterObject', fields: [ - NamedType( - type: const TypeDeclaration( - baseName: 'bool', - isNullable: false, - ), - name: 'aValue'), - ]), + parameterObjectClass, + objectClass ], enums: []); { final StringBuffer sink = StringBuffer(); From ce3829d7923522e6844391cc133b876534978b2a Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 2 Jul 2024 12:54:36 +1200 Subject: [PATCH 120/127] Stop the Api object from holding a strong reference to the channels. --- packages/pigeon/example/README.md | 2 +- .../pigeon/example/app/linux/messages.g.cc | 118 +- .../pigeon/example/app/linux/messages.g.h | 24 +- .../example/app/linux/my_application.cc | 3 +- packages/pigeon/lib/gobject_generator.dart | 95 +- .../linux/pigeon/core_tests.gen.cc | 2611 +++++++++-------- .../test_plugin/linux/pigeon/core_tests.gen.h | 725 ++--- .../test_plugin/linux/test_plugin.cc | 181 +- 8 files changed, 2036 insertions(+), 1723 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 7d1384f82bdd..749dfa40466e 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -219,7 +219,7 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( static void handle_send_message( PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gpointer user_data) { PigeonExamplePackageCode code = pigeon_example_package_message_data_get_code(message); if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index ec7d8f41cb27..cb5700a61672 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -241,6 +241,51 @@ pigeon_example_package_message_codec_new() { return self; } +struct _PigeonExamplePackageExampleHostApiResponseHandle { + GObject parent_instance; + + FlBasicMessageChannel* channel; + FlBasicMessageChannelResponseHandle* response_handle; +}; + +G_DEFINE_TYPE(PigeonExamplePackageExampleHostApiResponseHandle, + pigeon_example_package_example_host_api_response_handle, + G_TYPE_OBJECT) + +static void pigeon_example_package_example_host_api_response_handle_dispose( + GObject* object) { + PigeonExamplePackageExampleHostApiResponseHandle* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_RESPONSE_HANDLE(object); + g_clear_object(&self->channel); + g_clear_object(&self->response_handle); + G_OBJECT_CLASS( + pigeon_example_package_example_host_api_response_handle_parent_class) + ->dispose(object); +} + +static void pigeon_example_package_example_host_api_response_handle_init( + PigeonExamplePackageExampleHostApiResponseHandle* self) {} + +static void pigeon_example_package_example_host_api_response_handle_class_init( + PigeonExamplePackageExampleHostApiResponseHandleClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_example_host_api_response_handle_dispose; +} + +static PigeonExamplePackageExampleHostApiResponseHandle* +pigeon_example_package_example_host_api_response_handle_new( + FlBasicMessageChannel* channel, + FlBasicMessageChannelResponseHandle* response_handle) { + PigeonExamplePackageExampleHostApiResponseHandle* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API_RESPONSE_HANDLE(g_object_new( + pigeon_example_package_example_host_api_response_handle_get_type(), + nullptr)); + self->channel = FL_BASIC_MESSAGE_CHANNEL(g_object_ref(channel)); + self->response_handle = + FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle)); + return self; +} + struct _PigeonExamplePackageExampleHostApiGetHostLanguageResponse { GObject parent_instance; @@ -426,15 +471,9 @@ pigeon_example_package_example_host_api_send_message_response_new_error( struct _PigeonExamplePackageExampleHostApi { GObject parent_instance; - FlBinaryMessenger* messenger; const PigeonExamplePackageExampleHostApiVTable* vtable; - gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; - - FlBasicMessageChannel* get_host_language_channel; - FlBasicMessageChannel* add_channel; - FlBasicMessageChannel* send_message_channel; }; G_DEFINE_TYPE(PigeonExamplePackageExampleHostApi, @@ -509,22 +548,19 @@ static void pigeon_example_package_example_host_api_send_message_cb( PigeonExamplePackageMessageData* message = PIGEON_EXAMPLE_PACKAGE_MESSAGE_DATA( fl_value_get_custom_value_object(value0)); - self->vtable->send_message(self, message, response_handle, self->user_data); + g_autoptr(PigeonExamplePackageExampleHostApiResponseHandle) handle = + pigeon_example_package_example_host_api_response_handle_new( + channel, response_handle); + self->vtable->send_message(self, message, handle, self->user_data); } static void pigeon_example_package_example_host_api_dispose(GObject* object) { PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(object); - g_clear_object(&self->messenger); - g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } self->user_data = nullptr; - - g_clear_object(&self->get_host_language_channel); - g_clear_object(&self->add_channel); - g_clear_object(&self->send_message_channel); G_OBJECT_CLASS(pigeon_example_package_example_host_api_parent_class) ->dispose(object); } @@ -545,8 +581,7 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( PigeonExamplePackageExampleHostApi* self = PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( pigeon_example_package_example_host_api_get_type(), nullptr)); - self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = + g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; @@ -557,44 +592,47 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( g_autofree gchar* get_host_language_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi." "getHostLanguage%s", - self->suffix); - self->get_host_language_channel = fl_basic_message_channel_new( - messenger, get_host_language_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) get_host_language_channel = + fl_basic_message_channel_new(messenger, get_host_language_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->get_host_language_channel, - pigeon_example_package_example_host_api_get_host_language_cb, self, - nullptr); + get_host_language_channel, + pigeon_example_package_example_host_api_get_host_language_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* add_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add%s", - self->suffix); - self->add_channel = fl_basic_message_channel_new(messenger, add_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) add_channel = fl_basic_message_channel_new( + messenger, add_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->add_channel, pigeon_example_package_example_host_api_add_cb, self, - nullptr); + add_channel, pigeon_example_package_example_host_api_add_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* send_message_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage%s", - self->suffix); - self->send_message_channel = fl_basic_message_channel_new( - messenger, send_message_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) send_message_channel = + fl_basic_message_channel_new(messenger, send_message_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->send_message_channel, - pigeon_example_package_example_host_api_send_message_cb, self, nullptr); + send_message_channel, + pigeon_example_package_example_host_api_send_message_cb, + g_object_ref(self), g_object_unref); return self; } void pigeon_example_package_example_host_api_respond_send_message( PigeonExamplePackageExampleHostApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gboolean return_value) { g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = pigeon_example_package_example_host_api_send_message_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->send_message_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", "sendMessage", error->message); } @@ -602,15 +640,15 @@ void pigeon_example_package_example_host_api_respond_send_message( void pigeon_example_package_example_host_api_respond_error_send_message( PigeonExamplePackageExampleHostApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = pigeon_example_package_example_host_api_send_message_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->send_message_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "ExampleHostApi", "sendMessage", error->message); } diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 690256ce0952..5217e2c4e4ce 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -90,6 +90,11 @@ PigeonExamplePackageCode pigeon_example_package_message_data_get_code( FlValue* pigeon_example_package_message_data_get_data( PigeonExamplePackageMessageData* object); +G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApiResponseHandle, + pigeon_example_package_example_host_api_response_handle, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API_RESPONSE_HANDLE, + GObject) + G_DECLARE_FINAL_TYPE( PigeonExamplePackageExampleHostApiGetHostLanguageResponse, pigeon_example_package_example_host_api_get_host_language_response, @@ -167,10 +172,11 @@ typedef struct { PigeonExamplePackageExampleHostApiAddResponse* (*add)( PigeonExamplePackageExampleHostApi* api, int64_t a, int64_t b, gpointer user_data); - void (*send_message)(PigeonExamplePackageExampleHostApi* api, - PigeonExamplePackageMessageData* message, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); + void (*send_message)( + PigeonExamplePackageExampleHostApi* api, + PigeonExamplePackageMessageData* message, + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, + gpointer user_data); } PigeonExamplePackageExampleHostApiVTable; /** @@ -195,20 +201,20 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( /** * pigeon_example_package_example_host_api_respond_send_message: * @api: a #PigeonExamplePackageExampleHostApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #PigeonExamplePackageExampleHostApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to ExampleHostApi.sendMessage. */ void pigeon_example_package_example_host_api_respond_send_message( PigeonExamplePackageExampleHostApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gboolean return_value); /** * pigeon_example_package_example_host_api_respond_error_send_message: * @api: a #PigeonExamplePackageExampleHostApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #PigeonExamplePackageExampleHostApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -217,8 +223,8 @@ void pigeon_example_package_example_host_api_respond_send_message( */ void pigeon_example_package_example_host_api_respond_error_send_message( PigeonExamplePackageExampleHostApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); G_DECLARE_FINAL_TYPE( PigeonExamplePackageMessageFlutterApiFlutterMethodResponse, diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index 2bc51f7337fc..20809f68ab33 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -46,7 +46,8 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( static void handle_send_message( PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, + gpointer user_data) { PigeonExamplePackageCode code = pigeon_example_package_message_data_get_code(message); if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 978f2e6a596f..312d9cdecb41 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -482,6 +482,13 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, api.name); final String vtableName = _getVTableName(module, api.name); + final bool hasAsyncMethod = + api.methods.any((Method method) => method.isAsynchronous); + if (hasAsyncMethod) { + indent.newln(); + _writeDeclareFinalType(indent, module, '${api.name}ResponseHandle'); + } + for (final Method method in api.methods.where((Method method) => !method.isAsynchronous)) { _writeHostApiRespondClass(indent, module, api, method); @@ -588,7 +595,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { } methodArgs.addAll([ if (method.isAsynchronous) - 'FlBasicMessageChannelResponseHandle* response_handle', + '${className}ResponseHandle* response_handle', 'gpointer user_data', ]); final String returnType = @@ -609,15 +616,14 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List respondArgs = [ '$className* api', - 'FlBasicMessageChannelResponseHandle* response_handle', + '${className}ResponseHandle* response_handle', if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeln('/**'); indent.writeln(' * ${methodPrefix}_respond_$methodName:'); indent.writeln(' * @api: a #$className.'); - indent.writeln( - ' * @response_handle: a #FlBasicMessageChannelResponseHandle.'); + indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); if (returnType != 'void') { indent.writeln( ' * @return_value: location to write the value returned by this method.'); @@ -635,7 +641,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List respondErrorArgs = [ '$className* api', - 'FlBasicMessageChannelResponseHandle* response_handle', + '${className}ResponseHandle* response_handle', 'const gchar* code', 'const gchar* message', 'FlValue* details' @@ -643,8 +649,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.writeln('/**'); indent.writeln(' * ${methodPrefix}_respond_error_$methodName:'); indent.writeln(' * @api: a #$className.'); - indent.writeln( - ' * @response_handle: a #FlBasicMessageChannelResponseHandle.'); + indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); indent.writeln(' * @code: error code.'); indent.writeln(' * @message: error message.'); indent.writeln(' * @details: (allow-none): error details or %NULL.'); @@ -1326,6 +1331,44 @@ class GObjectSourceGenerator extends StructuredGenerator { final String codecClassName = _getClassName(module, _codecBaseName); final String codecMethodPrefix = _getMethodPrefix(module, _codecBaseName); + final bool hasAsyncMethod = + api.methods.any((Method method) => method.isAsynchronous); + if (hasAsyncMethod) { + indent.newln(); + _writeObjectStruct(indent, module, '${api.name}ResponseHandle', () { + indent.writeln('FlBasicMessageChannel* channel;'); + indent.writeln('FlBasicMessageChannelResponseHandle* response_handle;'); + }); + + indent.newln(); + _writeDefineType(indent, module, '${api.name}ResponseHandle'); + + indent.newln(); + _writeDispose(indent, module, '${api.name}ResponseHandle', () { + _writeCastSelf(indent, module, '${api.name}ResponseHandle', 'object'); + indent.writeln('g_clear_object(&self->channel);'); + indent.writeln('g_clear_object(&self->response_handle);'); + }); + + indent.newln(); + _writeInit(indent, module, '${api.name}ResponseHandle', () {}); + + indent.newln(); + _writeClassInit(indent, module, '${api.name}ResponseHandle', () {}); + + indent.newln(); + indent.writeScoped( + 'static ${className}ResponseHandle* ${methodPrefix}_response_handle_new(FlBasicMessageChannel* channel, FlBasicMessageChannelResponseHandle* response_handle) {', + '}', () { + _writeObjectNew(indent, module, '${api.name}ResponseHandle'); + indent.writeln( + 'self->channel = FL_BASIC_MESSAGE_CHANNEL(g_object_ref(channel));'); + indent.writeln( + 'self->response_handle = FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle));'); + indent.writeln('return self;'); + }); + } + for (final Method method in api.methods) { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); @@ -1391,17 +1434,9 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeObjectStruct(indent, module, api.name, () { - indent.writeln('FlBinaryMessenger* messenger;'); indent.writeln('const ${className}VTable* vtable;'); - indent.writeln('gchar* suffix;'); indent.writeln('gpointer user_data;'); indent.writeln('GDestroyNotify user_data_free_func;'); - - indent.newln(); - for (final Method method in api.methods) { - final String methodName = _getMethodName(method.name); - indent.writeln('FlBasicMessageChannel* ${methodName}_channel;'); - } }); indent.newln(); @@ -1461,7 +1496,9 @@ class GObjectSourceGenerator extends StructuredGenerator { if (method.isAsynchronous) { final List vfuncArgs = ['self']; vfuncArgs.addAll(methodArgs); - vfuncArgs.addAll(['response_handle', 'self->user_data']); + vfuncArgs.addAll(['handle', 'self->user_data']); + indent.writeln( + 'g_autoptr(${className}ResponseHandle) handle = ${methodPrefix}_response_handle_new(channel, response_handle);'); indent.writeln("self->vtable->$methodName(${vfuncArgs.join(', ')});"); } else { final List vfuncArgs = ['self']; @@ -1490,18 +1527,10 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeDispose(indent, module, api.name, () { _writeCastSelf(indent, module, api.name, 'object'); - indent.writeln('g_clear_object(&self->messenger);'); - indent.writeln('g_clear_pointer(&self->suffix, g_free);'); indent.writeScoped('if (self->user_data != nullptr) {', '}', () { indent.writeln('self->user_data_free_func(self->user_data);'); }); indent.writeln('self->user_data = nullptr;'); - - indent.newln(); - for (final Method method in api.methods) { - final String methodName = _getMethodName(method.name); - indent.writeln('g_clear_object(&self->${methodName}_channel);'); - } }); indent.newln(); @@ -1516,9 +1545,7 @@ class GObjectSourceGenerator extends StructuredGenerator { '}', () { _writeObjectNew(indent, module, api.name); indent.writeln( - 'self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));'); - indent.writeln( - 'self->suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); + 'g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); indent.writeln('self->vtable = vtable;'); indent.writeln('self->user_data = user_data;'); indent.writeln('self->user_data_free_func = user_data_free_func;'); @@ -1531,11 +1558,11 @@ class GObjectSourceGenerator extends StructuredGenerator { final String channelName = makeChannelName(api, method, dartPackageName); indent.writeln( - 'g_autofree gchar* ${methodName}_channel_name = g_strdup_printf("$channelName%s", self->suffix);'); + 'g_autofree gchar* ${methodName}_channel_name = g_strdup_printf("$channelName%s", dot_suffix);'); indent.writeln( - 'self->${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); + 'g_autoptr(FlBasicMessageChannel) ${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); indent.writeln( - 'fl_basic_message_channel_set_message_handler(self->${methodName}_channel, ${methodPrefix}_${methodName}_cb, self, nullptr);'); + 'fl_basic_message_channel_set_message_handler(${methodName}_channel, ${methodPrefix}_${methodName}_cb, g_object_ref(self), g_object_unref);'); } indent.newln(); @@ -1554,7 +1581,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final List respondArgs = [ '$className* self', - 'FlBasicMessageChannelResponseHandle* response_handle', + '${className}ResponseHandle* response_handle', if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; @@ -1569,7 +1596,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new(${returnArgs.join(', ')});'); indent.writeln('g_autoptr(GError) error = nullptr;'); indent.writeScoped( - 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', + 'if (!fl_basic_message_channel_respond(response_handle->channel, response_handle->response_handle, response->value, &error)) {', '}', () { indent.writeln( 'g_warning("Failed to send response to %s.%s: %s", "${api.name}", "${method.name}", error->message);'); @@ -1579,7 +1606,7 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final List respondErrorArgs = [ '$className* self', - 'FlBasicMessageChannelResponseHandle* response_handle', + '${className}ResponseHandle* response_handle', 'const gchar* code', 'const gchar* message', 'FlValue* details' @@ -1591,7 +1618,7 @@ class GObjectSourceGenerator extends StructuredGenerator { 'g_autoptr($responseClassName) response = ${responseMethodPrefix}_new_error(code, message, details);'); indent.writeln('g_autoptr(GError) error = nullptr;'); indent.writeScoped( - 'if (!fl_basic_message_channel_respond(self->${methodName}_channel, response_handle, response->value, &error)) {', + 'if (!fl_basic_message_channel_respond(response_handle->channel, response_handle->response_handle, response->value, &error)) {', '}', () { indent.writeln( 'g_warning("Failed to send response to %s.%s: %s", "${api.name}", "${method.name}", error->message);'); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 8f855b586b33..77bf1e7c1cad 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -1998,6 +1998,54 @@ core_tests_pigeon_test_message_codec_new() { return self; } +struct _CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle { + GObject parent_instance; + + FlBasicMessageChannel* channel; + FlBasicMessageChannelResponseHandle* response_handle; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle, + core_tests_pigeon_test_host_integration_core_api_response_handle, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_response_handle_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_RESPONSE_HANDLE(object); + g_clear_object(&self->channel); + g_clear_object(&self->response_handle); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_response_handle_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_response_handle_init( + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_response_handle_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandleClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_response_handle_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* +core_tests_pigeon_test_host_integration_core_api_response_handle_new( + FlBasicMessageChannel* channel, + FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_RESPONSE_HANDLE(g_object_new( + core_tests_pigeon_test_host_integration_core_api_response_handle_get_type(), + nullptr)); + self->channel = FL_BASIC_MESSAGE_CHANNEL(g_object_ref(channel)); + self->response_handle = + FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle)); + return self; +} + struct _CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse { GObject parent_instance; @@ -8019,100 +8067,9 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_str struct _CoreTestsPigeonTestHostIntegrationCoreApi { GObject parent_instance; - FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable; - gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; - - FlBasicMessageChannel* noop_channel; - FlBasicMessageChannel* echo_all_types_channel; - FlBasicMessageChannel* throw_error_channel; - FlBasicMessageChannel* throw_error_from_void_channel; - FlBasicMessageChannel* throw_flutter_error_channel; - FlBasicMessageChannel* echo_int_channel; - FlBasicMessageChannel* echo_double_channel; - FlBasicMessageChannel* echo_bool_channel; - FlBasicMessageChannel* echo_string_channel; - FlBasicMessageChannel* echo_uint8_list_channel; - FlBasicMessageChannel* echo_object_channel; - FlBasicMessageChannel* echo_list_channel; - FlBasicMessageChannel* echo_map_channel; - FlBasicMessageChannel* echo_class_wrapper_channel; - FlBasicMessageChannel* echo_enum_channel; - FlBasicMessageChannel* echo_named_default_string_channel; - FlBasicMessageChannel* echo_optional_default_double_channel; - FlBasicMessageChannel* echo_required_int_channel; - FlBasicMessageChannel* echo_all_nullable_types_channel; - FlBasicMessageChannel* echo_all_nullable_types_without_recursion_channel; - FlBasicMessageChannel* extract_nested_nullable_string_channel; - FlBasicMessageChannel* create_nested_nullable_string_channel; - FlBasicMessageChannel* send_multiple_nullable_types_channel; - FlBasicMessageChannel* send_multiple_nullable_types_without_recursion_channel; - FlBasicMessageChannel* echo_nullable_int_channel; - FlBasicMessageChannel* echo_nullable_double_channel; - FlBasicMessageChannel* echo_nullable_bool_channel; - FlBasicMessageChannel* echo_nullable_string_channel; - FlBasicMessageChannel* echo_nullable_uint8_list_channel; - FlBasicMessageChannel* echo_nullable_object_channel; - FlBasicMessageChannel* echo_nullable_list_channel; - FlBasicMessageChannel* echo_nullable_map_channel; - FlBasicMessageChannel* echo_nullable_enum_channel; - FlBasicMessageChannel* echo_optional_nullable_int_channel; - FlBasicMessageChannel* echo_named_nullable_string_channel; - FlBasicMessageChannel* noop_async_channel; - FlBasicMessageChannel* echo_async_int_channel; - FlBasicMessageChannel* echo_async_double_channel; - FlBasicMessageChannel* echo_async_bool_channel; - FlBasicMessageChannel* echo_async_string_channel; - FlBasicMessageChannel* echo_async_uint8_list_channel; - FlBasicMessageChannel* echo_async_object_channel; - FlBasicMessageChannel* echo_async_list_channel; - FlBasicMessageChannel* echo_async_map_channel; - FlBasicMessageChannel* echo_async_enum_channel; - FlBasicMessageChannel* throw_async_error_channel; - FlBasicMessageChannel* throw_async_error_from_void_channel; - FlBasicMessageChannel* throw_async_flutter_error_channel; - FlBasicMessageChannel* echo_async_all_types_channel; - FlBasicMessageChannel* echo_async_nullable_all_nullable_types_channel; - FlBasicMessageChannel* - echo_async_nullable_all_nullable_types_without_recursion_channel; - FlBasicMessageChannel* echo_async_nullable_int_channel; - FlBasicMessageChannel* echo_async_nullable_double_channel; - FlBasicMessageChannel* echo_async_nullable_bool_channel; - FlBasicMessageChannel* echo_async_nullable_string_channel; - FlBasicMessageChannel* echo_async_nullable_uint8_list_channel; - FlBasicMessageChannel* echo_async_nullable_object_channel; - FlBasicMessageChannel* echo_async_nullable_list_channel; - FlBasicMessageChannel* echo_async_nullable_map_channel; - FlBasicMessageChannel* echo_async_nullable_enum_channel; - FlBasicMessageChannel* call_flutter_noop_channel; - FlBasicMessageChannel* call_flutter_throw_error_channel; - FlBasicMessageChannel* call_flutter_throw_error_from_void_channel; - FlBasicMessageChannel* call_flutter_echo_all_types_channel; - FlBasicMessageChannel* call_flutter_echo_all_nullable_types_channel; - FlBasicMessageChannel* call_flutter_send_multiple_nullable_types_channel; - FlBasicMessageChannel* - call_flutter_echo_all_nullable_types_without_recursion_channel; - FlBasicMessageChannel* - call_flutter_send_multiple_nullable_types_without_recursion_channel; - FlBasicMessageChannel* call_flutter_echo_bool_channel; - FlBasicMessageChannel* call_flutter_echo_int_channel; - FlBasicMessageChannel* call_flutter_echo_double_channel; - FlBasicMessageChannel* call_flutter_echo_string_channel; - FlBasicMessageChannel* call_flutter_echo_uint8_list_channel; - FlBasicMessageChannel* call_flutter_echo_list_channel; - FlBasicMessageChannel* call_flutter_echo_map_channel; - FlBasicMessageChannel* call_flutter_echo_enum_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_bool_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_int_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_double_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_string_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_uint8_list_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_list_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_map_channel; - FlBasicMessageChannel* call_flutter_echo_nullable_enum_channel; - FlBasicMessageChannel* call_flutter_small_api_echo_string_channel; }; G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, @@ -9242,7 +9199,10 @@ static void core_tests_pigeon_test_host_integration_core_api_noop_async_cb( return; } - self->vtable->noop_async(self, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->noop_async(self, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb( @@ -9257,7 +9217,10 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); int64_t an_int = fl_value_get_int(value0); - self->vtable->echo_async_int(self, an_int, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_int(self, an_int, handle, self->user_data); } static void @@ -9273,8 +9236,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); double a_double = fl_value_get_float(value0); - self->vtable->echo_async_double(self, a_double, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_double(self, a_double, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb( @@ -9289,7 +9254,10 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); gboolean a_bool = fl_value_get_bool(value0); - self->vtable->echo_async_bool(self, a_bool, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_bool(self, a_bool, handle, self->user_data); } static void @@ -9305,8 +9273,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->echo_async_string(self, a_string, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_string(self, a_string, handle, self->user_data); } static void @@ -9324,8 +9294,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const uint8_t* a_uint8_list = fl_value_get_uint8_list(value0); size_t a_uint8_list_length = fl_value_get_length(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->echo_async_uint8_list(self, a_uint8_list, a_uint8_list_length, - response_handle, self->user_data); + handle, self->user_data); } static void @@ -9341,8 +9314,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* an_object = value0; - self->vtable->echo_async_object(self, an_object, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_object(self, an_object, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb( @@ -9357,7 +9332,10 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* list = value0; - self->vtable->echo_async_list(self, list, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_list(self, list, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb( @@ -9372,7 +9350,10 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_map = value0; - self->vtable->echo_async_map(self, a_map, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_map(self, a_map, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( @@ -9389,8 +9370,10 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( CoreTestsPigeonTestAnEnum an_enum = static_cast( fl_value_get_int(reinterpret_cast( const_cast(fl_value_get_custom_value(value0))))); - self->vtable->echo_async_enum(self, an_enum, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_enum(self, an_enum, handle, self->user_data); } static void @@ -9404,7 +9387,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb( return; } - self->vtable->throw_async_error(self, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->throw_async_error(self, handle, self->user_data); } static void @@ -9419,8 +9405,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb( return; } - self->vtable->throw_async_error_from_void(self, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->throw_async_error_from_void(self, handle, self->user_data); } static void @@ -9435,8 +9423,10 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb( return; } - self->vtable->throw_async_flutter_error(self, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->throw_async_flutter_error(self, handle, self->user_data); } static void @@ -9454,8 +9444,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value0)); - self->vtable->echo_async_all_types(self, everything, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_all_types(self, everything, handle, self->user_data); } static void @@ -9474,8 +9466,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl CoreTestsPigeonTestAllNullableTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value0)); - self->vtable->echo_async_nullable_all_nullable_types( - self, everything, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_all_nullable_types(self, everything, handle, + self->user_data); } static void @@ -9495,8 +9490,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->echo_async_nullable_all_nullable_types_without_recursion( - self, everything, response_handle, self->user_data); + self, everything, handle, self->user_data); } static void @@ -9518,8 +9516,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb( an_int_value = fl_value_get_int(value0); an_int = &an_int_value; } - self->vtable->echo_async_nullable_int(self, an_int, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_int(self, an_int, handle, self->user_data); } static void @@ -9541,7 +9541,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb( a_double_value = fl_value_get_float(value0); a_double = &a_double_value; } - self->vtable->echo_async_nullable_double(self, a_double, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_double(self, a_double, handle, self->user_data); } @@ -9564,8 +9567,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb( a_bool_value = fl_value_get_bool(value0); a_bool = &a_bool_value; } - self->vtable->echo_async_nullable_bool(self, a_bool, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_bool(self, a_bool, handle, self->user_data); } static void @@ -9582,7 +9587,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->echo_async_nullable_string(self, a_string, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_string(self, a_string, handle, self->user_data); } @@ -9601,9 +9609,11 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_ FlValue* value0 = fl_value_get_list_value(message_, 0); const uint8_t* a_uint8_list = fl_value_get_uint8_list(value0); size_t a_uint8_list_length = fl_value_get_length(value0); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->echo_async_nullable_uint8_list( - self, a_uint8_list, a_uint8_list_length, response_handle, - self->user_data); + self, a_uint8_list, a_uint8_list_length, handle, self->user_data); } static void @@ -9620,7 +9630,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* an_object = value0; - self->vtable->echo_async_nullable_object(self, an_object, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_object(self, an_object, handle, self->user_data); } @@ -9638,8 +9651,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* list = value0; - self->vtable->echo_async_nullable_list(self, list, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_list(self, list, handle, self->user_data); } static void @@ -9656,8 +9671,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_map = value0; - self->vtable->echo_async_nullable_map(self, a_map, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_map(self, a_map, handle, self->user_data); } static void @@ -9681,7 +9698,10 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb( const_cast(fl_value_get_custom_value(value0))))); an_enum = &an_enum_value; } - self->vtable->echo_async_nullable_enum(self, an_enum, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->echo_async_nullable_enum(self, an_enum, handle, self->user_data); } @@ -9696,7 +9716,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb( return; } - self->vtable->call_flutter_noop(self, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_noop(self, handle, self->user_data); } static void @@ -9711,8 +9734,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb( return; } - self->vtable->call_flutter_throw_error(self, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_throw_error(self, handle, self->user_data); } static void @@ -9727,7 +9752,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_v return; } - self->vtable->call_flutter_throw_error_from_void(self, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_throw_error_from_void(self, handle, self->user_data); } @@ -9746,7 +9774,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value0)); - self->vtable->call_flutter_echo_all_types(self, everything, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_all_types(self, everything, handle, self->user_data); } @@ -9766,8 +9797,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ CoreTestsPigeonTestAllNullableTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES( fl_value_get_custom_value_object(value0)); - self->vtable->call_flutter_echo_all_nullable_types( - self, everything, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_all_nullable_types(self, everything, handle, + self->user_data); } static void @@ -9798,8 +9832,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null } FlValue* value2 = fl_value_get_list_value(message_, 2); const gchar* a_nullable_string = fl_value_get_string(value2); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->call_flutter_send_multiple_nullable_types( - self, a_nullable_bool, a_nullable_int, a_nullable_string, response_handle, + self, a_nullable_bool, a_nullable_int, a_nullable_string, handle, self->user_data); } @@ -9820,8 +9857,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES_WITHOUT_RECURSION( fl_value_get_custom_value_object(value0)); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->call_flutter_echo_all_nullable_types_without_recursion( - self, everything, response_handle, self->user_data); + self, everything, handle, self->user_data); } static void @@ -9854,8 +9894,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null } FlValue* value2 = fl_value_get_list_value(message_, 2); const gchar* a_nullable_string = fl_value_get_string(value2); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); self->vtable->call_flutter_send_multiple_nullable_types_without_recursion( - self, a_nullable_bool, a_nullable_int, a_nullable_string, response_handle, + self, a_nullable_bool, a_nullable_int, a_nullable_string, handle, self->user_data); } @@ -9873,8 +9916,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); gboolean a_bool = fl_value_get_bool(value0); - self->vtable->call_flutter_echo_bool(self, a_bool, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_bool(self, a_bool, handle, self->user_data); } static void @@ -9891,8 +9936,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); int64_t an_int = fl_value_get_int(value0); - self->vtable->call_flutter_echo_int(self, an_int, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_int(self, an_int, handle, self->user_data); } static void @@ -9909,7 +9956,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); double a_double = fl_value_get_float(value0); - self->vtable->call_flutter_echo_double(self, a_double, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_double(self, a_double, handle, self->user_data); } @@ -9927,7 +9977,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->call_flutter_echo_string(self, a_string, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_string(self, a_string, handle, self->user_data); } @@ -9946,8 +9999,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb FlValue* value0 = fl_value_get_list_value(message_, 0); const uint8_t* list = fl_value_get_uint8_list(value0); size_t list_length = fl_value_get_length(value0); - self->vtable->call_flutter_echo_uint8_list(self, list, list_length, - response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_uint8_list(self, list, list_length, handle, + self->user_data); } static void @@ -9964,8 +10020,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* list = value0; - self->vtable->call_flutter_echo_list(self, list, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_list(self, list, handle, self->user_data); } static void @@ -9982,8 +10040,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_map = value0; - self->vtable->call_flutter_echo_map(self, a_map, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_map(self, a_map, handle, self->user_data); } static void @@ -10002,8 +10062,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb( CoreTestsPigeonTestAnEnum an_enum = static_cast( fl_value_get_int(reinterpret_cast( const_cast(fl_value_get_custom_value(value0))))); - self->vtable->call_flutter_echo_enum(self, an_enum, response_handle, - self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_enum(self, an_enum, handle, self->user_data); } static void @@ -10025,7 +10087,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool a_bool_value = fl_value_get_bool(value0); a_bool = &a_bool_value; } - self->vtable->call_flutter_echo_nullable_bool(self, a_bool, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_bool(self, a_bool, handle, self->user_data); } @@ -10048,7 +10113,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_ an_int_value = fl_value_get_int(value0); an_int = &an_int_value; } - self->vtable->call_flutter_echo_nullable_int(self, an_int, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_int(self, an_int, handle, self->user_data); } @@ -10071,8 +10139,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_doub a_double_value = fl_value_get_float(value0); a_double = &a_double_value; } - self->vtable->call_flutter_echo_nullable_double( - self, a_double, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_double(self, a_double, handle, + self->user_data); } static void @@ -10089,8 +10160,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_stri FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->call_flutter_echo_nullable_string( - self, a_string, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_string(self, a_string, handle, + self->user_data); } static void @@ -10108,8 +10182,11 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint FlValue* value0 = fl_value_get_list_value(message_, 0); const uint8_t* list = fl_value_get_uint8_list(value0); size_t list_length = fl_value_get_length(value0); - self->vtable->call_flutter_echo_nullable_uint8_list( - self, list, list_length, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_uint8_list(self, list, list_length, + handle, self->user_data); } static void @@ -10126,7 +10203,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* list = value0; - self->vtable->call_flutter_echo_nullable_list(self, list, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_list(self, list, handle, self->user_data); } @@ -10144,7 +10224,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_ FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_map = value0; - self->vtable->call_flutter_echo_nullable_map(self, a_map, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_map(self, a_map, handle, self->user_data); } @@ -10169,7 +10252,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum const_cast(fl_value_get_custom_value(value0))))); an_enum = &an_enum_value; } - self->vtable->call_flutter_echo_nullable_enum(self, an_enum, response_handle, + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_echo_nullable_enum(self, an_enum, handle, self->user_data); } @@ -10187,109 +10273,21 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_str FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->call_flutter_small_api_echo_string( - self, a_string, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = + core_tests_pigeon_test_host_integration_core_api_response_handle_new( + channel, response_handle); + self->vtable->call_flutter_small_api_echo_string(self, a_string, handle, + self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_dispose( GObject* object) { CoreTestsPigeonTestHostIntegrationCoreApi* self = CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(object); - g_clear_object(&self->messenger); - g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } self->user_data = nullptr; - - g_clear_object(&self->noop_channel); - g_clear_object(&self->echo_all_types_channel); - g_clear_object(&self->throw_error_channel); - g_clear_object(&self->throw_error_from_void_channel); - g_clear_object(&self->throw_flutter_error_channel); - g_clear_object(&self->echo_int_channel); - g_clear_object(&self->echo_double_channel); - g_clear_object(&self->echo_bool_channel); - g_clear_object(&self->echo_string_channel); - g_clear_object(&self->echo_uint8_list_channel); - g_clear_object(&self->echo_object_channel); - g_clear_object(&self->echo_list_channel); - g_clear_object(&self->echo_map_channel); - g_clear_object(&self->echo_class_wrapper_channel); - g_clear_object(&self->echo_enum_channel); - g_clear_object(&self->echo_named_default_string_channel); - g_clear_object(&self->echo_optional_default_double_channel); - g_clear_object(&self->echo_required_int_channel); - g_clear_object(&self->echo_all_nullable_types_channel); - g_clear_object(&self->echo_all_nullable_types_without_recursion_channel); - g_clear_object(&self->extract_nested_nullable_string_channel); - g_clear_object(&self->create_nested_nullable_string_channel); - g_clear_object(&self->send_multiple_nullable_types_channel); - g_clear_object(&self->send_multiple_nullable_types_without_recursion_channel); - g_clear_object(&self->echo_nullable_int_channel); - g_clear_object(&self->echo_nullable_double_channel); - g_clear_object(&self->echo_nullable_bool_channel); - g_clear_object(&self->echo_nullable_string_channel); - g_clear_object(&self->echo_nullable_uint8_list_channel); - g_clear_object(&self->echo_nullable_object_channel); - g_clear_object(&self->echo_nullable_list_channel); - g_clear_object(&self->echo_nullable_map_channel); - g_clear_object(&self->echo_nullable_enum_channel); - g_clear_object(&self->echo_optional_nullable_int_channel); - g_clear_object(&self->echo_named_nullable_string_channel); - g_clear_object(&self->noop_async_channel); - g_clear_object(&self->echo_async_int_channel); - g_clear_object(&self->echo_async_double_channel); - g_clear_object(&self->echo_async_bool_channel); - g_clear_object(&self->echo_async_string_channel); - g_clear_object(&self->echo_async_uint8_list_channel); - g_clear_object(&self->echo_async_object_channel); - g_clear_object(&self->echo_async_list_channel); - g_clear_object(&self->echo_async_map_channel); - g_clear_object(&self->echo_async_enum_channel); - g_clear_object(&self->throw_async_error_channel); - g_clear_object(&self->throw_async_error_from_void_channel); - g_clear_object(&self->throw_async_flutter_error_channel); - g_clear_object(&self->echo_async_all_types_channel); - g_clear_object(&self->echo_async_nullable_all_nullable_types_channel); - g_clear_object( - &self->echo_async_nullable_all_nullable_types_without_recursion_channel); - g_clear_object(&self->echo_async_nullable_int_channel); - g_clear_object(&self->echo_async_nullable_double_channel); - g_clear_object(&self->echo_async_nullable_bool_channel); - g_clear_object(&self->echo_async_nullable_string_channel); - g_clear_object(&self->echo_async_nullable_uint8_list_channel); - g_clear_object(&self->echo_async_nullable_object_channel); - g_clear_object(&self->echo_async_nullable_list_channel); - g_clear_object(&self->echo_async_nullable_map_channel); - g_clear_object(&self->echo_async_nullable_enum_channel); - g_clear_object(&self->call_flutter_noop_channel); - g_clear_object(&self->call_flutter_throw_error_channel); - g_clear_object(&self->call_flutter_throw_error_from_void_channel); - g_clear_object(&self->call_flutter_echo_all_types_channel); - g_clear_object(&self->call_flutter_echo_all_nullable_types_channel); - g_clear_object(&self->call_flutter_send_multiple_nullable_types_channel); - g_clear_object( - &self->call_flutter_echo_all_nullable_types_without_recursion_channel); - g_clear_object( - &self->call_flutter_send_multiple_nullable_types_without_recursion_channel); - g_clear_object(&self->call_flutter_echo_bool_channel); - g_clear_object(&self->call_flutter_echo_int_channel); - g_clear_object(&self->call_flutter_echo_double_channel); - g_clear_object(&self->call_flutter_echo_string_channel); - g_clear_object(&self->call_flutter_echo_uint8_list_channel); - g_clear_object(&self->call_flutter_echo_list_channel); - g_clear_object(&self->call_flutter_echo_map_channel); - g_clear_object(&self->call_flutter_echo_enum_channel); - g_clear_object(&self->call_flutter_echo_nullable_bool_channel); - g_clear_object(&self->call_flutter_echo_nullable_int_channel); - g_clear_object(&self->call_flutter_echo_nullable_double_channel); - g_clear_object(&self->call_flutter_echo_nullable_string_channel); - g_clear_object(&self->call_flutter_echo_nullable_uint8_list_channel); - g_clear_object(&self->call_flutter_echo_nullable_list_channel); - g_clear_object(&self->call_flutter_echo_nullable_map_channel); - g_clear_object(&self->call_flutter_echo_nullable_enum_channel); - g_clear_object(&self->call_flutter_small_api_echo_string_channel); G_OBJECT_CLASS(core_tests_pigeon_test_host_integration_core_api_parent_class) ->dispose(object); } @@ -10312,8 +10310,7 @@ core_tests_pigeon_test_host_integration_core_api_new( CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(g_object_new( core_tests_pigeon_test_host_integration_core_api_get_type(), nullptr)); - self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = + g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; @@ -10324,951 +10321,1042 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autofree gchar* noop_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop%" "s", - self->suffix); - self->noop_channel = fl_basic_message_channel_new( + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_channel = fl_basic_message_channel_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->noop_channel, - core_tests_pigeon_test_host_integration_core_api_noop_cb, self, nullptr); + noop_channel, core_tests_pigeon_test_host_integration_core_api_noop_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllTypes%s", - self->suffix); - self->echo_all_types_channel = fl_basic_message_channel_new( - messenger, echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_all_types_channel = + fl_basic_message_channel_new(messenger, echo_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_all_types_channel, - core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, self, - nullptr); + echo_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* throw_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwError%s", - self->suffix); - self->throw_error_channel = fl_basic_message_channel_new( - messenger, throw_error_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_error_channel = + fl_basic_message_channel_new(messenger, throw_error_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_error_channel, - core_tests_pigeon_test_host_integration_core_api_throw_error_cb, self, - nullptr); + throw_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_error_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* throw_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwErrorFromVoid%s", - self->suffix); - self->throw_error_from_void_channel = fl_basic_message_channel_new( - messenger, throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_error_from_void_channel = + fl_basic_message_channel_new(messenger, + throw_error_from_void_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_error_from_void_channel, + throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* throw_flutter_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwFlutterError%s", - self->suffix); - self->throw_flutter_error_channel = fl_basic_message_channel_new( - messenger, throw_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_flutter_error_channel = + fl_basic_message_channel_new(messenger, throw_flutter_error_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_flutter_error_channel, + throw_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoInt%s", - self->suffix); - self->echo_int_channel = fl_basic_message_channel_new( - messenger, echo_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_int_channel = + fl_basic_message_channel_new(messenger, echo_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_int_channel, - core_tests_pigeon_test_host_integration_core_api_echo_int_cb, self, - nullptr); + echo_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_int_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoDouble%s", - self->suffix); - self->echo_double_channel = fl_basic_message_channel_new( - messenger, echo_double_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_double_channel = + fl_basic_message_channel_new(messenger, echo_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_double_channel, - core_tests_pigeon_test_host_integration_core_api_echo_double_cb, self, - nullptr); + echo_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_double_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoBool%s", - self->suffix); - self->echo_bool_channel = fl_basic_message_channel_new( - messenger, echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_bool_channel = + fl_basic_message_channel_new(messenger, echo_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_bool_channel, - core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, self, - nullptr); + echo_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoString%s", - self->suffix); - self->echo_string_channel = fl_basic_message_channel_new( - messenger, echo_string_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_string_channel = + fl_basic_message_channel_new(messenger, echo_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_string_channel, - core_tests_pigeon_test_host_integration_core_api_echo_string_cb, self, - nullptr); + echo_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_string_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoUint8List%s", - self->suffix); - self->echo_uint8_list_channel = fl_basic_message_channel_new( - messenger, echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_uint8_list_channel = + fl_basic_message_channel_new(messenger, echo_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_uint8_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, self, - nullptr); + echo_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoObject%s", - self->suffix); - self->echo_object_channel = fl_basic_message_channel_new( - messenger, echo_object_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_object_channel = + fl_basic_message_channel_new(messenger, echo_object_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_object_channel, - core_tests_pigeon_test_host_integration_core_api_echo_object_cb, self, - nullptr); + echo_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_object_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoList%s", - self->suffix); - self->echo_list_channel = fl_basic_message_channel_new( - messenger, echo_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_list_channel = + fl_basic_message_channel_new(messenger, echo_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_list_cb, self, - nullptr); + echo_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_list_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoMap%s", - self->suffix); - self->echo_map_channel = fl_basic_message_channel_new( - messenger, echo_map_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_map_channel = + fl_basic_message_channel_new(messenger, echo_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_map_channel, - core_tests_pigeon_test_host_integration_core_api_echo_map_cb, self, - nullptr); + echo_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_map_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_class_wrapper_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoClassWrapper%s", - self->suffix); - self->echo_class_wrapper_channel = fl_basic_message_channel_new( - messenger, echo_class_wrapper_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_class_wrapper_channel = + fl_basic_message_channel_new(messenger, echo_class_wrapper_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_class_wrapper_channel, + echo_class_wrapper_channel, core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoEnum%s", - self->suffix); - self->echo_enum_channel = fl_basic_message_channel_new( - messenger, echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_enum_channel = + fl_basic_message_channel_new(messenger, echo_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_enum_channel, - core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, self, - nullptr); + echo_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_named_default_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNamedDefaultString%s", - self->suffix); - self->echo_named_default_string_channel = fl_basic_message_channel_new( - messenger, echo_named_default_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_named_default_string_channel = + fl_basic_message_channel_new(messenger, + echo_named_default_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_named_default_string_channel, + echo_named_default_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_optional_default_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoOptionalDefaultDouble%s", - self->suffix); - self->echo_optional_default_double_channel = fl_basic_message_channel_new( - messenger, echo_optional_default_double_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_optional_default_double_channel = + fl_basic_message_channel_new(messenger, + echo_optional_default_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_optional_default_double_channel, + echo_optional_default_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_required_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoRequiredInt%s", - self->suffix); - self->echo_required_int_channel = fl_basic_message_channel_new( - messenger, echo_required_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_required_int_channel = + fl_basic_message_channel_new(messenger, echo_required_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_required_int_channel, + echo_required_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllNullableTypes%s", - self->suffix); - self->echo_all_nullable_types_channel = fl_basic_message_channel_new( - messenger, echo_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_all_nullable_types_channel = + fl_basic_message_channel_new(messenger, + echo_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_all_nullable_types_channel, + echo_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_all_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllNullableTypesWithoutRecursion%s", - self->suffix); - self->echo_all_nullable_types_without_recursion_channel = - fl_basic_message_channel_new( - messenger, echo_all_nullable_types_without_recursion_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, echo_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_all_nullable_types_without_recursion_channel, + echo_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* extract_nested_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "extractNestedNullableString%s", - self->suffix); - self->extract_nested_nullable_string_channel = fl_basic_message_channel_new( - messenger, extract_nested_nullable_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) extract_nested_nullable_string_channel = + fl_basic_message_channel_new(messenger, + extract_nested_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->extract_nested_nullable_string_channel, + extract_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* create_nested_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "createNestedNullableString%s", - self->suffix); - self->create_nested_nullable_string_channel = fl_basic_message_channel_new( - messenger, create_nested_nullable_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) create_nested_nullable_string_channel = + fl_basic_message_channel_new(messenger, + create_nested_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->create_nested_nullable_string_channel, + create_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* send_multiple_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "sendMultipleNullableTypes%s", - self->suffix); - self->send_multiple_nullable_types_channel = fl_basic_message_channel_new( - messenger, send_multiple_nullable_types_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) send_multiple_nullable_types_channel = + fl_basic_message_channel_new(messenger, + send_multiple_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->send_multiple_nullable_types_channel, + send_multiple_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* send_multiple_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests." "HostIntegrationCoreApi." "sendMultipleNullableTypesWithoutRecursion%s", - self->suffix); - self->send_multiple_nullable_types_without_recursion_channel = - fl_basic_message_channel_new( - messenger, - send_multiple_nullable_types_without_recursion_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + send_multiple_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->send_multiple_nullable_types_without_recursion_channel, + send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableInt%s", - self->suffix); - self->echo_nullable_int_channel = fl_basic_message_channel_new( - messenger, echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_int_channel = + fl_basic_message_channel_new(messenger, echo_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_int_channel, + echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableDouble%s", - self->suffix); - self->echo_nullable_double_channel = fl_basic_message_channel_new( - messenger, echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_double_channel = + fl_basic_message_channel_new(messenger, echo_nullable_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_double_channel, + echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableBool%s", - self->suffix); - self->echo_nullable_bool_channel = fl_basic_message_channel_new( - messenger, echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_bool_channel = + fl_basic_message_channel_new(messenger, echo_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_bool_channel, + echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableString%s", - self->suffix); - self->echo_nullable_string_channel = fl_basic_message_channel_new( - messenger, echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_string_channel = + fl_basic_message_channel_new(messenger, echo_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_string_channel, + echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableUint8List%s", - self->suffix); - self->echo_nullable_uint8_list_channel = fl_basic_message_channel_new( - messenger, echo_nullable_uint8_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_uint8_list_channel, + echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableObject%s", - self->suffix); - self->echo_nullable_object_channel = fl_basic_message_channel_new( - messenger, echo_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_object_channel = + fl_basic_message_channel_new(messenger, echo_nullable_object_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_object_channel, + echo_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableList%s", - self->suffix); - self->echo_nullable_list_channel = fl_basic_message_channel_new( - messenger, echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_list_channel = + fl_basic_message_channel_new(messenger, echo_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_list_channel, + echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableMap%s", - self->suffix); - self->echo_nullable_map_channel = fl_basic_message_channel_new( - messenger, echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_map_channel = + fl_basic_message_channel_new(messenger, echo_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_map_channel, + echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableEnum%s", - self->suffix); - self->echo_nullable_enum_channel = fl_basic_message_channel_new( - messenger, echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_enum_channel = + fl_basic_message_channel_new(messenger, echo_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_nullable_enum_channel, + echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_optional_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoOptionalNullableInt%s", - self->suffix); - self->echo_optional_nullable_int_channel = fl_basic_message_channel_new( - messenger, echo_optional_nullable_int_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_optional_nullable_int_channel = + fl_basic_message_channel_new(messenger, + echo_optional_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_optional_nullable_int_channel, + echo_optional_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_named_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNamedNullableString%s", - self->suffix); - self->echo_named_nullable_string_channel = fl_basic_message_channel_new( - messenger, echo_named_nullable_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_named_nullable_string_channel = + fl_basic_message_channel_new(messenger, + echo_named_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_named_nullable_string_channel, + echo_named_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* noop_async_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "noopAsync%s", - self->suffix); - self->noop_async_channel = fl_basic_message_channel_new( - messenger, noop_async_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_async_channel = + fl_basic_message_channel_new(messenger, noop_async_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->noop_async_channel, - core_tests_pigeon_test_host_integration_core_api_noop_async_cb, self, - nullptr); + noop_async_channel, + core_tests_pigeon_test_host_integration_core_api_noop_async_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncInt%s", - self->suffix); - self->echo_async_int_channel = fl_basic_message_channel_new( - messenger, echo_async_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_int_channel = + fl_basic_message_channel_new(messenger, echo_async_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_int_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, self, - nullptr); + echo_async_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncDouble%s", - self->suffix); - self->echo_async_double_channel = fl_basic_message_channel_new( - messenger, echo_async_double_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_double_channel = + fl_basic_message_channel_new(messenger, echo_async_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_double_channel, + echo_async_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncBool%s", - self->suffix); - self->echo_async_bool_channel = fl_basic_message_channel_new( - messenger, echo_async_bool_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_bool_channel = + fl_basic_message_channel_new(messenger, echo_async_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_bool_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, self, - nullptr); + echo_async_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncString%s", - self->suffix); - self->echo_async_string_channel = fl_basic_message_channel_new( - messenger, echo_async_string_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_string_channel = + fl_basic_message_channel_new(messenger, echo_async_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_string_channel, + echo_async_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncUint8List%s", - self->suffix); - self->echo_async_uint8_list_channel = fl_basic_message_channel_new( - messenger, echo_async_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_uint8_list_channel, + echo_async_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncObject%s", - self->suffix); - self->echo_async_object_channel = fl_basic_message_channel_new( - messenger, echo_async_object_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_object_channel = + fl_basic_message_channel_new(messenger, echo_async_object_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_object_channel, + echo_async_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncList%s", - self->suffix); - self->echo_async_list_channel = fl_basic_message_channel_new( - messenger, echo_async_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_list_channel = + fl_basic_message_channel_new(messenger, echo_async_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, self, - nullptr); + echo_async_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncMap%s", - self->suffix); - self->echo_async_map_channel = fl_basic_message_channel_new( - messenger, echo_async_map_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_map_channel = + fl_basic_message_channel_new(messenger, echo_async_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_map_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, self, - nullptr); + echo_async_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncEnum%s", - self->suffix); - self->echo_async_enum_channel = fl_basic_message_channel_new( - messenger, echo_async_enum_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_enum_channel = + fl_basic_message_channel_new(messenger, echo_async_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_enum_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, self, - nullptr); + echo_async_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* throw_async_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncError%s", - self->suffix); - self->throw_async_error_channel = fl_basic_message_channel_new( - messenger, throw_async_error_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_error_channel = + fl_basic_message_channel_new(messenger, throw_async_error_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_error_channel, + throw_async_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* throw_async_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncErrorFromVoid%s", - self->suffix); - self->throw_async_error_from_void_channel = fl_basic_message_channel_new( - messenger, throw_async_error_from_void_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_error_from_void_channel = + fl_basic_message_channel_new(messenger, + throw_async_error_from_void_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_error_from_void_channel, + throw_async_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* throw_async_flutter_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncFlutterError%s", - self->suffix); - self->throw_async_flutter_error_channel = fl_basic_message_channel_new( - messenger, throw_async_flutter_error_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_flutter_error_channel = + fl_basic_message_channel_new(messenger, + throw_async_flutter_error_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->throw_async_flutter_error_channel, + throw_async_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncAllTypes%s", - self->suffix); - self->echo_async_all_types_channel = fl_basic_message_channel_new( - messenger, echo_async_all_types_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_all_types_channel = + fl_basic_message_channel_new(messenger, echo_async_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_all_types_channel, + echo_async_all_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableAllNullableTypes%s", - self->suffix); - self->echo_async_nullable_all_nullable_types_channel = - fl_basic_message_channel_new( - messenger, echo_async_nullable_all_nullable_types_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_async_nullable_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, echo_async_nullable_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_all_nullable_types_channel, + echo_async_nullable_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_all_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests." "HostIntegrationCoreApi." "echoAsyncNullableAllNullableTypesWithoutRecursion%s", - self->suffix); - self->echo_async_nullable_all_nullable_types_without_recursion_channel = - fl_basic_message_channel_new( - messenger, - echo_async_nullable_all_nullable_types_without_recursion_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_async_nullable_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + echo_async_nullable_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_all_nullable_types_without_recursion_channel, + echo_async_nullable_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableInt%s", - self->suffix); - self->echo_async_nullable_int_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_int_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_int_channel, + echo_async_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableDouble%s", - self->suffix); - self->echo_async_nullable_double_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_double_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_double_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_double_channel, + echo_async_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableBool%s", - self->suffix); - self->echo_async_nullable_bool_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_bool_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_bool_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_bool_channel, + echo_async_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableString%s", - self->suffix); - self->echo_async_nullable_string_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_string_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_string_channel, + echo_async_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableUint8List%s", - self->suffix); - self->echo_async_nullable_uint8_list_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_uint8_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_uint8_list_channel, + echo_async_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableObject%s", - self->suffix); - self->echo_async_nullable_object_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_object_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_object_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_object_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_object_channel, + echo_async_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableList%s", - self->suffix); - self->echo_async_nullable_list_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_list_channel, + echo_async_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableMap%s", - self->suffix); - self->echo_async_nullable_map_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_map_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_map_channel, + echo_async_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* echo_async_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableEnum%s", - self->suffix); - self->echo_async_nullable_enum_channel = fl_basic_message_channel_new( - messenger, echo_async_nullable_enum_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_enum_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_async_nullable_enum_channel, + echo_async_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_noop_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterNoop%s", - self->suffix); - self->call_flutter_noop_channel = fl_basic_message_channel_new( - messenger, call_flutter_noop_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_noop_channel = + fl_basic_message_channel_new(messenger, call_flutter_noop_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_noop_channel, + call_flutter_noop_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_throw_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterThrowError%s", - self->suffix); - self->call_flutter_throw_error_channel = fl_basic_message_channel_new( - messenger, call_flutter_throw_error_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_throw_error_channel = + fl_basic_message_channel_new(messenger, + call_flutter_throw_error_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_throw_error_channel, + call_flutter_throw_error_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_throw_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterThrowErrorFromVoid%s", - self->suffix); - self->call_flutter_throw_error_from_void_channel = + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_throw_error_from_void_channel = fl_basic_message_channel_new( messenger, call_flutter_throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_throw_error_from_void_channel, + call_flutter_throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoAllTypes%s", - self->suffix); - self->call_flutter_echo_all_types_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_all_types_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_all_types_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_all_types_channel, + call_flutter_echo_all_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoAllNullableTypes%s", - self->suffix); - self->call_flutter_echo_all_nullable_types_channel = - fl_basic_message_channel_new( - messenger, call_flutter_echo_all_nullable_types_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_all_nullable_types_channel, + call_flutter_echo_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_send_multiple_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterSendMultipleNullableTypes%s", - self->suffix); - self->call_flutter_send_multiple_nullable_types_channel = - fl_basic_message_channel_new( - messenger, call_flutter_send_multiple_nullable_types_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_send_multiple_nullable_types_channel = + fl_basic_message_channel_new( + messenger, call_flutter_send_multiple_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_send_multiple_nullable_types_channel, + call_flutter_send_multiple_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_all_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests." "HostIntegrationCoreApi." "callFlutterEchoAllNullableTypesWithoutRecursion%s", - self->suffix); - self->call_flutter_echo_all_nullable_types_without_recursion_channel = - fl_basic_message_channel_new( - messenger, - call_flutter_echo_all_nullable_types_without_recursion_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + call_flutter_echo_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_all_nullable_types_without_recursion_channel, + call_flutter_echo_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_send_multiple_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests." "HostIntegrationCoreApi." "callFlutterSendMultipleNullableTypesWithoutRecursion%s", - self->suffix); - self->call_flutter_send_multiple_nullable_types_without_recursion_channel = - fl_basic_message_channel_new( - messenger, - call_flutter_send_multiple_nullable_types_without_recursion_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + call_flutter_send_multiple_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_send_multiple_nullable_types_without_recursion_channel, + call_flutter_send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoBool%s", - self->suffix); - self->call_flutter_echo_bool_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_bool_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_bool_channel, + call_flutter_echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoInt%s", - self->suffix); - self->call_flutter_echo_int_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_int_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_int_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_int_channel, + call_flutter_echo_int_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoDouble%s", - self->suffix); - self->call_flutter_echo_double_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_double_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_double_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_double_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_double_channel, + call_flutter_echo_double_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoString%s", - self->suffix); - self->call_flutter_echo_string_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_string_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_string_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_string_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_string_channel, + call_flutter_echo_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoUint8List%s", - self->suffix); - self->call_flutter_echo_uint8_list_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_uint8_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_uint8_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_uint8_list_channel, + call_flutter_echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoList%s", - self->suffix); - self->call_flutter_echo_list_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_list_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_list_channel, + call_flutter_echo_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoMap%s", - self->suffix); - self->call_flutter_echo_map_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_map_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_map_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_map_channel, + call_flutter_echo_map_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoEnum%s", - self->suffix); - self->call_flutter_echo_enum_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_enum_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_enum_channel, + call_flutter_echo_enum_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableBool%s", - self->suffix); - self->call_flutter_echo_nullable_bool_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_bool_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_bool_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_bool_channel, + call_flutter_echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableInt%s", - self->suffix); - self->call_flutter_echo_nullable_int_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_int_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_int_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_int_channel, + call_flutter_echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableDouble%s", - self->suffix); - self->call_flutter_echo_nullable_double_channel = + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_double_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_double_channel, + call_flutter_echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableString%s", - self->suffix); - self->call_flutter_echo_nullable_string_channel = + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_string_channel = fl_basic_message_channel_new( messenger, call_flutter_echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_string_channel, + call_flutter_echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableUint8List%s", - self->suffix); - self->call_flutter_echo_nullable_uint8_list_channel = - fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_uint8_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_nullable_uint8_list_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_uint8_list_channel, + call_flutter_echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableList%s", - self->suffix); - self->call_flutter_echo_nullable_list_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_list_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_list_channel, + call_flutter_echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableMap%s", - self->suffix); - self->call_flutter_echo_nullable_map_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_map_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_map_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_map_channel, + call_flutter_echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_echo_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoNullableEnum%s", - self->suffix); - self->call_flutter_echo_nullable_enum_channel = fl_basic_message_channel_new( - messenger, call_flutter_echo_nullable_enum_channel_name, - FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_enum_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_echo_nullable_enum_channel, + call_flutter_echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, - self, nullptr); + g_object_ref(self), g_object_unref); g_autofree gchar* call_flutter_small_api_echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterSmallApiEchoString%s", - self->suffix); - self->call_flutter_small_api_echo_string_channel = + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_small_api_echo_string_channel = fl_basic_message_channel_new( messenger, call_flutter_small_api_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->call_flutter_small_api_echo_string_channel, + call_flutter_small_api_echo_string_channel, core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_cb, - self, nullptr); + g_object_ref(self), g_object_unref); return self; } void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse) response = core_tests_pigeon_test_host_integration_core_api_noop_async_response_new(); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->noop_async_channel, response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "noopAsync", error->message); } @@ -11276,15 +11364,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse) response = core_tests_pigeon_test_host_integration_core_api_noop_async_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->noop_async_channel, response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "noopAsync", error->message); } @@ -11292,16 +11381,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncInt", error->message); } @@ -11309,16 +11398,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncIntResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_int_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncInt", error->message); } @@ -11326,15 +11415,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_i void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_double_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncDouble", error->message); } @@ -11342,16 +11432,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_double_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_double_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncDouble", error->message); } @@ -11359,16 +11449,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_d void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncBool", error->message); } @@ -11376,16 +11466,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncBoolResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_bool_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncBool", error->message); } @@ -11393,16 +11483,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_b void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_string_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncString", error->message); } @@ -11410,16 +11500,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncStringResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_string_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_string_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncString", error->message); } @@ -11427,16 +11517,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new( return_value, return_value_length); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_uint8_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncUint8List", error->message); } @@ -11444,16 +11534,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_l void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_uint8_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncUint8List", error->message); } @@ -11461,16 +11551,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_u void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_object_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncObject", error->message); } @@ -11478,16 +11568,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncObjectResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_object_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_object_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncObject", error->message); } @@ -11495,16 +11585,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_o void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncList", error->message); } @@ -11512,16 +11602,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncList", error->message); } @@ -11529,16 +11619,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_l void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncMap", error->message); } @@ -11546,16 +11636,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncMapResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_map_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncMap", error->message); } @@ -11563,16 +11653,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_m void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncEnum", error->message); } @@ -11580,16 +11670,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncEnumResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_enum_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncEnum", error->message); } @@ -11597,16 +11687,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_e void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse) response = core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->throw_async_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncError", error->message); } @@ -11614,16 +11704,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorResponse) response = core_tests_pigeon_test_host_integration_core_api_throw_async_error_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->throw_async_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncError", error->message); } @@ -11631,15 +11721,15 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse) response = core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new(); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->throw_async_error_from_void_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncErrorFromVoid", error->message); } @@ -11647,17 +11737,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse) response = core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->throw_async_error_from_void_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncErrorFromVoid", error->message); } @@ -11665,7 +11755,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse) @@ -11673,9 +11763,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutte core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->throw_async_flutter_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncFlutterError", error->message); } @@ -11683,17 +11773,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutte void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncFlutterErrorResponse) response = core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->throw_async_flutter_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "throwAsyncFlutterError", error->message); } @@ -11701,16 +11791,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_all_types_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncAllTypes", error->message); } @@ -11718,16 +11808,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_typ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncAllTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_all_types_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncAllTypes", error->message); } @@ -11735,7 +11825,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_a void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse) @@ -11743,9 +11833,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_all_nullable_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableAllNullableTypes", error->message); } @@ -11753,17 +11843,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_all_nullable_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableAllNullableTypes", error->message); } @@ -11771,7 +11861,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse) @@ -11779,9 +11869,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_all_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableAllNullableTypesWithoutRecursion", error->message); @@ -11790,17 +11880,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableAllNullableTypesWithoutRecursionResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_all_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableAllNullableTypesWithoutRecursion", error->message); @@ -11809,7 +11899,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse) @@ -11817,9 +11907,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableInt", error->message); } @@ -11827,17 +11917,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableIntResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableInt", error->message); } @@ -11845,7 +11935,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse) @@ -11853,9 +11943,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_double_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableDouble", error->message); } @@ -11863,17 +11953,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_double_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableDouble", error->message); } @@ -11881,7 +11971,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse) @@ -11889,9 +11979,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableBool", error->message); } @@ -11899,17 +11989,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableBoolResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableBool", error->message); } @@ -11917,7 +12007,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse) @@ -11925,9 +12015,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableString", error->message); } @@ -11935,17 +12025,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableStringResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableString", error->message); } @@ -11953,7 +12043,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse) @@ -11961,9 +12051,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new( return_value, return_value_length); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableUint8List", error->message); } @@ -11971,17 +12061,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableUint8List", error->message); } @@ -11989,7 +12079,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse) @@ -11997,9 +12087,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_object_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableObject", error->message); } @@ -12007,17 +12097,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableObjectResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->echo_async_nullable_object_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableObject", error->message); } @@ -12025,7 +12115,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse) @@ -12033,9 +12123,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableList", error->message); } @@ -12043,17 +12133,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableListResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableList", error->message); } @@ -12061,7 +12151,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse) @@ -12069,9 +12159,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableMap", error->message); } @@ -12079,17 +12169,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableMapResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableMap", error->message); } @@ -12097,7 +12187,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse) @@ -12105,9 +12195,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableEnum", error->message); } @@ -12115,17 +12205,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncNullableEnumResponse) response = core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_async_nullable_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "echoAsyncNullableEnum", error->message); } @@ -12133,14 +12223,14 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new(); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_noop_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterNoop", error->message); } @@ -12148,16 +12238,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_noop_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterNoop", error->message); } @@ -12165,7 +12255,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse) @@ -12173,9 +12263,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_throw_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterThrowError", error->message); } @@ -12183,17 +12273,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_throw_error_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterThrowError", error->message); } @@ -12201,15 +12291,15 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new(); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_throw_error_from_void_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterThrowErrorFromVoid", error->message); } @@ -12217,17 +12307,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_throw_error_from_void_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterThrowErrorFromVoid", error->message); } @@ -12235,7 +12325,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse) @@ -12243,9 +12333,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllTypes", error->message); } @@ -12253,17 +12343,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllTypes", error->message); } @@ -12271,7 +12361,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse) @@ -12279,9 +12369,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_nullable_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllNullableTypes", error->message); } @@ -12289,17 +12379,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_nullable_types_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllNullableTypes", error->message); } @@ -12307,7 +12397,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse) @@ -12315,9 +12405,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_send_multiple_nullable_types_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSendMultipleNullableTypes", error->message); } @@ -12325,17 +12415,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_send_multiple_nullable_types_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSendMultipleNullableTypes", error->message); } @@ -12343,7 +12433,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse) @@ -12351,9 +12441,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllNullableTypesWithoutRecursion", error->message); @@ -12362,17 +12452,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoAllNullableTypesWithoutRecursionResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_all_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoAllNullableTypesWithoutRecursion", error->message); @@ -12381,7 +12471,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse) @@ -12389,9 +12479,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_send_multiple_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSendMultipleNullableTypesWithoutRecursion", error->message); @@ -12400,17 +12490,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSendMultipleNullableTypesWithoutRecursionResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_send_multiple_nullable_types_without_recursion_channel, - response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSendMultipleNullableTypesWithoutRecursion", error->message); @@ -12419,7 +12509,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse) @@ -12427,9 +12517,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoBool", error->message); } @@ -12437,17 +12527,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoBoolResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_bool_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoBool", error->message); } @@ -12455,16 +12545,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoInt", error->message); } @@ -12472,16 +12562,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_int_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoInt", error->message); } @@ -12489,16 +12579,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, double return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_double_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoDouble", error->message); } @@ -12506,17 +12597,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_double_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoDouble", error->message); } @@ -12524,7 +12615,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse) @@ -12532,9 +12623,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_string_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoString", error->message); } @@ -12542,17 +12633,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoStringResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_string_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoString", error->message); } @@ -12560,7 +12651,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse) @@ -12568,9 +12659,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new( return_value, return_value_length); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoUint8List", error->message); } @@ -12578,17 +12669,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoUint8List", error->message); } @@ -12596,7 +12687,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse) @@ -12604,9 +12695,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoList", error->message); } @@ -12614,17 +12705,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_list_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoList", error->message); } @@ -12632,16 +12723,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoMap", error->message); } @@ -12649,16 +12740,16 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_map_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoMap", error->message); } @@ -12666,7 +12757,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse) @@ -12674,9 +12765,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoEnum", error->message); } @@ -12684,17 +12775,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoEnumResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->call_flutter_echo_enum_channel, - response_handle, response->value, - &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoEnum", error->message); } @@ -12702,7 +12793,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse) @@ -12710,9 +12801,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_bool_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableBool", error->message); } @@ -12720,17 +12811,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableBoolResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_bool_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableBool", error->message); } @@ -12738,7 +12829,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse) @@ -12746,9 +12837,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_int_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableInt", error->message); } @@ -12756,17 +12847,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableIntResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_int_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableInt", error->message); } @@ -12774,7 +12865,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse) @@ -12782,9 +12873,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_double_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableDouble", error->message); } @@ -12792,17 +12883,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableDoubleResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_double_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableDouble", error->message); } @@ -12810,7 +12901,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse) @@ -12818,9 +12909,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableString", error->message); } @@ -12828,17 +12919,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableStringResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableString", error->message); } @@ -12846,7 +12937,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse) @@ -12854,9 +12945,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new( return_value, return_value_length); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableUint8List", error->message); } @@ -12864,17 +12955,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableUint8ListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_uint8_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableUint8List", error->message); } @@ -12882,7 +12973,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) @@ -12890,9 +12981,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableList", error->message); } @@ -12900,17 +12991,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableListResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_list_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableList", error->message); } @@ -12918,7 +13009,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) @@ -12926,9 +13017,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_map_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableMap", error->message); } @@ -12936,17 +13027,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableMapResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_map_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableMap", error->message); } @@ -12954,7 +13045,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) @@ -12962,9 +13053,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_enum_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableEnum", error->message); } @@ -12972,17 +13063,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoNullableEnumResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_echo_nullable_enum_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterEchoNullableEnum", error->message); } @@ -12990,7 +13081,7 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) @@ -12998,9 +13089,9 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new( return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_small_api_echo_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSmallApiEchoString", error->message); } @@ -13008,17 +13099,17 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterSmallApiEchoStringResponse) response = core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->call_flutter_small_api_echo_string_channel, response_handle, - response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", "callFlutterSmallApiEchoString", error->message); } @@ -17425,13 +17516,9 @@ core_tests_pigeon_test_host_trivial_api_noop_response_new_error( struct _CoreTestsPigeonTestHostTrivialApi { GObject parent_instance; - FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostTrivialApiVTable* vtable; - gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; - - FlBasicMessageChannel* noop_channel; }; G_DEFINE_TYPE(CoreTestsPigeonTestHostTrivialApi, @@ -17465,14 +17552,10 @@ static void core_tests_pigeon_test_host_trivial_api_noop_cb( static void core_tests_pigeon_test_host_trivial_api_dispose(GObject* object) { CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(object); - g_clear_object(&self->messenger); - g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } self->user_data = nullptr; - - g_clear_object(&self->noop_channel); G_OBJECT_CLASS(core_tests_pigeon_test_host_trivial_api_parent_class) ->dispose(object); } @@ -17493,8 +17576,7 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( CoreTestsPigeonTestHostTrivialApi* self = CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); - self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = + g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; @@ -17504,13 +17586,58 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( core_tests_pigeon_test_message_codec_new(); g_autofree gchar* noop_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop%s", - self->suffix); - self->noop_channel = fl_basic_message_channel_new( + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_channel = fl_basic_message_channel_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->noop_channel, core_tests_pigeon_test_host_trivial_api_noop_cb, self, - nullptr); + noop_channel, core_tests_pigeon_test_host_trivial_api_noop_cb, + g_object_ref(self), g_object_unref); + + return self; +} + +struct _CoreTestsPigeonTestHostSmallApiResponseHandle { + GObject parent_instance; + + FlBasicMessageChannel* channel; + FlBasicMessageChannelResponseHandle* response_handle; +}; + +G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApiResponseHandle, + core_tests_pigeon_test_host_small_api_response_handle, + G_TYPE_OBJECT) + +static void core_tests_pigeon_test_host_small_api_response_handle_dispose( + GObject* object) { + CoreTestsPigeonTestHostSmallApiResponseHandle* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_RESPONSE_HANDLE(object); + g_clear_object(&self->channel); + g_clear_object(&self->response_handle); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_small_api_response_handle_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_small_api_response_handle_init( + CoreTestsPigeonTestHostSmallApiResponseHandle* self) {} +static void core_tests_pigeon_test_host_small_api_response_handle_class_init( + CoreTestsPigeonTestHostSmallApiResponseHandleClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_small_api_response_handle_dispose; +} + +static CoreTestsPigeonTestHostSmallApiResponseHandle* +core_tests_pigeon_test_host_small_api_response_handle_new( + FlBasicMessageChannel* channel, + FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostSmallApiResponseHandle* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API_RESPONSE_HANDLE(g_object_new( + core_tests_pigeon_test_host_small_api_response_handle_get_type(), + nullptr)); + self->channel = FL_BASIC_MESSAGE_CHANNEL(g_object_ref(channel)); + self->response_handle = + FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle)); return self; } @@ -17640,14 +17767,9 @@ core_tests_pigeon_test_host_small_api_void_void_response_new_error( struct _CoreTestsPigeonTestHostSmallApi { GObject parent_instance; - FlBinaryMessenger* messenger; const CoreTestsPigeonTestHostSmallApiVTable* vtable; - gchar* suffix; gpointer user_data; GDestroyNotify user_data_free_func; - - FlBasicMessageChannel* echo_channel; - FlBasicMessageChannel* void_void_channel; }; G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApi, @@ -17665,7 +17787,10 @@ static void core_tests_pigeon_test_host_small_api_echo_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); - self->vtable->echo(self, a_string, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostSmallApiResponseHandle) handle = + core_tests_pigeon_test_host_small_api_response_handle_new( + channel, response_handle); + self->vtable->echo(self, a_string, handle, self->user_data); } static void core_tests_pigeon_test_host_small_api_void_void_cb( @@ -17678,21 +17803,19 @@ static void core_tests_pigeon_test_host_small_api_void_void_cb( return; } - self->vtable->void_void(self, response_handle, self->user_data); + g_autoptr(CoreTestsPigeonTestHostSmallApiResponseHandle) handle = + core_tests_pigeon_test_host_small_api_response_handle_new( + channel, response_handle); + self->vtable->void_void(self, handle, self->user_data); } static void core_tests_pigeon_test_host_small_api_dispose(GObject* object) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(object); - g_clear_object(&self->messenger); - g_clear_pointer(&self->suffix, g_free); if (self->user_data != nullptr) { self->user_data_free_func(self->user_data); } self->user_data = nullptr; - - g_clear_object(&self->echo_channel); - g_clear_object(&self->void_void_channel); G_OBJECT_CLASS(core_tests_pigeon_test_host_small_api_parent_class) ->dispose(object); } @@ -17712,8 +17835,7 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( GDestroyNotify user_data_free_func) { CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); - self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger)); - self->suffix = + g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); self->vtable = vtable; self->user_data = user_data; @@ -17723,32 +17845,34 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( core_tests_pigeon_test_message_codec_new(); g_autofree gchar* echo_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo%s", - self->suffix); - self->echo_channel = fl_basic_message_channel_new( + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_channel = fl_basic_message_channel_new( messenger, echo_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, self, - nullptr); + echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, + g_object_ref(self), g_object_unref); g_autofree gchar* void_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid%s", - self->suffix); - self->void_void_channel = fl_basic_message_channel_new( - messenger, void_void_channel_name, FL_MESSAGE_CODEC(codec)); + dot_suffix); + g_autoptr(FlBasicMessageChannel) void_void_channel = + fl_basic_message_channel_new(messenger, void_void_channel_name, + FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - self->void_void_channel, - core_tests_pigeon_test_host_small_api_void_void_cb, self, nullptr); + void_void_channel, core_tests_pigeon_test_host_small_api_void_void_cb, + g_object_ref(self), g_object_unref); return self; } void core_tests_pigeon_test_host_small_api_respond_echo( CoreTestsPigeonTestHostSmallApi* self, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = core_tests_pigeon_test_host_small_api_echo_response_new(return_value); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_channel, response_handle, + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "echo", error->message); @@ -17757,13 +17881,14 @@ void core_tests_pigeon_test_host_small_api_respond_echo( void core_tests_pigeon_test_host_small_api_respond_error_echo( CoreTestsPigeonTestHostSmallApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = core_tests_pigeon_test_host_small_api_echo_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond(self->echo_channel, response_handle, + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "echo", error->message); @@ -17772,12 +17897,13 @@ void core_tests_pigeon_test_host_small_api_respond_error_echo( void core_tests_pigeon_test_host_small_api_respond_void_void( CoreTestsPigeonTestHostSmallApi* self, - FlBasicMessageChannelResponseHandle* response_handle) { + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle) { g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = core_tests_pigeon_test_host_small_api_void_void_response_new(); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->void_void_channel, response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "voidVoid", error->message); } @@ -17785,14 +17911,15 @@ void core_tests_pigeon_test_host_small_api_respond_void_void( void core_tests_pigeon_test_host_small_api_respond_error_void_void( CoreTestsPigeonTestHostSmallApi* self, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = core_tests_pigeon_test_host_small_api_void_void_response_new_error( code, message, details); g_autoptr(GError) error = nullptr; - if (!fl_basic_message_channel_respond( - self->void_void_channel, response_handle, response->value, &error)) { + if (!fl_basic_message_channel_respond(response_handle->channel, + response_handle->response_handle, + response->value, &error)) { g_warning("Failed to send response to %s.%s: %s", "HostSmallApi", "voidVoid", error->message); } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index abf60e0e00dc..cc9c9167a882 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -983,6 +983,11 @@ CoreTestsPigeonTestTestMessage* core_tests_pigeon_test_test_message_new( FlValue* core_tests_pigeon_test_test_message_get_test_list( CoreTestsPigeonTestTestMessage* object); +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle, + core_tests_pigeon_test_host_integration_core_api_response_handle, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API_RESPONSE_HANDLE, GObject) + G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse, core_tests_pigeon_test_host_integration_core_api_noop_response, @@ -2260,176 +2265,222 @@ typedef struct { *echo_named_nullable_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_nullable_string, gpointer user_data); - void (*noop_async)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); - void (*echo_async_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t an_int, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); + void (*noop_async)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_int)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_double)( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gboolean a_bool, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_bool)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_uint8_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_object)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); - void (*echo_async_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* list, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); - void (*echo_async_map)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); - void (*echo_async_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAnEnum an_enum, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_list)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_map)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); + void (*echo_async_enum)( + CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum an_enum, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*throw_async_error)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*throw_async_error_from_void)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*throw_async_flutter_error)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_all_types)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_all_nullable_types)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_all_nullable_types_without_recursion)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_int)( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_double)( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_bool)( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_uint8_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_object)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_map)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*echo_async_nullable_enum)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_noop)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_throw_error)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_throw_error_from_void)( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_all_types)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_all_nullable_types)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_send_multiple_nullable_types)( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_all_nullable_types_without_recursion)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_send_multiple_nullable_types_without_recursion)( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_bool)( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_int)( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_double)( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_uint8_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, - size_t list_length, FlBasicMessageChannelResponseHandle* response_handle, + size_t list_length, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_map)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_enum)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_bool)( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_int)( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_double)( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_uint8_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, - size_t list_length, FlBasicMessageChannelResponseHandle* response_handle, + size_t list_length, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_list)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_map)( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_echo_nullable_enum)( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); void (*call_flutter_small_api_echo_string)( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data); } CoreTestsPigeonTestHostIntegrationCoreApiVTable; /** @@ -2455,18 +2506,18 @@ core_tests_pigeon_test_host_integration_core_api_new( /** * core_tests_pigeon_test_host_integration_core_api_respond_noop_async: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.noopAsync. */ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2475,25 +2526,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + int64_t return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2502,25 +2554,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, double return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2529,26 +2582,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2557,26 +2610,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncString. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2585,13 +2638,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value * or %NULL to ignore. @@ -2600,13 +2653,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2615,26 +2668,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_l */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2643,26 +2696,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncList. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2671,26 +2724,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2699,26 +2752,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2727,26 +2780,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.throwAsyncError. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2755,24 +2808,24 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.throwAsyncErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2781,26 +2834,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.throwAsyncFlutterError. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2809,26 +2862,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutte */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2837,26 +2890,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_typ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2866,13 +2919,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to @@ -2880,13 +2933,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2896,26 +2949,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2924,25 +2977,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, double* return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2951,26 +3005,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -2979,26 +3033,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3007,13 +3061,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value * or %NULL to ignore. @@ -3022,13 +3076,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3037,26 +3091,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3065,26 +3119,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3093,26 +3147,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3121,26 +3175,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3149,24 +3203,24 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.callFlutterNoop. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3175,26 +3229,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterThrowError. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3203,24 +3257,24 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.callFlutterThrowErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3230,26 +3284,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3258,26 +3312,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3287,26 +3341,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3316,13 +3370,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to @@ -3330,13 +3384,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3346,13 +3400,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to @@ -3360,13 +3414,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3376,26 +3430,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3404,25 +3458,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, int64_t return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + int64_t return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3431,25 +3486,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, double return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3458,26 +3514,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3486,13 +3542,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value * or %NULL to ignore. @@ -3501,13 +3557,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3516,26 +3572,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoList. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3544,26 +3600,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3572,26 +3628,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3600,26 +3656,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3628,26 +3684,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3656,25 +3712,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, double* return_value); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + double* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3684,26 +3741,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3713,13 +3770,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value * or %NULL to ignore. @@ -3728,13 +3785,13 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3744,26 +3801,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3772,26 +3829,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3800,26 +3857,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3828,26 +3885,26 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterSmallApiEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string: * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -3857,8 +3914,8 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestFlutterIntegrationCoreApiNoopResponse, @@ -6721,6 +6778,11 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApiResponseHandle, + core_tests_pigeon_test_host_small_api_response_handle, + CORE_TESTS_PIGEON_TEST, HOST_SMALL_API_RESPONSE_HANDLE, + GObject) + G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, core_tests_pigeon_test_host_small_api, CORE_TESTS_PIGEON_TEST, HOST_SMALL_API, GObject) @@ -6733,11 +6795,12 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, */ typedef struct { void (*echo)(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data); - void (*void_void)(CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); + void (*void_void)( + CoreTestsPigeonTestHostSmallApi* api, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + gpointer user_data); } CoreTestsPigeonTestHostSmallApiVTable; /** @@ -6762,20 +6825,20 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( /** * core_tests_pigeon_test_host_small_api_respond_echo: * @api: a #CoreTestsPigeonTestHostSmallApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostSmallApi.echo. */ void core_tests_pigeon_test_host_small_api_respond_echo( CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_small_api_respond_error_echo: * @api: a #CoreTestsPigeonTestHostSmallApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -6784,24 +6847,24 @@ void core_tests_pigeon_test_host_small_api_respond_echo( */ void core_tests_pigeon_test_host_small_api_respond_error_echo( CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_small_api_respond_void_void: * @api: a #CoreTestsPigeonTestHostSmallApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * * Responds to HostSmallApi.voidVoid. */ void core_tests_pigeon_test_host_small_api_respond_void_void( CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle); + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_small_api_respond_error_void_void: * @api: a #CoreTestsPigeonTestHostSmallApi. - * @response_handle: a #FlBasicMessageChannelResponseHandle. + * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @code: error code. * @message: error message. * @details: (allow-none): error details or %NULL. @@ -6810,8 +6873,8 @@ void core_tests_pigeon_test_host_small_api_respond_void_void( */ void core_tests_pigeon_test_host_small_api_respond_error_void_void( CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle, const gchar* code, - const gchar* message, FlValue* details); + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + const gchar* code, const gchar* message, FlValue* details); G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestFlutterSmallApiEchoWrappedListResponse, diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 7f1f0991d480..eda1b269fc69 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -33,15 +33,17 @@ G_DEFINE_TYPE(TestPlugin, test_plugin, G_TYPE_OBJECT) typedef struct { TestPlugin* self; - FlBasicMessageChannelResponseHandle* response_handle; + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle; } CallbackData; static CallbackData* callback_data_new( - TestPlugin* self, FlBasicMessageChannelResponseHandle* response_handle) { + TestPlugin* self, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { CallbackData* data = g_new0(CallbackData, 1); data->self = TEST_PLUGIN(g_object_ref(self)); data->response_handle = - FL_BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE(g_object_ref(response_handle)); + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_RESPONSE_HANDLE( + g_object_ref(response_handle)); return data; } @@ -332,38 +334,42 @@ echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, a_nullable_string); } -static void noop_async(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void noop_async( + CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_noop_async( api, response_handle); } -static void echo_async_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t an_int, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void echo_async_int( + CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( api, response_handle, an_int); } static void echo_async_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( api, response_handle, a_double); } static void echo_async_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( api, response_handle, a_bool); } static void echo_async_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( api, response_handle, a_string); } @@ -371,29 +377,32 @@ static void echo_async_string( static void echo_async_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( api, response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( api, response_handle, an_object); } static void echo_async_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( api, response_handle, a_list); } -static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void echo_async_map( + CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( api, response_handle, a_map); } @@ -401,14 +410,16 @@ static void echo_async_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, static void echo_async_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( api, response_handle, an_enum); } static void throw_async_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( api, response_handle, "code", "message", details); @@ -416,7 +427,8 @@ static void throw_async_error( static void throw_async_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( api, response_handle, "code", "message", details); @@ -424,7 +436,8 @@ static void throw_async_error_from_void( static void throw_async_flutter_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( api, response_handle, "code", "message", details); @@ -433,7 +446,8 @@ static void throw_async_flutter_error( static void echo_async_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( api, response_handle, everything); } @@ -441,7 +455,8 @@ static void echo_async_all_types( static void echo_async_nullable_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( api, response_handle, everything); } @@ -449,35 +464,40 @@ static void echo_async_nullable_all_nullable_types( static void echo_async_nullable_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( api, response_handle, everything); } static void echo_async_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( api, response_handle, an_int); } static void echo_async_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( api, response_handle, a_double); } static void echo_async_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( api, response_handle, a_bool); } static void echo_async_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( api, response_handle, a_string); } @@ -485,28 +505,32 @@ static void echo_async_nullable_string( static void echo_async_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( api, response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_nullable_object( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( api, response_handle, an_object); } static void echo_async_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( api, response_handle, a_list); } static void echo_async_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( api, response_handle, a_map); } @@ -514,7 +538,8 @@ static void echo_async_nullable_map( static void echo_async_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( api, response_handle, an_enum); } @@ -552,7 +577,8 @@ static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { static void call_flutter_noop( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_noop( @@ -597,7 +623,8 @@ static void throw_error_cb(GObject* object, GAsyncResult* result, static void call_flutter_throw_error( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_throw_error( @@ -641,7 +668,8 @@ static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, static void call_flutter_throw_error_from_void( CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( @@ -687,7 +715,8 @@ static void echo_all_types_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_all_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( @@ -734,7 +763,8 @@ static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_all_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types( @@ -782,7 +812,8 @@ static void send_multiple_nullable_types_cb(GObject* object, static void call_flutter_send_multiple_nullable_types( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types( @@ -831,7 +862,8 @@ static void echo_all_nullable_types_without_recursion_cb(GObject* object, static void call_flutter_echo_all_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion( @@ -879,7 +911,8 @@ static void send_multiple_nullable_types_without_recursion_cb( static void call_flutter_send_multiple_nullable_types_without_recursion( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion( @@ -926,7 +959,8 @@ static void echo_bool_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_bool( @@ -971,7 +1005,8 @@ static void echo_int_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_int( @@ -1016,7 +1051,8 @@ static void echo_double_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_double( @@ -1061,7 +1097,8 @@ static void echo_string_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_string( @@ -1109,7 +1146,8 @@ static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, - size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, + size_t a_list_length, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1155,7 +1193,8 @@ static void echo_list_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_list( @@ -1200,7 +1239,8 @@ static void echo_map_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_map( @@ -1246,7 +1286,8 @@ static void echo_enum_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_enum( @@ -1292,7 +1333,8 @@ static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_bool( CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( @@ -1337,7 +1379,8 @@ static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_int( CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( @@ -1383,7 +1426,8 @@ static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_double( CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( @@ -1429,7 +1473,8 @@ static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( @@ -1478,7 +1523,8 @@ static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_uint8_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, - size_t a_list_length, FlBasicMessageChannelResponseHandle* response_handle, + size_t a_list_length, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1525,7 +1571,8 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_list( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( @@ -1570,7 +1617,8 @@ static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_map( CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( @@ -1617,7 +1665,8 @@ static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, static void call_flutter_echo_nullable_enum( CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( @@ -1695,7 +1744,8 @@ static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, static void call_flutter_small_api_echo_string( CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, + gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); core_tests_pigeon_test_flutter_small_api_echo_string( @@ -1800,15 +1850,16 @@ static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { .call_flutter_small_api_echo_string = call_flutter_small_api_echo_string}; static void echo(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, - FlBasicMessageChannelResponseHandle* response_handle, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_small_api_respond_echo(api, response_handle, a_string); } -static void void_void(CoreTestsPigeonTestHostSmallApi* api, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data) { +static void void_void( + CoreTestsPigeonTestHostSmallApi* api, + CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, + gpointer user_data) { core_tests_pigeon_test_host_small_api_respond_void_void(api, response_handle); } From c7b4221e50f6e2183042d073d4335c208a81bb79 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 2 Jul 2024 13:23:20 +1200 Subject: [PATCH 121/127] Fix code snippet --- packages/pigeon/example/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 749dfa40466e..30da9dd9f2c0 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -219,7 +219,8 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( static void handle_send_message( PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, - PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gpointer user_data) { + PigeonExamplePackageExampleHostApiResponseHandle* response_handle, + gpointer user_data) { PigeonExamplePackageCode code = pigeon_example_package_message_data_get_code(message); if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { From 8323c6c73e6c7bc2cf09bb9a892a8dfe7d19ab8e Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 2 Jul 2024 14:32:38 +1200 Subject: [PATCH 122/127] Replace host API object with a _set_method_handlers function --- packages/pigeon/example/README.md | 12 +- .../pigeon/example/app/linux/messages.g.cc | 115 +- .../pigeon/example/app/linux/messages.g.h | 38 +- .../example/app/linux/my_application.cc | 18 +- packages/pigeon/lib/gobject_generator.dart | 111 +- .../linux/pigeon/core_tests.gen.cc | 1823 ++++++++++++----- .../test_plugin/linux/pigeon/core_tests.gen.h | 538 ++--- .../linux/test/multiple_arity_test.cc | 9 +- .../linux/test/nullable_returns_test.cc | 39 +- .../test_plugin/linux/test/primitive_test.cc | 63 +- .../test_plugin/linux/test_plugin.cc | 468 ++--- 11 files changed, 1883 insertions(+), 1351 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 30da9dd9f2c0..03088ab46b50 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -198,14 +198,13 @@ class PigeonApiImplementation : public ExampleHostApi { ```c++ static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* -handle_get_host_language(PigeonExamplePackageExampleHostApi* object, - gpointer user_data) { +handle_get_host_language(gpointer user_data) { return pigeon_example_package_example_host_api_get_host_language_response_new( "C++"); } static PigeonExamplePackageExampleHostApiAddResponse* handle_add( - PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, + int64_t a, int64_t b, gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); @@ -217,7 +216,6 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( } static void handle_send_message( - PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gpointer user_data) { @@ -226,12 +224,12 @@ static void handle_send_message( if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); pigeon_example_package_example_host_api_respond_error_send_message( - object, response_handle, "code", "message", details); + response_handle, "code", "message", details); return; } - pigeon_example_package_example_host_api_respond_send_message( - object, response_handle, TRUE); + pigeon_example_package_example_host_api_respond_send_message(response_handle, + TRUE); } static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { diff --git a/packages/pigeon/example/app/linux/messages.g.cc b/packages/pigeon/example/app/linux/messages.g.cc index cb5700a61672..2d9ede7877d9 100644 --- a/packages/pigeon/example/app/linux/messages.g.cc +++ b/packages/pigeon/example/app/linux/messages.g.cc @@ -468,6 +468,10 @@ pigeon_example_package_example_host_api_send_message_response_new_error( return self; } +G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, + pigeon_example_package_example_host_api, + PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API, GObject) + struct _PigeonExamplePackageExampleHostApi { GObject parent_instance; @@ -479,6 +483,39 @@ struct _PigeonExamplePackageExampleHostApi { G_DEFINE_TYPE(PigeonExamplePackageExampleHostApi, pigeon_example_package_example_host_api, G_TYPE_OBJECT) +static void pigeon_example_package_example_host_api_dispose(GObject* object) { + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(object); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + G_OBJECT_CLASS(pigeon_example_package_example_host_api_parent_class) + ->dispose(object); +} + +static void pigeon_example_package_example_host_api_init( + PigeonExamplePackageExampleHostApi* self) {} + +static void pigeon_example_package_example_host_api_class_init( + PigeonExamplePackageExampleHostApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + pigeon_example_package_example_host_api_dispose; +} + +static PigeonExamplePackageExampleHostApi* +pigeon_example_package_example_host_api_new( + const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + PigeonExamplePackageExampleHostApi* self = + PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( + pigeon_example_package_example_host_api_get_type(), nullptr)); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + return self; +} + static void pigeon_example_package_example_host_api_get_host_language_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -490,7 +527,7 @@ static void pigeon_example_package_example_host_api_get_host_language_cb( } g_autoptr(PigeonExamplePackageExampleHostApiGetHostLanguageResponse) - response = self->vtable->get_host_language(self, self->user_data); + response = self->vtable->get_host_language(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "ExampleHostApi", "getHostLanguage"); @@ -520,7 +557,7 @@ static void pigeon_example_package_example_host_api_add_cb( FlValue* value1 = fl_value_get_list_value(message_, 1); int64_t b = fl_value_get_int(value1); g_autoptr(PigeonExamplePackageExampleHostApiAddResponse) response = - self->vtable->add(self, a, b, self->user_data); + self->vtable->add(a, b, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "ExampleHostApi", "add"); return; @@ -551,41 +588,18 @@ static void pigeon_example_package_example_host_api_send_message_cb( g_autoptr(PigeonExamplePackageExampleHostApiResponseHandle) handle = pigeon_example_package_example_host_api_response_handle_new( channel, response_handle); - self->vtable->send_message(self, message, handle, self->user_data); + self->vtable->send_message(message, handle, self->user_data); } -static void pigeon_example_package_example_host_api_dispose(GObject* object) { - PigeonExamplePackageExampleHostApi* self = - PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(object); - if (self->user_data != nullptr) { - self->user_data_free_func(self->user_data); - } - self->user_data = nullptr; - G_OBJECT_CLASS(pigeon_example_package_example_host_api_parent_class) - ->dispose(object); -} - -static void pigeon_example_package_example_host_api_init( - PigeonExamplePackageExampleHostApi* self) {} - -static void pigeon_example_package_example_host_api_class_init( - PigeonExamplePackageExampleHostApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = - pigeon_example_package_example_host_api_dispose; -} - -PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( +void pigeon_example_package_example_host_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { - PigeonExamplePackageExampleHostApi* self = - PIGEON_EXAMPLE_PACKAGE_EXAMPLE_HOST_API(g_object_new( - pigeon_example_package_example_host_api_get_type(), nullptr)); g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); - self->vtable = vtable; - self->user_data = user_data; - self->user_data_free_func = user_data_free_func; + g_autoptr(PigeonExamplePackageExampleHostApi) api_data = + pigeon_example_package_example_host_api_new(vtable, user_data, + user_data_free_func); g_autoptr(PigeonExamplePackageMessageCodec) codec = pigeon_example_package_message_codec_new(); @@ -599,7 +613,7 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( fl_basic_message_channel_set_message_handler( get_host_language_channel, pigeon_example_package_example_host_api_get_host_language_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* add_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add%s", dot_suffix); @@ -607,7 +621,7 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( messenger, add_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( add_channel, pigeon_example_package_example_host_api_add_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* send_message_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage%s", dot_suffix); @@ -617,13 +631,43 @@ PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( fl_basic_message_channel_set_message_handler( send_message_channel, pigeon_example_package_example_host_api_send_message_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); +} - return self; +void pigeon_example_package_example_host_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix) { + g_autofree gchar* dot_suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); + + g_autoptr(PigeonExamplePackageMessageCodec) codec = + pigeon_example_package_message_codec_new(); + g_autofree gchar* get_host_language_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi." + "getHostLanguage%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) get_host_language_channel = + fl_basic_message_channel_new(messenger, get_host_language_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(get_host_language_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* add_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.add%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) add_channel = fl_basic_message_channel_new( + messenger, add_channel_name, FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(add_channel, nullptr, nullptr, + nullptr); + g_autofree gchar* send_message_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_example_package.ExampleHostApi.sendMessage%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) send_message_channel = + fl_basic_message_channel_new(messenger, send_message_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(send_message_channel, nullptr, + nullptr, nullptr); } void pigeon_example_package_example_host_api_respond_send_message( - PigeonExamplePackageExampleHostApi* self, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gboolean return_value) { g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = @@ -639,7 +683,6 @@ void pigeon_example_package_example_host_api_respond_send_message( } void pigeon_example_package_example_host_api_respond_error_send_message( - PigeonExamplePackageExampleHostApi* self, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(PigeonExamplePackageExampleHostApiSendMessageResponse) response = diff --git a/packages/pigeon/example/app/linux/messages.g.h b/packages/pigeon/example/app/linux/messages.g.h index 5217e2c4e4ce..0f784ab1a1fc 100644 --- a/packages/pigeon/example/app/linux/messages.g.h +++ b/packages/pigeon/example/app/linux/messages.g.h @@ -155,10 +155,6 @@ PigeonExamplePackageExampleHostApiAddResponse* pigeon_example_package_example_host_api_add_response_new_error( const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, - pigeon_example_package_example_host_api, - PIGEON_EXAMPLE_PACKAGE, EXAMPLE_HOST_API, GObject) - /** * PigeonExamplePackageExampleHostApiVTable: * @@ -167,20 +163,17 @@ G_DECLARE_FINAL_TYPE(PigeonExamplePackageExampleHostApi, */ typedef struct { PigeonExamplePackageExampleHostApiGetHostLanguageResponse* ( - *get_host_language)(PigeonExamplePackageExampleHostApi* api, - gpointer user_data); - PigeonExamplePackageExampleHostApiAddResponse* (*add)( - PigeonExamplePackageExampleHostApi* api, int64_t a, int64_t b, - gpointer user_data); + *get_host_language)(gpointer user_data); + PigeonExamplePackageExampleHostApiAddResponse* (*add)(int64_t a, int64_t b, + gpointer user_data); void (*send_message)( - PigeonExamplePackageExampleHostApi* api, PigeonExamplePackageMessageData* message, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gpointer user_data); } PigeonExamplePackageExampleHostApiVTable; /** - * pigeon_example_package_example_host_api_new: + * pigeon_example_package_example_host_api_set_method_handlers: * * @messenger: an #FlBinaryMessenger. * @suffix: (allow-none): a suffix to add to the API or %NULL for none. @@ -189,31 +182,37 @@ typedef struct { * @user_data_free_func: (allow-none): a function which gets called to free * @user_data, or %NULL. * - * Creates an object to implement the ExampleHostApi API. - * - * Returns: a new #PigeonExamplePackageExampleHostApi + * Connects the method handlers in the ExampleHostApi API. */ -PigeonExamplePackageExampleHostApi* pigeon_example_package_example_host_api_new( +void pigeon_example_package_example_host_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const PigeonExamplePackageExampleHostApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * pigeon_example_package_example_host_api_clear_method_handlers: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Clears the method handlers in the ExampleHostApi API. + */ +void pigeon_example_package_example_host_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix); + /** * pigeon_example_package_example_host_api_respond_send_message: - * @api: a #PigeonExamplePackageExampleHostApi. * @response_handle: a #PigeonExamplePackageExampleHostApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to ExampleHostApi.sendMessage. */ void pigeon_example_package_example_host_api_respond_send_message( - PigeonExamplePackageExampleHostApi* api, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gboolean return_value); /** * pigeon_example_package_example_host_api_respond_error_send_message: - * @api: a #PigeonExamplePackageExampleHostApi. * @response_handle: a #PigeonExamplePackageExampleHostApiResponseHandle. * @code: error code. * @message: error message. @@ -222,7 +221,6 @@ void pigeon_example_package_example_host_api_respond_send_message( * Responds with an error to ExampleHostApi.sendMessage. */ void pigeon_example_package_example_host_api_respond_error_send_message( - PigeonExamplePackageExampleHostApi* api, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); @@ -331,7 +329,7 @@ void pigeon_example_package_message_flutter_api_flutter_method( /** * pigeon_example_package_message_flutter_api_flutter_method_finish: - * @api: a #className. + * @api: a #PigeonExamplePackageMessageFlutterApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. diff --git a/packages/pigeon/example/app/linux/my_application.cc b/packages/pigeon/example/app/linux/my_application.cc index 20809f68ab33..812b96a8ceec 100644 --- a/packages/pigeon/example/app/linux/my_application.cc +++ b/packages/pigeon/example/app/linux/my_application.cc @@ -16,8 +16,6 @@ struct _MyApplication { GtkApplication parent_instance; char** dart_entrypoint_arguments; - PigeonExamplePackageExampleHostApi* example_host_api; - PigeonExamplePackageMessageFlutterApi* flutter_api; }; @@ -25,15 +23,13 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) // #docregion vtable static PigeonExamplePackageExampleHostApiGetHostLanguageResponse* -handle_get_host_language(PigeonExamplePackageExampleHostApi* object, - gpointer user_data) { +handle_get_host_language(gpointer user_data) { return pigeon_example_package_example_host_api_get_host_language_response_new( "C++"); } static PigeonExamplePackageExampleHostApiAddResponse* handle_add( - PigeonExamplePackageExampleHostApi* object, int64_t a, int64_t b, - gpointer user_data) { + int64_t a, int64_t b, gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); return pigeon_example_package_example_host_api_add_response_new_error( @@ -44,7 +40,6 @@ static PigeonExamplePackageExampleHostApiAddResponse* handle_add( } static void handle_send_message( - PigeonExamplePackageExampleHostApi* object, PigeonExamplePackageMessageData* message, PigeonExamplePackageExampleHostApiResponseHandle* response_handle, gpointer user_data) { @@ -53,12 +48,12 @@ static void handle_send_message( if (code == PIGEON_EXAMPLE_PACKAGE_CODE_ONE) { g_autoptr(FlValue) details = fl_value_new_string("details"); pigeon_example_package_example_host_api_respond_error_send_message( - object, response_handle, "code", "message", details); + response_handle, "code", "message", details); return; } - pigeon_example_package_example_host_api_respond_send_message( - object, response_handle, TRUE); + pigeon_example_package_example_host_api_respond_send_message(response_handle, + TRUE); } static PigeonExamplePackageExampleHostApiVTable example_host_api_vtable = { @@ -133,7 +128,7 @@ static void my_application_activate(GApplication* application) { FlBinaryMessenger* messenger = fl_engine_get_binary_messenger(fl_view_get_engine(view)); - self->example_host_api = pigeon_example_package_example_host_api_new( + pigeon_example_package_example_host_api_set_method_handlers( messenger, nullptr, &example_host_api_vtable, self, nullptr); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); @@ -173,7 +168,6 @@ static gboolean my_application_local_command_line(GApplication* application, static void my_application_dispose(GObject* object) { MyApplication* self = MY_APPLICATION(object); g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - g_clear_object(&self->example_host_api); G_OBJECT_CLASS(my_application_parent_class)->dispose(object); } diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index 312d9cdecb41..eb1880ff965c 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -368,7 +368,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); indent.writeln('/**'); indent.writeln(' * ${methodPrefix}_${methodName}_finish:'); - indent.writeln(' * @api: a #className.'); + indent.writeln(' * @api: a #$className.'); indent.writeln(' * @result: a #GAsyncResult.'); indent.writeln( ' * @error: (allow-none): #GError location to store the error occurring, or %NULL to ignore.'); @@ -478,7 +478,6 @@ class GObjectHeaderGenerator extends StructuredGenerator { required String dartPackageName, }) { final String module = _getModule(generatorOptions, dartPackageName); - final String className = _getClassName(module, api.name); final String methodPrefix = _getMethodPrefix(module, api.name); final String vtableName = _getVTableName(module, api.name); @@ -494,15 +493,12 @@ class GObjectHeaderGenerator extends StructuredGenerator { _writeHostApiRespondClass(indent, module, api, method); } - indent.newln(); - _writeDeclareFinalType(indent, module, api.name); - indent.newln(); _writeApiVTable(indent, module, api); indent.newln(); indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_new:'); + indent.writeln(' * ${methodPrefix}_set_method_handlers:'); indent.writeln(' *'); indent.writeln(' * @messenger: an #FlBinaryMessenger.'); indent.writeln( @@ -513,12 +509,23 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.writeln( ' * @user_data_free_func: (allow-none): a function which gets called to free @user_data, or %NULL.'); indent.writeln(' *'); - indent.writeln(' * Creates an object to implement the ${api.name} API.'); + indent.writeln(' * Connects the method handlers in the ${api.name} API.'); + indent.writeln(' */'); + indent.writeln( + 'void ${methodPrefix}_set_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + + indent.newln(); + indent.writeln('/**'); + indent.writeln(' * ${methodPrefix}_clear_method_handlers:'); + indent.writeln(' *'); + indent.writeln(' * @messenger: an #FlBinaryMessenger.'); + indent.writeln( + ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); indent.writeln(' *'); - indent.writeln(' * Returns: a new #$className'); + indent.writeln(' * Clears the method handlers in the ${api.name} API.'); indent.writeln(' */'); indent.writeln( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); + 'void ${methodPrefix}_clear_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix);'); for (final Method method in api.methods.where((Method method) => method.isAsynchronous)) { @@ -585,7 +592,7 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String responseName = _getResponseName(api.name, method.name); final String responseClassName = _getClassName(module, responseName); - final List methodArgs = ['$className* api']; + final List methodArgs = []; for (final Parameter param in method.parameters) { final String name = _snakeCaseFromCamelCase(param.name); methodArgs.add('${_getType(module, param.type)} $name'); @@ -615,14 +622,12 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List respondArgs = [ - '$className* api', '${className}ResponseHandle* response_handle', if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; indent.writeln('/**'); indent.writeln(' * ${methodPrefix}_respond_$methodName:'); - indent.writeln(' * @api: a #$className.'); indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); if (returnType != 'void') { indent.writeln( @@ -640,7 +645,6 @@ class GObjectHeaderGenerator extends StructuredGenerator { indent.newln(); final List respondErrorArgs = [ - '$className* api', '${className}ResponseHandle* response_handle', 'const gchar* code', 'const gchar* message', @@ -648,7 +652,6 @@ class GObjectHeaderGenerator extends StructuredGenerator { ]; indent.writeln('/**'); indent.writeln(' * ${methodPrefix}_respond_error_$methodName:'); - indent.writeln(' * @api: a #$className.'); indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); indent.writeln(' * @code: error code.'); indent.writeln(' * @message: error message.'); @@ -1432,6 +1435,9 @@ class GObjectSourceGenerator extends StructuredGenerator { }); } + indent.newln(); + _writeDeclareFinalType(indent, module, api.name); + indent.newln(); _writeObjectStruct(indent, module, api.name, () { indent.writeln('const ${className}VTable* vtable;'); @@ -1442,6 +1448,32 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); _writeDefineType(indent, module, api.name); + indent.newln(); + _writeDispose(indent, module, api.name, () { + _writeCastSelf(indent, module, api.name, 'object'); + indent.writeScoped('if (self->user_data != nullptr) {', '}', () { + indent.writeln('self->user_data_free_func(self->user_data);'); + }); + indent.writeln('self->user_data = nullptr;'); + }); + + indent.newln(); + _writeInit(indent, module, api.name, () {}); + + indent.newln(); + _writeClassInit(indent, module, api.name, () {}); + + indent.newln(); + indent.writeScoped( + 'static $className* ${methodPrefix}_new(const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', + '}', () { + _writeObjectNew(indent, module, api.name); + indent.writeln('self->vtable = vtable;'); + indent.writeln('self->user_data = user_data;'); + indent.writeln('self->user_data_free_func = user_data_free_func;'); + indent.writeln('return self;'); + }); + for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); final String responseName = _getResponseName(api.name, method.name); @@ -1494,14 +1526,14 @@ class GObjectSourceGenerator extends StructuredGenerator { } } if (method.isAsynchronous) { - final List vfuncArgs = ['self']; + final List vfuncArgs = []; vfuncArgs.addAll(methodArgs); vfuncArgs.addAll(['handle', 'self->user_data']); indent.writeln( 'g_autoptr(${className}ResponseHandle) handle = ${methodPrefix}_response_handle_new(channel, response_handle);'); indent.writeln("self->vtable->$methodName(${vfuncArgs.join(', ')});"); } else { - final List vfuncArgs = ['self']; + final List vfuncArgs = []; vfuncArgs.addAll(methodArgs); vfuncArgs.add('self->user_data'); indent.writeln( @@ -1525,30 +1557,36 @@ class GObjectSourceGenerator extends StructuredGenerator { } indent.newln(); - _writeDispose(indent, module, api.name, () { - _writeCastSelf(indent, module, api.name, 'object'); - indent.writeScoped('if (self->user_data != nullptr) {', '}', () { - indent.writeln('self->user_data_free_func(self->user_data);'); - }); - indent.writeln('self->user_data = nullptr;'); - }); - - indent.newln(); - _writeInit(indent, module, api.name, () {}); + indent.writeScoped( + 'void ${methodPrefix}_set_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', + '}', () { + indent.writeln( + 'g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); + indent.writeln( + 'g_autoptr($className) api_data = ${methodPrefix}_new(vtable, user_data, user_data_free_func);'); - indent.newln(); - _writeClassInit(indent, module, api.name, () {}); + indent.newln(); + indent.writeln( + 'g_autoptr($codecClassName) codec = ${codecMethodPrefix}_new();'); + for (final Method method in api.methods) { + final String methodName = _getMethodName(method.name); + final String channelName = + makeChannelName(api, method, dartPackageName); + indent.writeln( + 'g_autofree gchar* ${methodName}_channel_name = g_strdup_printf("$channelName%s", dot_suffix);'); + indent.writeln( + 'g_autoptr(FlBasicMessageChannel) ${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); + indent.writeln( + 'fl_basic_message_channel_set_message_handler(${methodName}_channel, ${methodPrefix}_${methodName}_cb, g_object_ref(api_data), g_object_unref);'); + } + }); indent.newln(); indent.writeScoped( - '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func) {', + 'void ${methodPrefix}_clear_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix) {', '}', () { - _writeObjectNew(indent, module, api.name); indent.writeln( 'g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup("");'); - indent.writeln('self->vtable = vtable;'); - indent.writeln('self->user_data = user_data;'); - indent.writeln('self->user_data_free_func = user_data_free_func;'); indent.newln(); indent.writeln( @@ -1562,11 +1600,8 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.writeln( 'g_autoptr(FlBasicMessageChannel) ${methodName}_channel = fl_basic_message_channel_new(messenger, ${methodName}_channel_name, FL_MESSAGE_CODEC(codec));'); indent.writeln( - 'fl_basic_message_channel_set_message_handler(${methodName}_channel, ${methodPrefix}_${methodName}_cb, g_object_ref(self), g_object_unref);'); + 'fl_basic_message_channel_set_message_handler(${methodName}_channel, nullptr, nullptr, nullptr);'); } - - indent.newln(); - indent.writeln('return self;'); }); for (final Method method @@ -1580,7 +1615,6 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final List respondArgs = [ - '$className* self', '${className}ResponseHandle* response_handle', if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' @@ -1605,7 +1639,6 @@ class GObjectSourceGenerator extends StructuredGenerator { indent.newln(); final List respondErrorArgs = [ - '$className* self', '${className}ResponseHandle* response_handle', 'const gchar* code', 'const gchar* message', diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 77bf1e7c1cad..fddf46a03a80 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -8064,6 +8064,10 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_str return self; } +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, + core_tests_pigeon_test_host_integration_core_api, + CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API, GObject) + struct _CoreTestsPigeonTestHostIntegrationCoreApi { GObject parent_instance; @@ -8075,6 +8079,41 @@ struct _CoreTestsPigeonTestHostIntegrationCoreApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, core_tests_pigeon_test_host_integration_core_api, G_TYPE_OBJECT) +static void core_tests_pigeon_test_host_integration_core_api_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(object); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + G_OBJECT_CLASS(core_tests_pigeon_test_host_integration_core_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_integration_core_api_init( + CoreTestsPigeonTestHostIntegrationCoreApi* self) {} + +static void core_tests_pigeon_test_host_integration_core_api_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_dispose; +} + +static CoreTestsPigeonTestHostIntegrationCoreApi* +core_tests_pigeon_test_host_integration_core_api_new( + const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, + gpointer user_data, GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(g_object_new( + core_tests_pigeon_test_host_integration_core_api_get_type(), + nullptr)); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + return self; +} + static void core_tests_pigeon_test_host_integration_core_api_noop_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -8086,7 +8125,7 @@ static void core_tests_pigeon_test_host_integration_core_api_noop_cb( } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse) response = - self->vtable->noop(self, self->user_data); + self->vtable->noop(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "noop"); @@ -8115,8 +8154,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb( CoreTestsPigeonTestAllTypes* everything = CORE_TESTS_PIGEON_TEST_ALL_TYPES( fl_value_get_custom_value_object(value0)); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse) - response = - self->vtable->echo_all_types(self, everything, self->user_data); + response = self->vtable->echo_all_types(everything, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoAllTypes"); @@ -8142,7 +8180,7 @@ static void core_tests_pigeon_test_host_integration_core_api_throw_error_cb( } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse) - response = self->vtable->throw_error(self, self->user_data); + response = self->vtable->throw_error(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "throwError"); @@ -8170,7 +8208,7 @@ core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb( } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse) - response = self->vtable->throw_error_from_void(self, self->user_data); + response = self->vtable->throw_error_from_void(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "throwErrorFromVoid"); @@ -8197,7 +8235,7 @@ core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb( } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse) - response = self->vtable->throw_flutter_error(self, self->user_data); + response = self->vtable->throw_flutter_error(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "throwFlutterError"); @@ -8225,7 +8263,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_int_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); int64_t an_int = fl_value_get_int(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse) response = - self->vtable->echo_int(self, an_int, self->user_data); + self->vtable->echo_int(an_int, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoInt"); @@ -8253,7 +8291,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_double_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); double a_double = fl_value_get_float(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse) - response = self->vtable->echo_double(self, a_double, self->user_data); + response = self->vtable->echo_double(a_double, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoDouble"); @@ -8281,7 +8319,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_bool_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); gboolean a_bool = fl_value_get_bool(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse) - response = self->vtable->echo_bool(self, a_bool, self->user_data); + response = self->vtable->echo_bool(a_bool, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoBool"); @@ -8309,7 +8347,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_string_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_string = fl_value_get_string(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse) - response = self->vtable->echo_string(self, a_string, self->user_data); + response = self->vtable->echo_string(a_string, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoString"); @@ -8339,7 +8377,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb( size_t a_uint8_list_length = fl_value_get_length(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse) response = self->vtable->echo_uint8_list( - self, a_uint8_list, a_uint8_list_length, self->user_data); + a_uint8_list, a_uint8_list_length, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoUint8List"); @@ -8367,7 +8405,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_object_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* an_object = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse) - response = self->vtable->echo_object(self, an_object, self->user_data); + response = self->vtable->echo_object(an_object, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoObject"); @@ -8395,7 +8433,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* list = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse) - response = self->vtable->echo_list(self, list, self->user_data); + response = self->vtable->echo_list(list, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoList"); @@ -8423,7 +8461,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_map_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_map = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse) response = - self->vtable->echo_map(self, a_map, self->user_data); + self->vtable->echo_map(a_map, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoMap"); @@ -8454,8 +8492,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb( CORE_TESTS_PIGEON_TEST_ALL_CLASSES_WRAPPER( fl_value_get_custom_value_object(value0)); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse) - response = - self->vtable->echo_class_wrapper(self, wrapper, self->user_data); + response = self->vtable->echo_class_wrapper(wrapper, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoClassWrapper"); @@ -8485,7 +8522,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_enum_cb( fl_value_get_int(reinterpret_cast( const_cast(fl_value_get_custom_value(value0))))); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse) - response = self->vtable->echo_enum(self, an_enum, self->user_data); + response = self->vtable->echo_enum(an_enum, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoEnum"); @@ -8516,8 +8553,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb( const gchar* a_string = fl_value_get_string(value0); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse) - response = self->vtable->echo_named_default_string(self, a_string, - self->user_data); + response = + self->vtable->echo_named_default_string(a_string, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNamedDefaultString"); @@ -8548,8 +8585,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb double a_double = fl_value_get_float(value0); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse) - response = self->vtable->echo_optional_default_double(self, a_double, - self->user_data); + response = + self->vtable->echo_optional_default_double(a_double, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoOptionalDefaultDouble"); @@ -8578,7 +8615,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); int64_t an_int = fl_value_get_int(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse) - response = self->vtable->echo_required_int(self, an_int, self->user_data); + response = self->vtable->echo_required_int(an_int, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoRequiredInt"); @@ -8611,8 +8648,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb( fl_value_get_custom_value_object(value0)); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse) - response = self->vtable->echo_all_nullable_types(self, everything, - self->user_data); + response = + self->vtable->echo_all_nullable_types(everything, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoAllNullableTypes"); @@ -8646,7 +8683,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse) response = self->vtable->echo_all_nullable_types_without_recursion( - self, everything, self->user_data); + everything, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoAllNullableTypesWithoutRecursion"); @@ -8679,7 +8716,7 @@ core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_ fl_value_get_custom_value_object(value0)); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse) - response = self->vtable->extract_nested_nullable_string(self, wrapper, + response = self->vtable->extract_nested_nullable_string(wrapper, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", @@ -8711,8 +8748,8 @@ core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_c const gchar* nullable_string = fl_value_get_string(value0); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse) - response = self->vtable->create_nested_nullable_string( - self, nullable_string, self->user_data); + response = self->vtable->create_nested_nullable_string(nullable_string, + self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "createNestedNullableString"); @@ -8758,8 +8795,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse) response = self->vtable->send_multiple_nullable_types( - self, a_nullable_bool, a_nullable_int, a_nullable_string, - self->user_data); + a_nullable_bool, a_nullable_int, a_nullable_string, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "sendMultipleNullableTypes"); @@ -8805,8 +8841,7 @@ core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_wi g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse) response = self->vtable->send_multiple_nullable_types_without_recursion( - self, a_nullable_bool, a_nullable_int, a_nullable_string, - self->user_data); + a_nullable_bool, a_nullable_int, a_nullable_string, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "sendMultipleNullableTypesWithoutRecursion"); @@ -8840,8 +8875,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb( a_nullable_int = &a_nullable_int_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse) - response = self->vtable->echo_nullable_int(self, a_nullable_int, - self->user_data); + response = + self->vtable->echo_nullable_int(a_nullable_int, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableInt"); @@ -8876,7 +8911,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb( a_nullable_double = &a_nullable_double_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse) - response = self->vtable->echo_nullable_double(self, a_nullable_double, + response = self->vtable->echo_nullable_double(a_nullable_double, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", @@ -8911,8 +8946,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb( a_nullable_bool = &a_nullable_bool_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse) - response = self->vtable->echo_nullable_bool(self, a_nullable_bool, - self->user_data); + response = + self->vtable->echo_nullable_bool(a_nullable_bool, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableBool"); @@ -8942,7 +8977,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); const gchar* a_nullable_string = fl_value_get_string(value0); g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse) - response = self->vtable->echo_nullable_string(self, a_nullable_string, + response = self->vtable->echo_nullable_string(a_nullable_string, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", @@ -8976,8 +9011,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb( g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse) response = self->vtable->echo_nullable_uint8_list( - self, a_nullable_uint8_list, a_nullable_uint8_list_length, - self->user_data); + a_nullable_uint8_list, a_nullable_uint8_list_length, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableUint8List"); @@ -9007,7 +9041,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_nullable_object = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse) - response = self->vtable->echo_nullable_object(self, a_nullable_object, + response = self->vtable->echo_nullable_object(a_nullable_object, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", @@ -9037,8 +9071,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_nullable_list = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse) - response = self->vtable->echo_nullable_list(self, a_nullable_list, - self->user_data); + response = + self->vtable->echo_nullable_list(a_nullable_list, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableList"); @@ -9067,8 +9101,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb( FlValue* value0 = fl_value_get_list_value(message_, 0); FlValue* a_nullable_map = value0; g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse) - response = self->vtable->echo_nullable_map(self, a_nullable_map, - self->user_data); + response = + self->vtable->echo_nullable_map(a_nullable_map, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableMap"); @@ -9104,8 +9138,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb( an_enum = &an_enum_value; } g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse) - response = - self->vtable->echo_nullable_enum(self, an_enum, self->user_data); + response = self->vtable->echo_nullable_enum(an_enum, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNullableEnum"); @@ -9141,7 +9174,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb( } g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse) - response = self->vtable->echo_optional_nullable_int(self, a_nullable_int, + response = self->vtable->echo_optional_nullable_int(a_nullable_int, self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", @@ -9173,8 +9206,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb( const gchar* a_nullable_string = fl_value_get_string(value0); g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse) - response = self->vtable->echo_named_nullable_string( - self, a_nullable_string, self->user_data); + response = self->vtable->echo_named_nullable_string(a_nullable_string, + self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", "echoNamedNullableString"); @@ -9202,7 +9235,7 @@ static void core_tests_pigeon_test_host_integration_core_api_noop_async_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->noop_async(self, handle, self->user_data); + self->vtable->noop_async(handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb( @@ -9220,7 +9253,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_int(self, an_int, handle, self->user_data); + self->vtable->echo_async_int(an_int, handle, self->user_data); } static void @@ -9239,7 +9272,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_double(self, a_double, handle, self->user_data); + self->vtable->echo_async_double(a_double, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb( @@ -9257,7 +9290,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_bool(self, a_bool, handle, self->user_data); + self->vtable->echo_async_bool(a_bool, handle, self->user_data); } static void @@ -9276,7 +9309,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_string(self, a_string, handle, self->user_data); + self->vtable->echo_async_string(a_string, handle, self->user_data); } static void @@ -9297,8 +9330,8 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_uint8_list(self, a_uint8_list, a_uint8_list_length, - handle, self->user_data); + self->vtable->echo_async_uint8_list(a_uint8_list, a_uint8_list_length, handle, + self->user_data); } static void @@ -9317,7 +9350,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_object(self, an_object, handle, self->user_data); + self->vtable->echo_async_object(an_object, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb( @@ -9335,7 +9368,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_list(self, list, handle, self->user_data); + self->vtable->echo_async_list(list, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb( @@ -9353,7 +9386,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_map(self, a_map, handle, self->user_data); + self->vtable->echo_async_map(a_map, handle, self->user_data); } static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( @@ -9373,7 +9406,7 @@ static void core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_enum(self, an_enum, handle, self->user_data); + self->vtable->echo_async_enum(an_enum, handle, self->user_data); } static void @@ -9390,7 +9423,7 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->throw_async_error(self, handle, self->user_data); + self->vtable->throw_async_error(handle, self->user_data); } static void @@ -9408,7 +9441,7 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->throw_async_error_from_void(self, handle, self->user_data); + self->vtable->throw_async_error_from_void(handle, self->user_data); } static void @@ -9426,7 +9459,7 @@ core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->throw_async_flutter_error(self, handle, self->user_data); + self->vtable->throw_async_flutter_error(handle, self->user_data); } static void @@ -9447,7 +9480,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_all_types(self, everything, handle, self->user_data); + self->vtable->echo_async_all_types(everything, handle, self->user_data); } static void @@ -9469,7 +9502,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_all_nullable_types(self, everything, handle, + self->vtable->echo_async_nullable_all_nullable_types(everything, handle, self->user_data); } @@ -9494,7 +9527,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullabl core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); self->vtable->echo_async_nullable_all_nullable_types_without_recursion( - self, everything, handle, self->user_data); + everything, handle, self->user_data); } static void @@ -9519,7 +9552,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_int(self, an_int, handle, self->user_data); + self->vtable->echo_async_nullable_int(an_int, handle, self->user_data); } static void @@ -9544,8 +9577,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_double(self, a_double, handle, - self->user_data); + self->vtable->echo_async_nullable_double(a_double, handle, self->user_data); } static void @@ -9570,7 +9602,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_bool(self, a_bool, handle, self->user_data); + self->vtable->echo_async_nullable_bool(a_bool, handle, self->user_data); } static void @@ -9590,8 +9622,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_string(self, a_string, handle, - self->user_data); + self->vtable->echo_async_nullable_string(a_string, handle, self->user_data); } static void @@ -9613,7 +9644,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_ core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); self->vtable->echo_async_nullable_uint8_list( - self, a_uint8_list, a_uint8_list_length, handle, self->user_data); + a_uint8_list, a_uint8_list_length, handle, self->user_data); } static void @@ -9633,8 +9664,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_object(self, an_object, handle, - self->user_data); + self->vtable->echo_async_nullable_object(an_object, handle, self->user_data); } static void @@ -9654,7 +9684,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_list(self, list, handle, self->user_data); + self->vtable->echo_async_nullable_list(list, handle, self->user_data); } static void @@ -9674,7 +9704,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_map(self, a_map, handle, self->user_data); + self->vtable->echo_async_nullable_map(a_map, handle, self->user_data); } static void @@ -9701,8 +9731,7 @@ core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->echo_async_nullable_enum(self, an_enum, handle, - self->user_data); + self->vtable->echo_async_nullable_enum(an_enum, handle, self->user_data); } static void @@ -9719,7 +9748,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_noop(self, handle, self->user_data); + self->vtable->call_flutter_noop(handle, self->user_data); } static void @@ -9737,7 +9766,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_throw_error(self, handle, self->user_data); + self->vtable->call_flutter_throw_error(handle, self->user_data); } static void @@ -9755,8 +9784,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_v g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_throw_error_from_void(self, handle, - self->user_data); + self->vtable->call_flutter_throw_error_from_void(handle, self->user_data); } static void @@ -9777,7 +9805,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_all_types(self, everything, handle, + self->vtable->call_flutter_echo_all_types(everything, handle, self->user_data); } @@ -9800,7 +9828,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_all_nullable_types(self, everything, handle, + self->vtable->call_flutter_echo_all_nullable_types(everything, handle, self->user_data); } @@ -9836,7 +9864,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); self->vtable->call_flutter_send_multiple_nullable_types( - self, a_nullable_bool, a_nullable_int, a_nullable_string, handle, + a_nullable_bool, a_nullable_int, a_nullable_string, handle, self->user_data); } @@ -9861,7 +9889,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_ core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); self->vtable->call_flutter_echo_all_nullable_types_without_recursion( - self, everything, handle, self->user_data); + everything, handle, self->user_data); } static void @@ -9898,7 +9926,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_null core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); self->vtable->call_flutter_send_multiple_nullable_types_without_recursion( - self, a_nullable_bool, a_nullable_int, a_nullable_string, handle, + a_nullable_bool, a_nullable_int, a_nullable_string, handle, self->user_data); } @@ -9919,7 +9947,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_bool(self, a_bool, handle, self->user_data); + self->vtable->call_flutter_echo_bool(a_bool, handle, self->user_data); } static void @@ -9939,7 +9967,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_int(self, an_int, handle, self->user_data); + self->vtable->call_flutter_echo_int(an_int, handle, self->user_data); } static void @@ -9959,8 +9987,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_double(self, a_double, handle, - self->user_data); + self->vtable->call_flutter_echo_double(a_double, handle, self->user_data); } static void @@ -9980,8 +10007,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_string(self, a_string, handle, - self->user_data); + self->vtable->call_flutter_echo_string(a_string, handle, self->user_data); } static void @@ -10002,7 +10028,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_uint8_list(self, list, list_length, handle, + self->vtable->call_flutter_echo_uint8_list(list, list_length, handle, self->user_data); } @@ -10023,7 +10049,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_list(self, list, handle, self->user_data); + self->vtable->call_flutter_echo_list(list, handle, self->user_data); } static void @@ -10043,7 +10069,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_map(self, a_map, handle, self->user_data); + self->vtable->call_flutter_echo_map(a_map, handle, self->user_data); } static void @@ -10065,7 +10091,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb( g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_enum(self, an_enum, handle, self->user_data); + self->vtable->call_flutter_echo_enum(an_enum, handle, self->user_data); } static void @@ -10090,7 +10116,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_bool(self, a_bool, handle, + self->vtable->call_flutter_echo_nullable_bool(a_bool, handle, self->user_data); } @@ -10116,8 +10142,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_ g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_int(self, an_int, handle, - self->user_data); + self->vtable->call_flutter_echo_nullable_int(an_int, handle, self->user_data); } static void @@ -10142,7 +10167,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_doub g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_double(self, a_double, handle, + self->vtable->call_flutter_echo_nullable_double(a_double, handle, self->user_data); } @@ -10163,7 +10188,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_stri g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_string(self, a_string, handle, + self->vtable->call_flutter_echo_nullable_string(a_string, handle, self->user_data); } @@ -10185,8 +10210,8 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_uint8_list(self, list, list_length, - handle, self->user_data); + self->vtable->call_flutter_echo_nullable_uint8_list(list, list_length, handle, + self->user_data); } static void @@ -10206,8 +10231,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_list(self, list, handle, - self->user_data); + self->vtable->call_flutter_echo_nullable_list(list, handle, self->user_data); } static void @@ -10227,8 +10251,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_ g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_map(self, a_map, handle, - self->user_data); + self->vtable->call_flutter_echo_nullable_map(a_map, handle, self->user_data); } static void @@ -10255,7 +10278,7 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_echo_nullable_enum(self, an_enum, handle, + self->vtable->call_flutter_echo_nullable_enum(an_enum, handle, self->user_data); } @@ -10276,45 +10299,19 @@ core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_str g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle) handle = core_tests_pigeon_test_host_integration_core_api_response_handle_new( channel, response_handle); - self->vtable->call_flutter_small_api_echo_string(self, a_string, handle, + self->vtable->call_flutter_small_api_echo_string(a_string, handle, self->user_data); } -static void core_tests_pigeon_test_host_integration_core_api_dispose( - GObject* object) { - CoreTestsPigeonTestHostIntegrationCoreApi* self = - CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(object); - if (self->user_data != nullptr) { - self->user_data_free_func(self->user_data); - } - self->user_data = nullptr; - G_OBJECT_CLASS(core_tests_pigeon_test_host_integration_core_api_parent_class) - ->dispose(object); -} - -static void core_tests_pigeon_test_host_integration_core_api_init( - CoreTestsPigeonTestHostIntegrationCoreApi* self) {} - -static void core_tests_pigeon_test_host_integration_core_api_class_init( - CoreTestsPigeonTestHostIntegrationCoreApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = - core_tests_pigeon_test_host_integration_core_api_dispose; -} - -CoreTestsPigeonTestHostIntegrationCoreApi* -core_tests_pigeon_test_host_integration_core_api_new( +void core_tests_pigeon_test_host_integration_core_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { - CoreTestsPigeonTestHostIntegrationCoreApi* self = - CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(g_object_new( - core_tests_pigeon_test_host_integration_core_api_get_type(), - nullptr)); g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); - self->vtable = vtable; - self->user_data = user_data; - self->user_data_free_func = user_data_free_func; + g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApi) api_data = + core_tests_pigeon_test_host_integration_core_api_new(vtable, user_data, + user_data_free_func); g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); @@ -10326,7 +10323,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( noop_channel, core_tests_pigeon_test_host_integration_core_api_noop_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllTypes%s", @@ -10337,7 +10334,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_all_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_types_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* throw_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwError%s", @@ -10348,7 +10345,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( throw_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* throw_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwErrorFromVoid%s", @@ -10360,7 +10357,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( throw_error_from_void_channel, core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* throw_flutter_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwFlutterError%s", @@ -10371,7 +10368,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( throw_flutter_error_channel, core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoInt%s", @@ -10382,7 +10379,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_int_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoDouble%s", @@ -10393,7 +10390,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_double_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoBool%s", @@ -10404,7 +10401,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_bool_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoString%s", @@ -10415,7 +10412,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoUint8List%s", @@ -10426,7 +10423,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoObject%s", @@ -10437,7 +10434,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_object_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoList%s", @@ -10448,7 +10445,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_list_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoMap%s", @@ -10459,7 +10456,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_map_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_class_wrapper_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoClassWrapper%s", @@ -10470,7 +10467,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_class_wrapper_channel, core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoEnum%s", @@ -10481,7 +10478,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_enum_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_named_default_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNamedDefaultString%s", @@ -10493,7 +10490,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_named_default_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_optional_default_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoOptionalDefaultDouble%s", @@ -10505,7 +10502,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_optional_default_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_required_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoRequiredInt%s", @@ -10516,7 +10513,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_required_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_required_int_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAllNullableTypes%s", @@ -10528,7 +10525,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_all_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_all_nullable_types_without_recursion_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10542,7 +10539,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_all_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* extract_nested_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10555,7 +10552,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( extract_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_extract_nested_nullable_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* create_nested_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10568,7 +10565,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( create_nested_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_create_nested_nullable_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* send_multiple_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "sendMultipleNullableTypes%s", @@ -10580,7 +10577,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( send_multiple_nullable_types_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* send_multiple_nullable_types_without_recursion_channel_name = g_strdup_printf( @@ -10597,7 +10594,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( send_multiple_nullable_types_without_recursion_channel, core_tests_pigeon_test_host_integration_core_api_send_multiple_nullable_types_without_recursion_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableInt%s", @@ -10608,7 +10605,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableDouble%s", @@ -10619,7 +10616,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableBool%s", @@ -10630,7 +10627,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableString%s", @@ -10641,7 +10638,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableUint8List%s", @@ -10653,7 +10650,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableObject%s", @@ -10664,7 +10661,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableList%s", @@ -10675,7 +10672,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableMap%s", @@ -10686,7 +10683,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_map_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNullableEnum%s", @@ -10697,7 +10694,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_nullable_enum_channel, core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_optional_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoOptionalNullableInt%s", @@ -10709,7 +10706,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_optional_nullable_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_named_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoNamedNullableString%s", @@ -10721,7 +10718,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_named_nullable_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* noop_async_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "noopAsync%s", @@ -10732,7 +10729,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( noop_async_channel, core_tests_pigeon_test_host_integration_core_api_noop_async_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncInt%s", @@ -10743,7 +10740,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_int_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_int_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncDouble%s", @@ -10754,7 +10751,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_double_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_double_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncBool%s", @@ -10765,7 +10762,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_bool_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_bool_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncString%s", @@ -10776,7 +10773,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_string_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_string_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncUint8List%s", @@ -10788,7 +10785,7 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_uint8_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_uint8_list_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_async_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncObject%s", @@ -10799,7 +10796,960 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_set_message_handler( echo_async_object_channel, core_tests_pigeon_test_host_integration_core_api_echo_async_object_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_list_channel = + fl_basic_message_channel_new(messenger, echo_async_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_map_channel = + fl_basic_message_channel_new(messenger, echo_async_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_enum_channel = + fl_basic_message_channel_new(messenger, echo_async_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* throw_async_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncError%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_error_channel = + fl_basic_message_channel_new(messenger, throw_async_error_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + throw_async_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* throw_async_error_from_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncErrorFromVoid%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_error_from_void_channel = + fl_basic_message_channel_new(messenger, + throw_async_error_from_void_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + throw_async_error_from_void_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* throw_async_flutter_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwAsyncFlutterError%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_async_flutter_error_channel = + fl_basic_message_channel_new(messenger, + throw_async_flutter_error_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + throw_async_flutter_error_channel, + core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncAllTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_all_types_channel = + fl_basic_message_channel_new(messenger, echo_async_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_all_nullable_types_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_async_nullable_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, echo_async_nullable_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_all_nullable_types_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* + echo_async_nullable_all_nullable_types_without_recursion_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypesWithoutRecursion%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_async_nullable_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + echo_async_nullable_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_all_nullable_types_without_recursion_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_int_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_int_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_double_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_double_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_bool_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_bool_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_string_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_string_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_uint8_list_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableObject%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_object_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_object_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_object_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_map_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_map_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_async_nullable_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncNullableEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_nullable_enum_channel = + fl_basic_message_channel_new(messenger, + echo_async_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_async_nullable_enum_channel, + core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterNoop%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_noop_channel = + fl_basic_message_channel_new(messenger, call_flutter_noop_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_noop_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_throw_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowError%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_throw_error_channel = + fl_basic_message_channel_new(messenger, + call_flutter_throw_error_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_throw_error_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_throw_error_from_void_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterThrowErrorFromVoid%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_throw_error_from_void_channel = + fl_basic_message_channel_new( + messenger, call_flutter_throw_error_from_void_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_throw_error_from_void_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_all_types_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_all_types_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_all_nullable_types_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_all_nullable_types_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_all_nullable_types_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_send_multiple_nullable_types_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_send_multiple_nullable_types_channel = + fl_basic_message_channel_new( + messenger, call_flutter_send_multiple_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_send_multiple_nullable_types_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* + call_flutter_echo_all_nullable_types_without_recursion_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterEchoAllNullableTypesWithoutRecursion%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + call_flutter_echo_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_all_nullable_types_without_recursion_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* + call_flutter_send_multiple_nullable_types_without_recursion_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypesWithoutRecursion%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + call_flutter_send_multiple_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_send_multiple_nullable_types_without_recursion_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_bool_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_bool_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_int_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_int_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_double_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_double_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_string_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_string_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_uint8_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_list_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_map_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_map_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_enum_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_enum_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_bool_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_bool_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_bool_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_int_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_int_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_int_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_double_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_double_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_nullable_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_double_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_string_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_string_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_string_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_uint8_list_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + call_flutter_echo_nullable_uint8_list_channel = + fl_basic_message_channel_new( + messenger, call_flutter_echo_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_uint8_list_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_list_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_list_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_list_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_map_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_map_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_map_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_echo_nullable_enum_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterEchoNullableEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_echo_nullable_enum_channel = + fl_basic_message_channel_new(messenger, + call_flutter_echo_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_echo_nullable_enum_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, + g_object_ref(api_data), g_object_unref); + g_autofree gchar* call_flutter_small_api_echo_string_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "callFlutterSmallApiEchoString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) call_flutter_small_api_echo_string_channel = + fl_basic_message_channel_new( + messenger, call_flutter_small_api_echo_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + call_flutter_small_api_echo_string_channel, + core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_cb, + g_object_ref(api_data), g_object_unref); +} + +void core_tests_pigeon_test_host_integration_core_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix) { + g_autofree gchar* dot_suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); + + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.noop%" + "s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_channel = fl_basic_message_channel_new( + messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(noop_channel, nullptr, nullptr, + nullptr); + g_autofree gchar* echo_all_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_all_types_channel = + fl_basic_message_channel_new(messenger, echo_all_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_all_types_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* throw_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwError%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_error_channel = + fl_basic_message_channel_new(messenger, throw_error_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(throw_error_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* throw_error_from_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwErrorFromVoid%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_error_from_void_channel = + fl_basic_message_channel_new(messenger, + throw_error_from_void_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(throw_error_from_void_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* throw_flutter_error_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "throwFlutterError%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) throw_flutter_error_channel = + fl_basic_message_channel_new(messenger, throw_flutter_error_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(throw_flutter_error_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_int_channel = + fl_basic_message_channel_new(messenger, echo_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_int_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_double_channel = + fl_basic_message_channel_new(messenger, echo_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_double_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_bool_channel = + fl_basic_message_channel_new(messenger, echo_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_bool_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_string_channel = + fl_basic_message_channel_new(messenger, echo_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_string_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_uint8_list_channel = + fl_basic_message_channel_new(messenger, echo_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_uint8_list_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoObject%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_object_channel = + fl_basic_message_channel_new(messenger, echo_object_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_object_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_list_channel = + fl_basic_message_channel_new(messenger, echo_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_list_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_map_channel = + fl_basic_message_channel_new(messenger, echo_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_map_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_class_wrapper_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoClassWrapper%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_class_wrapper_channel = + fl_basic_message_channel_new(messenger, echo_class_wrapper_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_class_wrapper_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_enum_channel = + fl_basic_message_channel_new(messenger, echo_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_enum_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_named_default_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedDefaultString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_named_default_string_channel = + fl_basic_message_channel_new(messenger, + echo_named_default_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_named_default_string_channel, nullptr, nullptr, nullptr); + g_autofree gchar* echo_optional_default_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalDefaultDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_optional_default_double_channel = + fl_basic_message_channel_new(messenger, + echo_optional_default_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_optional_default_double_channel, nullptr, nullptr, nullptr); + g_autofree gchar* echo_required_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoRequiredInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_required_int_channel = + fl_basic_message_channel_new(messenger, echo_required_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_required_int_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_all_nullable_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_all_nullable_types_channel = + fl_basic_message_channel_new(messenger, + echo_all_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_all_nullable_types_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_all_nullable_types_without_recursion_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAllNullableTypesWithoutRecursion%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + echo_all_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, echo_all_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_all_nullable_types_without_recursion_channel, nullptr, nullptr, + nullptr); + g_autofree gchar* extract_nested_nullable_string_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "extractNestedNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) extract_nested_nullable_string_channel = + fl_basic_message_channel_new(messenger, + extract_nested_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + extract_nested_nullable_string_channel, nullptr, nullptr, nullptr); + g_autofree gchar* create_nested_nullable_string_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "createNestedNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) create_nested_nullable_string_channel = + fl_basic_message_channel_new(messenger, + create_nested_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + create_nested_nullable_string_channel, nullptr, nullptr, nullptr); + g_autofree gchar* send_multiple_nullable_types_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "sendMultipleNullableTypes%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) send_multiple_nullable_types_channel = + fl_basic_message_channel_new(messenger, + send_multiple_nullable_types_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + send_multiple_nullable_types_channel, nullptr, nullptr, nullptr); + g_autofree gchar* + send_multiple_nullable_types_without_recursion_channel_name = + g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests." + "HostIntegrationCoreApi." + "sendMultipleNullableTypesWithoutRecursion%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) + send_multiple_nullable_types_without_recursion_channel = + fl_basic_message_channel_new( + messenger, + send_multiple_nullable_types_without_recursion_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + send_multiple_nullable_types_without_recursion_channel, nullptr, nullptr, + nullptr); + g_autofree gchar* echo_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_int_channel = + fl_basic_message_channel_new(messenger, echo_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_int_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_double_channel = + fl_basic_message_channel_new(messenger, echo_nullable_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_double_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_bool_channel = + fl_basic_message_channel_new(messenger, echo_nullable_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_bool_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_string_channel = + fl_basic_message_channel_new(messenger, echo_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_string_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_nullable_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_uint8_list_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableObject%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_object_channel = + fl_basic_message_channel_new(messenger, echo_nullable_object_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_object_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_list_channel = + fl_basic_message_channel_new(messenger, echo_nullable_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_list_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_map_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableMap%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_map_channel = + fl_basic_message_channel_new(messenger, echo_nullable_map_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_map_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_nullable_enum_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNullableEnum%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_nullable_enum_channel = + fl_basic_message_channel_new(messenger, echo_nullable_enum_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_nullable_enum_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_optional_nullable_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoOptionalNullableInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_optional_nullable_int_channel = + fl_basic_message_channel_new(messenger, + echo_optional_nullable_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_optional_nullable_int_channel, nullptr, nullptr, nullptr); + g_autofree gchar* echo_named_nullable_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNamedNullableString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_named_nullable_string_channel = + fl_basic_message_channel_new(messenger, + echo_named_nullable_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_named_nullable_string_channel, nullptr, nullptr, nullptr); + g_autofree gchar* noop_async_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "noopAsync%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_async_channel = + fl_basic_message_channel_new(messenger, noop_async_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(noop_async_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_async_int_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncInt%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_int_channel = + fl_basic_message_channel_new(messenger, echo_async_int_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_int_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_async_double_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncDouble%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_double_channel = + fl_basic_message_channel_new(messenger, echo_async_double_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_double_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_async_bool_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncBool%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_bool_channel = + fl_basic_message_channel_new(messenger, echo_async_bool_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_bool_channel, nullptr, + nullptr, nullptr); + g_autofree gchar* echo_async_string_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncString%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_string_channel = + fl_basic_message_channel_new(messenger, echo_async_string_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_string_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_async_uint8_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncUint8List%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_uint8_list_channel = + fl_basic_message_channel_new(messenger, + echo_async_uint8_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_uint8_list_channel, + nullptr, nullptr, nullptr); + g_autofree gchar* echo_async_object_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoAsyncObject%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_async_object_channel = + fl_basic_message_channel_new(messenger, echo_async_object_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_async_object_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncList%s", @@ -10807,10 +11757,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) echo_async_list_channel = fl_basic_message_channel_new(messenger, echo_async_list_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_list_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_list_channel, nullptr, + nullptr, nullptr); g_autofree gchar* echo_async_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncMap%s", @@ -10818,10 +11766,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) echo_async_map_channel = fl_basic_message_channel_new(messenger, echo_async_map_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_map_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_map_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_map_channel, nullptr, + nullptr, nullptr); g_autofree gchar* echo_async_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncEnum%s", @@ -10829,10 +11775,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) echo_async_enum_channel = fl_basic_message_channel_new(messenger, echo_async_enum_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_enum_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_enum_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_enum_channel, nullptr, + nullptr, nullptr); g_autofree gchar* throw_async_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncError%s", @@ -10840,10 +11784,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) throw_async_error_channel = fl_basic_message_channel_new(messenger, throw_async_error_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - throw_async_error_channel, - core_tests_pigeon_test_host_integration_core_api_throw_async_error_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(throw_async_error_channel, + nullptr, nullptr, nullptr); g_autofree gchar* throw_async_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncErrorFromVoid%s", @@ -10853,9 +11795,7 @@ core_tests_pigeon_test_host_integration_core_api_new( throw_async_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - throw_async_error_from_void_channel, - core_tests_pigeon_test_host_integration_core_api_throw_async_error_from_void_cb, - g_object_ref(self), g_object_unref); + throw_async_error_from_void_channel, nullptr, nullptr, nullptr); g_autofree gchar* throw_async_flutter_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "throwAsyncFlutterError%s", @@ -10865,9 +11805,7 @@ core_tests_pigeon_test_host_integration_core_api_new( throw_async_flutter_error_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - throw_async_flutter_error_channel, - core_tests_pigeon_test_host_integration_core_api_throw_async_flutter_error_cb, - g_object_ref(self), g_object_unref); + throw_async_flutter_error_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_async_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncAllTypes%s", @@ -10875,10 +11813,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) echo_async_all_types_channel = fl_basic_message_channel_new(messenger, echo_async_all_types_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_all_types_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_all_types_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_all_types_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10890,9 +11826,8 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, echo_async_nullable_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_all_nullable_types_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_all_nullable_types_channel, nullptr, nullptr, + nullptr); g_autofree gchar* echo_async_nullable_all_nullable_types_without_recursion_channel_name = g_strdup_printf( @@ -10907,9 +11842,8 @@ core_tests_pigeon_test_host_integration_core_api_new( echo_async_nullable_all_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_all_nullable_types_without_recursion_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_all_nullable_types_without_recursion_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_all_nullable_types_without_recursion_channel, nullptr, + nullptr, nullptr); g_autofree gchar* echo_async_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableInt%s", @@ -10918,10 +11852,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, echo_async_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_nullable_int_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_int_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_nullable_int_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableDouble%s", @@ -10931,9 +11863,7 @@ core_tests_pigeon_test_host_integration_core_api_new( echo_async_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_double_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_double_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_double_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableBool%s", @@ -10942,10 +11872,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, echo_async_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_nullable_bool_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_bool_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_nullable_bool_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableString%s", @@ -10955,9 +11883,7 @@ core_tests_pigeon_test_host_integration_core_api_new( echo_async_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_string_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_string_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_string_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -10968,9 +11894,7 @@ core_tests_pigeon_test_host_integration_core_api_new( echo_async_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_uint8_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_uint8_list_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_uint8_list_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_object_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableObject%s", @@ -10980,9 +11904,7 @@ core_tests_pigeon_test_host_integration_core_api_new( echo_async_nullable_object_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - echo_async_nullable_object_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_object_cb, - g_object_ref(self), g_object_unref); + echo_async_nullable_object_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableList%s", @@ -10991,10 +11913,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, echo_async_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_nullable_list_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_list_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_nullable_list_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableMap%s", @@ -11003,10 +11923,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, echo_async_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_nullable_map_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_map_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_nullable_map_channel, + nullptr, nullptr, nullptr); g_autofree gchar* echo_async_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoAsyncNullableEnum%s", @@ -11015,10 +11933,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, echo_async_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - echo_async_nullable_enum_channel, - core_tests_pigeon_test_host_integration_core_api_echo_async_nullable_enum_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(echo_async_nullable_enum_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_noop_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterNoop%s", @@ -11026,10 +11942,8 @@ core_tests_pigeon_test_host_integration_core_api_new( g_autoptr(FlBasicMessageChannel) call_flutter_noop_channel = fl_basic_message_channel_new(messenger, call_flutter_noop_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_noop_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_noop_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_noop_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_throw_error_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterThrowError%s", @@ -11038,10 +11952,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_throw_error_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_throw_error_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_throw_error_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_throw_error_from_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11052,9 +11964,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_throw_error_from_void_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_throw_error_from_void_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_throw_error_from_void_cb, - g_object_ref(self), g_object_unref); + call_flutter_throw_error_from_void_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_all_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoAllTypes%s", @@ -11064,9 +11974,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_all_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_all_types_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_types_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_all_types_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_all_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11078,9 +11986,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_echo_all_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_all_nullable_types_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_all_nullable_types_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_send_multiple_nullable_types_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11092,9 +11998,8 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_send_multiple_nullable_types_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_send_multiple_nullable_types_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_cb, - g_object_ref(self), g_object_unref); + call_flutter_send_multiple_nullable_types_channel, nullptr, nullptr, + nullptr); g_autofree gchar* call_flutter_echo_all_nullable_types_without_recursion_channel_name = g_strdup_printf( @@ -11109,9 +12014,8 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_all_nullable_types_without_recursion_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_all_nullable_types_without_recursion_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_all_nullable_types_without_recursion_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_all_nullable_types_without_recursion_channel, nullptr, + nullptr, nullptr); g_autofree gchar* call_flutter_send_multiple_nullable_types_without_recursion_channel_name = g_strdup_printf( @@ -11127,8 +12031,7 @@ core_tests_pigeon_test_host_integration_core_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( call_flutter_send_multiple_nullable_types_without_recursion_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_send_multiple_nullable_types_without_recursion_cb, - g_object_ref(self), g_object_unref); + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoBool%s", @@ -11137,10 +12040,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_bool_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_bool_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_bool_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_bool_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoInt%s", @@ -11149,10 +12050,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_int_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_int_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_int_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_int_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoDouble%s", @@ -11161,10 +12060,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_double_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_double_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_double_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_double_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoString%s", @@ -11173,10 +12070,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_string_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_string_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_string_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoUint8List%s", @@ -11186,9 +12081,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_uint8_list_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_uint8_list_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_uint8_list_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoList%s", @@ -11197,10 +12090,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_list_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_list_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_list_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_list_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoMap%s", @@ -11209,10 +12100,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_map_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_map_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_map_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_map_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "callFlutterEchoEnum%s", @@ -11221,10 +12110,8 @@ core_tests_pigeon_test_host_integration_core_api_new( fl_basic_message_channel_new(messenger, call_flutter_echo_enum_channel_name, FL_MESSAGE_CODEC(codec)); - fl_basic_message_channel_set_message_handler( - call_flutter_echo_enum_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_enum_cb, - g_object_ref(self), g_object_unref); + fl_basic_message_channel_set_message_handler(call_flutter_echo_enum_channel, + nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_bool_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11235,9 +12122,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_nullable_bool_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_bool_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_bool_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_bool_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_int_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11248,9 +12133,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_nullable_int_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_int_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_int_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_int_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_double_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11261,9 +12144,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_echo_nullable_double_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_double_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_double_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_double_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11274,9 +12155,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_echo_nullable_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_string_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_string_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_string_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_uint8_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11288,9 +12167,7 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_echo_nullable_uint8_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_uint8_list_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_uint8_list_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_uint8_list_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_list_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11301,9 +12178,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_nullable_list_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_list_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_list_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_list_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11314,9 +12189,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_nullable_map_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_map_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_map_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_map_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_echo_nullable_enum_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11327,9 +12200,7 @@ core_tests_pigeon_test_host_integration_core_api_new( call_flutter_echo_nullable_enum_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_echo_nullable_enum_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_echo_nullable_enum_cb, - g_object_ref(self), g_object_unref); + call_flutter_echo_nullable_enum_channel, nullptr, nullptr, nullptr); g_autofree gchar* call_flutter_small_api_echo_string_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." @@ -11340,15 +12211,10 @@ core_tests_pigeon_test_host_integration_core_api_new( messenger, call_flutter_small_api_echo_string_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( - call_flutter_small_api_echo_string_channel, - core_tests_pigeon_test_host_integration_core_api_call_flutter_small_api_echo_string_cb, - g_object_ref(self), g_object_unref); - - return self; + call_flutter_small_api_echo_string_channel, nullptr, nullptr, nullptr); } void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiNoopAsyncResponse) response = @@ -11363,7 +12229,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( } void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11380,7 +12245,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value) { g_autoptr( @@ -11397,7 +12261,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11414,7 +12277,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_i } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double return_value) { g_autoptr( @@ -11431,7 +12293,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11448,7 +12309,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_d } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value) { g_autoptr( @@ -11465,7 +12325,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11482,7 +12341,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_b } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( @@ -11499,7 +12357,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11516,7 +12373,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) @@ -11533,7 +12389,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_l } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiEchoAsyncUint8ListResponse) @@ -11550,7 +12405,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_u } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -11567,7 +12421,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11584,7 +12437,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_o } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -11601,7 +12453,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11618,7 +12469,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_l } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -11635,7 +12485,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11652,7 +12501,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_m } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value) { g_autoptr( @@ -11669,7 +12517,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11686,7 +12533,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_e } void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -11703,7 +12549,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( } void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11720,7 +12565,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ } void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiThrowAsyncErrorFromVoidResponse) @@ -11736,7 +12580,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11754,7 +12597,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ } void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -11772,7 +12614,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutte } void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11790,7 +12631,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_ } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value) { g_autoptr( @@ -11807,7 +12647,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_typ } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11824,7 +12663,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_a } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( @@ -11842,7 +12680,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11860,7 +12697,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( @@ -11879,7 +12715,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11898,7 +12733,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value) { g_autoptr( @@ -11916,7 +12750,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11934,7 +12767,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value) { g_autoptr( @@ -11952,7 +12784,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -11970,7 +12801,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value) { g_autoptr( @@ -11988,7 +12818,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12006,7 +12835,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( @@ -12024,7 +12852,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12042,7 +12869,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( @@ -12060,7 +12886,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12078,7 +12903,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12096,7 +12920,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12114,7 +12937,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12132,7 +12954,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12150,7 +12971,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12168,7 +12988,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12186,7 +13005,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value) { g_autoptr( @@ -12204,7 +13022,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl } void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12222,7 +13039,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterNoopResponse) response = @@ -12237,7 +13053,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12254,7 +13069,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12272,7 +13086,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12290,7 +13103,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle) { g_autoptr( CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterThrowErrorFromVoidResponse) @@ -12306,7 +13118,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12324,7 +13135,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value) { g_autoptr( @@ -12342,7 +13152,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12360,7 +13169,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( @@ -12378,7 +13186,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12396,7 +13203,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value) { g_autoptr( @@ -12414,7 +13220,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12432,7 +13237,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( @@ -12451,7 +13255,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12470,7 +13273,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value) { g_autoptr( @@ -12489,7 +13291,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12508,7 +13309,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value) { g_autoptr( @@ -12526,7 +13326,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12544,7 +13343,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) @@ -12561,7 +13359,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoIntResponse) @@ -12578,7 +13375,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double return_value) { g_autoptr( @@ -12596,7 +13392,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12614,7 +13409,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( @@ -12632,7 +13426,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12650,7 +13443,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( @@ -12668,7 +13460,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12686,7 +13477,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12704,7 +13494,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12722,7 +13511,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) @@ -12739,7 +13527,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostIntegrationCoreApiCallFlutterEchoMapResponse) @@ -12756,7 +13543,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value) { g_autoptr( @@ -12774,7 +13560,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12792,7 +13577,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value) { g_autoptr( @@ -12810,7 +13594,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12828,7 +13611,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value) { g_autoptr( @@ -12846,7 +13628,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12864,7 +13645,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value) { g_autoptr( @@ -12882,7 +13662,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12900,7 +13679,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( @@ -12918,7 +13696,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12936,7 +13713,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length) { g_autoptr( @@ -12954,7 +13730,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -12972,7 +13747,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -12990,7 +13764,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -13008,7 +13781,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value) { g_autoptr( @@ -13026,7 +13798,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -13044,7 +13815,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value) { g_autoptr( @@ -13062,7 +13832,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -13080,7 +13849,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter } void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr( @@ -13098,7 +13866,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small } void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* self, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr( @@ -17513,6 +18280,10 @@ core_tests_pigeon_test_host_trivial_api_noop_response_new_error( return self; } +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApi, + core_tests_pigeon_test_host_trivial_api, + CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API, GObject) + struct _CoreTestsPigeonTestHostTrivialApi { GObject parent_instance; @@ -17524,6 +18295,39 @@ struct _CoreTestsPigeonTestHostTrivialApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostTrivialApi, core_tests_pigeon_test_host_trivial_api, G_TYPE_OBJECT) +static void core_tests_pigeon_test_host_trivial_api_dispose(GObject* object) { + CoreTestsPigeonTestHostTrivialApi* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(object); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + G_OBJECT_CLASS(core_tests_pigeon_test_host_trivial_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_trivial_api_init( + CoreTestsPigeonTestHostTrivialApi* self) {} + +static void core_tests_pigeon_test_host_trivial_api_class_init( + CoreTestsPigeonTestHostTrivialApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_trivial_api_dispose; +} + +static CoreTestsPigeonTestHostTrivialApi* +core_tests_pigeon_test_host_trivial_api_new( + const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostTrivialApi* self = + CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( + core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + return self; +} + static void core_tests_pigeon_test_host_trivial_api_noop_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -17535,7 +18339,7 @@ static void core_tests_pigeon_test_host_trivial_api_noop_cb( } g_autoptr(CoreTestsPigeonTestHostTrivialApiNoopResponse) response = - self->vtable->noop(self, self->user_data); + self->vtable->noop(self->user_data); if (response == nullptr) { g_warning("No response returned to %s.%s", "HostTrivialApi", "noop"); return; @@ -17549,38 +18353,15 @@ static void core_tests_pigeon_test_host_trivial_api_noop_cb( } } -static void core_tests_pigeon_test_host_trivial_api_dispose(GObject* object) { - CoreTestsPigeonTestHostTrivialApi* self = - CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(object); - if (self->user_data != nullptr) { - self->user_data_free_func(self->user_data); - } - self->user_data = nullptr; - G_OBJECT_CLASS(core_tests_pigeon_test_host_trivial_api_parent_class) - ->dispose(object); -} - -static void core_tests_pigeon_test_host_trivial_api_init( - CoreTestsPigeonTestHostTrivialApi* self) {} - -static void core_tests_pigeon_test_host_trivial_api_class_init( - CoreTestsPigeonTestHostTrivialApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = - core_tests_pigeon_test_host_trivial_api_dispose; -} - -CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( +void core_tests_pigeon_test_host_trivial_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { - CoreTestsPigeonTestHostTrivialApi* self = - CORE_TESTS_PIGEON_TEST_HOST_TRIVIAL_API(g_object_new( - core_tests_pigeon_test_host_trivial_api_get_type(), nullptr)); g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); - self->vtable = vtable; - self->user_data = user_data; - self->user_data_free_func = user_data_free_func; + g_autoptr(CoreTestsPigeonTestHostTrivialApi) api_data = + core_tests_pigeon_test_host_trivial_api_new(vtable, user_data, + user_data_free_func); g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); @@ -17591,9 +18372,23 @@ CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( noop_channel, core_tests_pigeon_test_host_trivial_api_noop_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); +} - return self; +void core_tests_pigeon_test_host_trivial_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix) { + g_autofree gchar* dot_suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); + + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* noop_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostTrivialApi.noop%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) noop_channel = fl_basic_message_channel_new( + messenger, noop_channel_name, FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(noop_channel, nullptr, nullptr, + nullptr); } struct _CoreTestsPigeonTestHostSmallApiResponseHandle { @@ -17764,6 +18559,10 @@ core_tests_pigeon_test_host_small_api_void_void_response_new_error( return self; } +G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, + core_tests_pigeon_test_host_small_api, + CORE_TESTS_PIGEON_TEST, HOST_SMALL_API, GObject) + struct _CoreTestsPigeonTestHostSmallApi { GObject parent_instance; @@ -17775,6 +18574,38 @@ struct _CoreTestsPigeonTestHostSmallApi { G_DEFINE_TYPE(CoreTestsPigeonTestHostSmallApi, core_tests_pigeon_test_host_small_api, G_TYPE_OBJECT) +static void core_tests_pigeon_test_host_small_api_dispose(GObject* object) { + CoreTestsPigeonTestHostSmallApi* self = + CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(object); + if (self->user_data != nullptr) { + self->user_data_free_func(self->user_data); + } + self->user_data = nullptr; + G_OBJECT_CLASS(core_tests_pigeon_test_host_small_api_parent_class) + ->dispose(object); +} + +static void core_tests_pigeon_test_host_small_api_init( + CoreTestsPigeonTestHostSmallApi* self) {} + +static void core_tests_pigeon_test_host_small_api_class_init( + CoreTestsPigeonTestHostSmallApiClass* klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_small_api_dispose; +} + +static CoreTestsPigeonTestHostSmallApi* +core_tests_pigeon_test_host_small_api_new( + const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, + GDestroyNotify user_data_free_func) { + CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( + g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); + self->vtable = vtable; + self->user_data = user_data; + self->user_data_free_func = user_data_free_func; + return self; +} + static void core_tests_pigeon_test_host_small_api_echo_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -17790,7 +18621,7 @@ static void core_tests_pigeon_test_host_small_api_echo_cb( g_autoptr(CoreTestsPigeonTestHostSmallApiResponseHandle) handle = core_tests_pigeon_test_host_small_api_response_handle_new( channel, response_handle); - self->vtable->echo(self, a_string, handle, self->user_data); + self->vtable->echo(a_string, handle, self->user_data); } static void core_tests_pigeon_test_host_small_api_void_void_cb( @@ -17806,40 +18637,18 @@ static void core_tests_pigeon_test_host_small_api_void_void_cb( g_autoptr(CoreTestsPigeonTestHostSmallApiResponseHandle) handle = core_tests_pigeon_test_host_small_api_response_handle_new( channel, response_handle); - self->vtable->void_void(self, handle, self->user_data); -} - -static void core_tests_pigeon_test_host_small_api_dispose(GObject* object) { - CoreTestsPigeonTestHostSmallApi* self = - CORE_TESTS_PIGEON_TEST_HOST_SMALL_API(object); - if (self->user_data != nullptr) { - self->user_data_free_func(self->user_data); - } - self->user_data = nullptr; - G_OBJECT_CLASS(core_tests_pigeon_test_host_small_api_parent_class) - ->dispose(object); -} - -static void core_tests_pigeon_test_host_small_api_init( - CoreTestsPigeonTestHostSmallApi* self) {} - -static void core_tests_pigeon_test_host_small_api_class_init( - CoreTestsPigeonTestHostSmallApiClass* klass) { - G_OBJECT_CLASS(klass)->dispose = - core_tests_pigeon_test_host_small_api_dispose; + self->vtable->void_void(handle, self->user_data); } -CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( +void core_tests_pigeon_test_host_small_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func) { - CoreTestsPigeonTestHostSmallApi* self = CORE_TESTS_PIGEON_TEST_HOST_SMALL_API( - g_object_new(core_tests_pigeon_test_host_small_api_get_type(), nullptr)); g_autofree gchar* dot_suffix = suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); - self->vtable = vtable; - self->user_data = user_data; - self->user_data_free_func = user_data_free_func; + g_autoptr(CoreTestsPigeonTestHostSmallApi) api_data = + core_tests_pigeon_test_host_small_api_new(vtable, user_data, + user_data_free_func); g_autoptr(CoreTestsPigeonTestMessageCodec) codec = core_tests_pigeon_test_message_codec_new(); @@ -17850,7 +18659,7 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( messenger, echo_channel_name, FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( echo_channel, core_tests_pigeon_test_host_small_api_echo_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); g_autofree gchar* void_void_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid%s", dot_suffix); @@ -17859,13 +18668,34 @@ CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler( void_void_channel, core_tests_pigeon_test_host_small_api_void_void_cb, - g_object_ref(self), g_object_unref); + g_object_ref(api_data), g_object_unref); +} - return self; +void core_tests_pigeon_test_host_small_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix) { + g_autofree gchar* dot_suffix = + suffix != nullptr ? g_strdup_printf(".%s", suffix) : g_strdup(""); + + g_autoptr(CoreTestsPigeonTestMessageCodec) codec = + core_tests_pigeon_test_message_codec_new(); + g_autofree gchar* echo_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.echo%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_channel = fl_basic_message_channel_new( + messenger, echo_channel_name, FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(echo_channel, nullptr, nullptr, + nullptr); + g_autofree gchar* void_void_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostSmallApi.voidVoid%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) void_void_channel = + fl_basic_message_channel_new(messenger, void_void_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler(void_void_channel, nullptr, + nullptr, nullptr); } void core_tests_pigeon_test_host_small_api_respond_echo( - CoreTestsPigeonTestHostSmallApi* self, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* return_value) { g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = @@ -17880,7 +18710,6 @@ void core_tests_pigeon_test_host_small_api_respond_echo( } void core_tests_pigeon_test_host_small_api_respond_error_echo( - CoreTestsPigeonTestHostSmallApi* self, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostSmallApiEchoResponse) response = @@ -17896,7 +18725,6 @@ void core_tests_pigeon_test_host_small_api_respond_error_echo( } void core_tests_pigeon_test_host_small_api_respond_void_void( - CoreTestsPigeonTestHostSmallApi* self, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle) { g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = core_tests_pigeon_test_host_small_api_void_void_response_new(); @@ -17910,7 +18738,6 @@ void core_tests_pigeon_test_host_small_api_respond_void_void( } void core_tests_pigeon_test_host_small_api_respond_error_void_void( - CoreTestsPigeonTestHostSmallApi* self, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details) { g_autoptr(CoreTestsPigeonTestHostSmallApiVoidVoidResponse) response = diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index cc9c9167a882..086101d4b628 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -2131,10 +2131,6 @@ CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new_error( const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, - core_tests_pigeon_test_host_integration_core_api, - CORE_TESTS_PIGEON_TEST, HOST_INTEGRATION_CORE_API, GObject) - /** * CoreTestsPigeonTestHostIntegrationCoreApiVTable: * @@ -2143,348 +2139,292 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostIntegrationCoreApi, */ typedef struct { CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* (*noop)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* ( - *echo_all_types)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllTypes* everything, + *echo_all_types)(CoreTestsPigeonTestAllTypes* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* (*throw_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data); + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* ( - *throw_error_from_void)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gpointer user_data); + *throw_error_from_void)(gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* ( - *throw_flutter_error)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gpointer user_data); + *throw_flutter_error)(gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* (*echo_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, - gpointer user_data); + int64_t an_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* (*echo_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - gpointer user_data); + double a_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* (*echo_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, - gpointer user_data); + gboolean a_bool, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* (*echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - gpointer user_data); + const gchar* a_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* ( - *echo_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_uint8_list, size_t a_uint8_list_length, + *echo_uint8_list)(const uint8_t* a_uint8_list, size_t a_uint8_list_length, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* (*echo_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - gpointer user_data); + FlValue* an_object, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* (*echo_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, - gpointer user_data); + FlValue* list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* (*echo_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - gpointer user_data); + FlValue* a_map, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* ( - *echo_class_wrapper)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllClassesWrapper* wrapper, + *echo_class_wrapper)(CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* (*echo_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* ( - *echo_named_default_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - gpointer user_data); + *echo_named_default_string)(const gchar* a_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* ( - *echo_optional_default_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - gpointer user_data); + *echo_optional_default_double)(double a_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* ( - *echo_required_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t an_int, gpointer user_data); + *echo_required_int)(int64_t an_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* ( - *echo_all_nullable_types)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllNullableTypes* everything, + *echo_all_nullable_types)(CoreTestsPigeonTestAllNullableTypes* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* ( *echo_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* ( *extract_nested_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* ( - *create_nested_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* nullable_string, gpointer user_data); + *create_nested_nullable_string)(const gchar* nullable_string, + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* ( - *send_multiple_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, - gpointer user_data); + *send_multiple_nullable_types)(gboolean* a_nullable_bool, + int64_t* a_nullable_int, + const gchar* a_nullable_string, + gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* ( *send_multiple_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, - gpointer user_data); + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* ( - *echo_nullable_int)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t* a_nullable_int, gpointer user_data); + *echo_nullable_int)(int64_t* a_nullable_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* ( - *echo_nullable_double)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - double* a_nullable_double, gpointer user_data); + *echo_nullable_double)(double* a_nullable_double, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* ( - *echo_nullable_bool)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gboolean* a_nullable_bool, gpointer user_data); + *echo_nullable_bool)(gboolean* a_nullable_bool, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* ( - *echo_nullable_string)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* a_nullable_string, + *echo_nullable_string)(const gchar* a_nullable_string, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* ( - *echo_nullable_uint8_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_nullable_uint8_list, + *echo_nullable_uint8_list)(const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* ( - *echo_nullable_object)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_object, gpointer user_data); + *echo_nullable_object)(FlValue* a_nullable_object, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* ( - *echo_nullable_list)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_list, gpointer user_data); + *echo_nullable_list)(FlValue* a_nullable_list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* ( - *echo_nullable_map)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_map, gpointer user_data); + *echo_nullable_map)(FlValue* a_nullable_map, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* ( - *echo_nullable_enum)(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAnEnum* an_enum, + *echo_nullable_enum)(CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* ( - *echo_optional_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* a_nullable_int, - gpointer user_data); + *echo_optional_nullable_int)(int64_t* a_nullable_int, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* ( - *echo_named_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* a_nullable_string, gpointer user_data); + *echo_named_nullable_string)(const gchar* a_nullable_string, + gpointer user_data); void (*noop_async)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + int64_t an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, + double a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, + gboolean a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, + FlValue* an_object, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, + FlValue* list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*throw_async_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*throw_async_error_from_void)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*throw_async_flutter_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_all_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_all_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, + int64_t* an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, + double* a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, + gboolean* a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, size_t a_uint8_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_object)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, + FlValue* an_object, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, + FlValue* list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*echo_async_nullable_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_noop)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_throw_error)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_throw_error_from_void)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_send_multiple_nullable_types)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_all_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_send_multiple_nullable_types_without_recursion)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, + gboolean a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + int64_t an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, + double a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, - size_t list_length, + const uint8_t* list, size_t list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, + FlValue* list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_bool)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, + gboolean* a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_int)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, + int64_t* an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_double)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, + double* a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_uint8_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* list, - size_t list_length, + const uint8_t* list, size_t list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_list)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* list, + FlValue* list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_map)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_echo_nullable_enum)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestAnEnum* an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); void (*call_flutter_small_api_echo_string)( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data); } CoreTestsPigeonTestHostIntegrationCoreApiVTable; /** - * core_tests_pigeon_test_host_integration_core_api_new: + * core_tests_pigeon_test_host_integration_core_api_set_method_handlers: * * @messenger: an #FlBinaryMessenger. * @suffix: (allow-none): a suffix to add to the API or %NULL for none. @@ -2493,30 +2433,35 @@ typedef struct { * @user_data_free_func: (allow-none): a function which gets called to free * @user_data, or %NULL. * - * Creates an object to implement the HostIntegrationCoreApi API. - * - * Returns: a new #CoreTestsPigeonTestHostIntegrationCoreApi + * Connects the method handlers in the HostIntegrationCoreApi API. */ -CoreTestsPigeonTestHostIntegrationCoreApi* -core_tests_pigeon_test_host_integration_core_api_new( +void core_tests_pigeon_test_host_integration_core_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostIntegrationCoreApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * core_tests_pigeon_test_host_integration_core_api_clear_method_handlers: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Clears the method handlers in the HostIntegrationCoreApi API. + */ +void core_tests_pigeon_test_host_integration_core_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix); + /** * core_tests_pigeon_test_host_integration_core_api_respond_noop_async: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.noopAsync. */ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2525,26 +2470,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_noop_async( * Responds with an error to HostIntegrationCoreApi.noopAsync. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2553,26 +2494,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( * Responds with an error to HostIntegrationCoreApi.echoAsyncInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2581,26 +2518,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( * Responds with an error to HostIntegrationCoreApi.echoAsyncDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2609,26 +2542,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( * Responds with an error to HostIntegrationCoreApi.echoAsyncBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncString. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2637,13 +2566,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( * Responds with an error to HostIntegrationCoreApi.echoAsyncString. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value @@ -2652,13 +2579,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_s * Responds to HostIntegrationCoreApi.echoAsyncUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2667,26 +2592,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_l * Responds with an error to HostIntegrationCoreApi.echoAsyncUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2695,26 +2616,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( * Responds with an error to HostIntegrationCoreApi.echoAsyncObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncList. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2723,26 +2640,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( * Responds with an error to HostIntegrationCoreApi.echoAsyncList. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2751,26 +2664,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( * Responds with an error to HostIntegrationCoreApi.echoAsyncMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2779,26 +2688,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( * Responds with an error to HostIntegrationCoreApi.echoAsyncEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.throwAsyncError. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2807,24 +2712,20 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error( * Responds with an error to HostIntegrationCoreApi.throwAsyncError. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.throwAsyncErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2833,26 +2734,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_error_ * Responds with an error to HostIntegrationCoreApi.throwAsyncErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.throwAsyncFlutterError. */ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2861,26 +2758,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_throw_async_flutte * Responds with an error to HostIntegrationCoreApi.throwAsyncFlutterError. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2889,26 +2782,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_typ * Responds with an error to HostIntegrationCoreApi.echoAsyncAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2918,13 +2807,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @@ -2932,13 +2819,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2948,26 +2833,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * HostIntegrationCoreApi.echoAsyncNullableAllNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -2976,26 +2857,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3004,26 +2881,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3032,26 +2905,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3060,13 +2929,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value @@ -3075,13 +2942,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_n * Responds to HostIntegrationCoreApi.echoAsyncNullableUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3090,26 +2955,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3118,26 +2979,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableObject. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3146,26 +3003,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3174,26 +3027,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.echoAsyncNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3202,24 +3051,20 @@ void core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullabl * Responds with an error to HostIntegrationCoreApi.echoAsyncNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.callFlutterNoop. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3228,26 +3073,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( * Responds with an error to HostIntegrationCoreApi.callFlutterNoop. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterThrowError. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3256,24 +3097,20 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw * Responds with an error to HostIntegrationCoreApi.callFlutterThrowError. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * * Responds to HostIntegrationCoreApi.callFlutterThrowErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3283,26 +3120,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw * HostIntegrationCoreApi.callFlutterThrowErrorFromVoid. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3311,26 +3144,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoAllTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3340,26 +3169,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * HostIntegrationCoreApi.callFlutterEchoAllNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypes* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3369,13 +3194,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @@ -3383,13 +3206,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * HostIntegrationCoreApi.callFlutterEchoAllNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3399,13 +3220,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * HostIntegrationCoreApi.callFlutterEchoAllNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @@ -3413,13 +3232,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAllNullableTypesWithoutRecursion* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3429,26 +3246,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_ * HostIntegrationCoreApi.callFlutterSendMultipleNullableTypesWithoutRecursion. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3457,26 +3270,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3485,26 +3294,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3513,26 +3318,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3541,13 +3342,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value @@ -3556,13 +3355,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * Responds to HostIntegrationCoreApi.callFlutterEchoUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3571,26 +3368,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoList. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3599,26 +3392,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoList. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3627,26 +3416,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3655,26 +3440,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gboolean* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3683,26 +3464,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableBool. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, int64_t* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3711,26 +3488,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableInt. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, double* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3740,26 +3513,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * HostIntegrationCoreApi.callFlutterEchoNullableDouble. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3769,13 +3538,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * HostIntegrationCoreApi.callFlutterEchoNullableString. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * @return_value_length: (allow-none): location to write length of @return_value @@ -3784,13 +3551,11 @@ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter * Responds to HostIntegrationCoreApi.callFlutterEchoNullableUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const uint8_t* return_value, size_t return_value_length); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3800,26 +3565,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * HostIntegrationCoreApi.callFlutterEchoNullableUint8List. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3828,26 +3589,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableList. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, FlValue* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3856,26 +3613,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableMap. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterEchoNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, CoreTestsPigeonTestAnEnum* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3884,26 +3637,22 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_ * Responds with an error to HostIntegrationCoreApi.callFlutterEchoNullableEnum. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostIntegrationCoreApi.callFlutterSmallApiEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string: - * @api: a #CoreTestsPigeonTestHostIntegrationCoreApi. * @response_handle: a #CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle. * @code: error code. * @message: error message. @@ -3913,7 +3662,6 @@ void core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small * HostIntegrationCoreApi.callFlutterSmallApiEchoString. */ void core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); @@ -5814,7 +5562,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop( /** * core_tests_pigeon_test_flutter_integration_core_api_noop_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -5846,7 +5594,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error( /** * core_tests_pigeon_test_flutter_integration_core_api_throw_error_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -5879,7 +5627,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void( /** * core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -5915,7 +5663,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_types( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -5949,7 +5697,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types /** * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -5990,7 +5738,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ /** * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6027,7 +5775,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types /** * core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6068,7 +5816,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_ /** * core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6104,7 +5852,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_bool( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_bool_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6138,7 +5886,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_int( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_int_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6172,7 +5920,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_double( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_double_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6206,7 +5954,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_string( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_string_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6241,7 +5989,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6275,7 +6023,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_list( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_list_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6309,7 +6057,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_map( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_map_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6343,7 +6091,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_enum( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_enum_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6377,7 +6125,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6413,7 +6161,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6448,7 +6196,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6484,7 +6232,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6521,7 +6269,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_lis /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6557,7 +6305,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6593,7 +6341,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6628,7 +6376,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6664,7 +6412,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_noop_async( /** * core_tests_pigeon_test_flutter_integration_core_api_noop_async_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6698,7 +6446,7 @@ void core_tests_pigeon_test_flutter_integration_core_api_echo_async_string( /** * core_tests_pigeon_test_flutter_integration_core_api_echo_async_string_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterIntegrationCoreApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -6744,10 +6492,6 @@ CoreTestsPigeonTestHostTrivialApiNoopResponse* core_tests_pigeon_test_host_trivial_api_noop_response_new_error( const gchar* code, const gchar* message, FlValue* details); -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApi, - core_tests_pigeon_test_host_trivial_api, - CORE_TESTS_PIGEON_TEST, HOST_TRIVIAL_API, GObject) - /** * CoreTestsPigeonTestHostTrivialApiVTable: * @@ -6755,12 +6499,11 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostTrivialApi, * provider. */ typedef struct { - CoreTestsPigeonTestHostTrivialApiNoopResponse* (*noop)( - CoreTestsPigeonTestHostTrivialApi* api, gpointer user_data); + CoreTestsPigeonTestHostTrivialApiNoopResponse* (*noop)(gpointer user_data); } CoreTestsPigeonTestHostTrivialApiVTable; /** - * core_tests_pigeon_test_host_trivial_api_new: + * core_tests_pigeon_test_host_trivial_api_set_method_handlers: * * @messenger: an #FlBinaryMessenger. * @suffix: (allow-none): a suffix to add to the API or %NULL for none. @@ -6769,24 +6512,29 @@ typedef struct { * @user_data_free_func: (allow-none): a function which gets called to free * @user_data, or %NULL. * - * Creates an object to implement the HostTrivialApi API. - * - * Returns: a new #CoreTestsPigeonTestHostTrivialApi + * Connects the method handlers in the HostTrivialApi API. */ -CoreTestsPigeonTestHostTrivialApi* core_tests_pigeon_test_host_trivial_api_new( +void core_tests_pigeon_test_host_trivial_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostTrivialApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * core_tests_pigeon_test_host_trivial_api_clear_method_handlers: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Clears the method handlers in the HostTrivialApi API. + */ +void core_tests_pigeon_test_host_trivial_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix); + G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApiResponseHandle, core_tests_pigeon_test_host_small_api_response_handle, CORE_TESTS_PIGEON_TEST, HOST_SMALL_API_RESPONSE_HANDLE, GObject) -G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, - core_tests_pigeon_test_host_small_api, - CORE_TESTS_PIGEON_TEST, HOST_SMALL_API, GObject) - /** * CoreTestsPigeonTestHostSmallApiVTable: * @@ -6794,17 +6542,16 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestHostSmallApi, * provider. */ typedef struct { - void (*echo)(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, + void (*echo)(const gchar* a_string, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data); void (*void_void)( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data); } CoreTestsPigeonTestHostSmallApiVTable; /** - * core_tests_pigeon_test_host_small_api_new: + * core_tests_pigeon_test_host_small_api_set_method_handlers: * * @messenger: an #FlBinaryMessenger. * @suffix: (allow-none): a suffix to add to the API or %NULL for none. @@ -6813,31 +6560,37 @@ typedef struct { * @user_data_free_func: (allow-none): a function which gets called to free * @user_data, or %NULL. * - * Creates an object to implement the HostSmallApi API. - * - * Returns: a new #CoreTestsPigeonTestHostSmallApi + * Connects the method handlers in the HostSmallApi API. */ -CoreTestsPigeonTestHostSmallApi* core_tests_pigeon_test_host_small_api_new( +void core_tests_pigeon_test_host_small_api_set_method_handlers( FlBinaryMessenger* messenger, const gchar* suffix, const CoreTestsPigeonTestHostSmallApiVTable* vtable, gpointer user_data, GDestroyNotify user_data_free_func); +/** + * core_tests_pigeon_test_host_small_api_clear_method_handlers: + * + * @messenger: an #FlBinaryMessenger. + * @suffix: (allow-none): a suffix to add to the API or %NULL for none. + * + * Clears the method handlers in the HostSmallApi API. + */ +void core_tests_pigeon_test_host_small_api_clear_method_handlers( + FlBinaryMessenger* messenger, const gchar* suffix); + /** * core_tests_pigeon_test_host_small_api_respond_echo: - * @api: a #CoreTestsPigeonTestHostSmallApi. * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @return_value: location to write the value returned by this method. * * Responds to HostSmallApi.echo. */ void core_tests_pigeon_test_host_small_api_respond_echo( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* return_value); /** * core_tests_pigeon_test_host_small_api_respond_error_echo: - * @api: a #CoreTestsPigeonTestHostSmallApi. * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @code: error code. * @message: error message. @@ -6846,24 +6599,20 @@ void core_tests_pigeon_test_host_small_api_respond_echo( * Responds with an error to HostSmallApi.echo. */ void core_tests_pigeon_test_host_small_api_respond_error_echo( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); /** * core_tests_pigeon_test_host_small_api_respond_void_void: - * @api: a #CoreTestsPigeonTestHostSmallApi. * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * * Responds to HostSmallApi.voidVoid. */ void core_tests_pigeon_test_host_small_api_respond_void_void( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle); /** * core_tests_pigeon_test_host_small_api_respond_error_void_void: - * @api: a #CoreTestsPigeonTestHostSmallApi. * @response_handle: a #CoreTestsPigeonTestHostSmallApiResponseHandle. * @code: error code. * @message: error message. @@ -6872,7 +6621,6 @@ void core_tests_pigeon_test_host_small_api_respond_void_void( * Responds with an error to HostSmallApi.voidVoid. */ void core_tests_pigeon_test_host_small_api_respond_error_void_void( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, const gchar* code, const gchar* message, FlValue* details); @@ -7046,7 +6794,7 @@ void core_tests_pigeon_test_flutter_small_api_echo_wrapped_list( /** * core_tests_pigeon_test_flutter_small_api_echo_wrapped_list_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterSmallApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. @@ -7079,7 +6827,7 @@ void core_tests_pigeon_test_flutter_small_api_echo_string( /** * core_tests_pigeon_test_flutter_small_api_echo_string_finish: - * @api: a #className. + * @api: a #CoreTestsPigeonTestFlutterSmallApi. * @result: a #GAsyncResult. * @error: (allow-none): #GError location to store the error occurring, or %NULL * to ignore. diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc index 8623c128326e..4e9ab9a9a279 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/multiple_arity_test.cc @@ -8,8 +8,7 @@ #include "test/utils/fake_host_messenger.h" static MultipleArityPigeonTestMultipleArityHostApiSubtractResponse* subtract( - MultipleArityPigeonTestMultipleArityHostApi* api, int64_t x, int64_t y, - gpointer user_data) { + int64_t x, int64_t y, gpointer user_data) { return multiple_arity_pigeon_test_multiple_arity_host_api_subtract_response_new( x - y); } @@ -26,10 +25,8 @@ TEST(MultipleArity, HostSimple) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(MultipleArityPigeonTestMultipleArityHostApi) api = - multiple_arity_pigeon_test_multiple_arity_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + multiple_arity_pigeon_test_multiple_arity_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc index d4ef36521237..0dc2a346fad3 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/nullable_returns_test.cc @@ -8,8 +8,7 @@ #include "test/utils/fake_host_messenger.h" static NullableReturnsPigeonTestNullableArgHostApiDoitResponse* arg_doit( - NullableReturnsPigeonTestNullableArgHostApi* api, int64_t* x, - gpointer user_data) { + int64_t* x, gpointer user_data) { return nullable_returns_pigeon_test_nullable_arg_host_api_doit_response_new( x == nullptr ? 42 : *x); } @@ -26,11 +25,8 @@ TEST(NullableReturns, HostNullableArgNull) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = - nullable_returns_pigeon_test_nullable_arg_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, - nullptr); - (void)api; // unused variable + nullable_returns_pigeon_test_nullable_arg_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, nullptr); int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -47,11 +43,8 @@ TEST(NullableReturns, HostNullableArgNonNull) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(NullableReturnsPigeonTestNullableArgHostApi) api = - nullable_returns_pigeon_test_nullable_arg_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, - nullptr); - (void)api; // unused variable + nullable_returns_pigeon_test_nullable_arg_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &arg_vtable, nullptr, nullptr); int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -65,8 +58,7 @@ TEST(NullableReturns, HostNullableArgNonNull) { } static NullableReturnsPigeonTestNullableReturnHostApiDoitResponse* -return_null_doit(NullableReturnsPigeonTestNullableReturnHostApi* api, - gpointer user_data) { +return_null_doit(gpointer user_data) { return nullable_returns_pigeon_test_nullable_return_host_api_doit_response_new( nullptr); } @@ -75,8 +67,7 @@ static NullableReturnsPigeonTestNullableReturnHostApiVTable return_null_vtable = {.doit = return_null_doit}; static NullableReturnsPigeonTestNullableReturnHostApiDoitResponse* -return_nonnull_doit(NullableReturnsPigeonTestNullableReturnHostApi* api, - gpointer user_data) { +return_nonnull_doit(gpointer user_data) { int64_t return_value = 42; return nullable_returns_pigeon_test_nullable_return_host_api_doit_response_new( &return_value); @@ -100,11 +91,9 @@ TEST(NullableReturns, HostNullableReturnNull) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = - nullable_returns_pigeon_test_nullable_return_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &return_null_vtable, nullptr, - nullptr); - (void)api; // unused variable + nullable_returns_pigeon_test_nullable_return_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &return_null_vtable, nullptr, + nullptr); // Initialize to a non-null value to ensure that it's actually set to null, // rather than just never set. @@ -124,11 +113,9 @@ TEST(NullableReturns, HostNullableReturnNonNull) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(NullableReturnsPigeonTestNullableReturnHostApi) api = - nullable_returns_pigeon_test_nullable_return_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &return_nonnull_vtable, - nullptr, nullptr); - (void)api; // unused variable + nullable_returns_pigeon_test_nullable_return_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &return_nonnull_vtable, nullptr, + nullptr); g_autofree int64_t* result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc index 8bcb3b82aa82..cfb67feb069d 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test/primitive_test.cc @@ -8,58 +8,49 @@ #include "test/utils/fake_host_messenger.h" static PrimitivePigeonTestPrimitiveHostApiAnIntResponse* an_int( - PrimitivePigeonTestPrimitiveHostApi* api, int64_t value, - gpointer user_data) { + int64_t value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_an_int_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiABoolResponse* a_bool( - PrimitivePigeonTestPrimitiveHostApi* api, gboolean value, - gpointer user_data) { + gboolean value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_bool_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiAStringResponse* a_string( - PrimitivePigeonTestPrimitiveHostApi* api, const gchar* value, - gpointer user_data) { + const gchar* value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_string_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiADoubleResponse* a_double( - PrimitivePigeonTestPrimitiveHostApi* api, double value, - gpointer user_data) { + double value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_double_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiAMapResponse* a_map( - PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, - gpointer user_data) { + FlValue* value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_map_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiAListResponse* a_list( - PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, - gpointer user_data) { + FlValue* value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_list_response_new(value); } static PrimitivePigeonTestPrimitiveHostApiAnInt32ListResponse* an_int32_list( - PrimitivePigeonTestPrimitiveHostApi* api, const int32_t* value, - size_t value_length, gpointer user_data) { + const int32_t* value, size_t value_length, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_an_int32_list_response_new( value, value_length); } static PrimitivePigeonTestPrimitiveHostApiABoolListResponse* a_bool_list( - PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, - gpointer user_data) { + FlValue* value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_bool_list_response_new( value); } static PrimitivePigeonTestPrimitiveHostApiAStringIntMapResponse* -a_string_int_map(PrimitivePigeonTestPrimitiveHostApi* api, FlValue* value, - gpointer user_data) { +a_string_int_map(FlValue* value, gpointer user_data) { return primitive_pigeon_test_primitive_host_api_a_string_int_map_response_new( value); } @@ -84,10 +75,8 @@ TEST(Primitive, HostInt) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); int64_t result = 0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -109,10 +98,8 @@ TEST(Primitive, HostBool) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); gboolean result = false; g_autoptr(FlValue) message = fl_value_new_list(); @@ -134,10 +121,8 @@ TEST(Primitive, HostDouble) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); double result = 0.0; g_autoptr(FlValue) message = fl_value_new_list(); @@ -159,10 +144,8 @@ TEST(Primitive, HostString) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); g_autofree gchar* result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); @@ -184,10 +167,8 @@ TEST(Primitive, HostList) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); g_autoptr(FlValue) result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); @@ -214,10 +195,8 @@ TEST(Primitive, HostMap) { g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new(); g_autoptr(FakeHostMessenger) messenger = fake_host_messenger_new(FL_MESSAGE_CODEC(codec)); - g_autoptr(PrimitivePigeonTestPrimitiveHostApi) api = - primitive_pigeon_test_primitive_host_api_new( - FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); - (void)api; // unused variable + primitive_pigeon_test_primitive_host_api_set_method_handlers( + FL_BINARY_MESSENGER(messenger), nullptr, &vtable, nullptr, nullptr); g_autoptr(FlValue) result = nullptr; g_autoptr(FlValue) message = fl_value_new_list(); diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index eda1b269fc69..010bd97bdc22 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -16,11 +16,6 @@ struct _TestPlugin { GObject parent_instance; - CoreTestsPigeonTestHostIntegrationCoreApi* host_core_api; - - CoreTestsPigeonTestHostSmallApi* host_small_api_one; - CoreTestsPigeonTestHostSmallApi* host_small_api_two; - CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; CoreTestsPigeonTestFlutterSmallApi* flutter_small_api_one; @@ -56,134 +51,118 @@ static void callback_data_free(CallbackData* data) { G_DEFINE_AUTOPTR_CLEANUP_FUNC(CallbackData, callback_data_free) static CoreTestsPigeonTestHostIntegrationCoreApiNoopResponse* noop( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { + gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_noop_response_new(); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllTypesResponse* -echo_all_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllTypes* everything, gpointer user_data) { +echo_all_types(CoreTestsPigeonTestAllTypes* everything, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_all_types_response_new( everything); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorResponse* throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gpointer user_data) { + gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_throw_error_response_new_error( "An error", "", nullptr); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowErrorFromVoidResponse* -throw_error_from_void(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gpointer user_data) { +throw_error_from_void(gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_throw_error_from_void_response_new_error( "An error", "", nullptr); } static CoreTestsPigeonTestHostIntegrationCoreApiThrowFlutterErrorResponse* -throw_flutter_error(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gpointer user_data) { +throw_flutter_error(gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); return core_tests_pigeon_test_host_integration_core_api_throw_flutter_error_response_new_error( "code", "message", details); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoIntResponse* echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, - gpointer user_data) { + int64_t an_int, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_int_response_new( an_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoDoubleResponse* echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, - gpointer user_data) { + double a_double, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_double_response_new( a_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoBoolResponse* echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, - gpointer user_data) { + gboolean a_bool, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_bool_response_new( a_bool); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoStringResponse* echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, - gpointer user_data) { + const gchar* a_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_string_response_new( a_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoUint8ListResponse* -echo_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_uint8_list, size_t a_uint8_list_length, +echo_uint8_list(const uint8_t* a_uint8_list, size_t a_uint8_list_length, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_uint8_list_response_new( a_uint8_list, a_uint8_list_length); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoObjectResponse* echo_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, - gpointer user_data) { + FlValue* an_object, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_object_response_new( an_object); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoListResponse* echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, - gpointer user_data) { + FlValue* a_list, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_list_response_new( a_list); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, - gpointer user_data) { + FlValue* a_map, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_map_response_new( a_map); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoClassWrapperResponse* -echo_class_wrapper(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllClassesWrapper* wrapper, +echo_class_wrapper(CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_class_wrapper_response_new( wrapper); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoEnumResponse* echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum an_enum, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_enum_response_new( an_enum); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedDefaultStringResponse* -echo_named_default_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* a_string, gpointer user_data) { +echo_named_default_string(const gchar* a_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_named_default_string_response_new( a_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalDefaultDoubleResponse* -echo_optional_default_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, - double a_double, gpointer user_data) { +echo_optional_default_double(double a_double, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_optional_default_double_response_new( a_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoRequiredIntResponse* -echo_required_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t an_int, gpointer user_data) { +echo_required_int(int64_t an_int, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_required_int_response_new( an_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesResponse* -echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllNullableTypes* everything, +echo_all_nullable_types(CoreTestsPigeonTestAllNullableTypes* everything, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_response_new( everything); @@ -191,7 +170,7 @@ echo_all_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, static CoreTestsPigeonTestHostIntegrationCoreApiEchoAllNullableTypesWithoutRecursionResponse* echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_all_nullable_types_without_recursion_response_new( @@ -199,8 +178,7 @@ echo_all_nullable_types_without_recursion( } static CoreTestsPigeonTestHostIntegrationCoreApiExtractNestedNullableStringResponse* -extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAllClassesWrapper* wrapper, +extract_nested_nullable_string(CoreTestsPigeonTestAllClassesWrapper* wrapper, gpointer user_data) { CoreTestsPigeonTestAllNullableTypes* types = core_tests_pigeon_test_all_classes_wrapper_get_all_nullable_types( @@ -210,8 +188,7 @@ extract_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, } static CoreTestsPigeonTestHostIntegrationCoreApiCreateNestedNullableStringResponse* -create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* nullable_string, +create_nested_nullable_string(const gchar* nullable_string, gpointer user_data) { g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = core_tests_pigeon_test_all_nullable_types_new( @@ -226,8 +203,7 @@ create_nested_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, } static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesResponse* -send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gboolean* a_nullable_bool, int64_t* a_nullable_int, +send_multiple_nullable_types(gboolean* a_nullable_bool, int64_t* a_nullable_int, const gchar* a_nullable_string, gpointer user_data) { g_autoptr(CoreTestsPigeonTestAllNullableTypes) types = @@ -241,10 +217,10 @@ send_multiple_nullable_types(CoreTestsPigeonTestHostIntegrationCoreApi* api, } static CoreTestsPigeonTestHostIntegrationCoreApiSendMultipleNullableTypesWithoutRecursionResponse* -send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, - gpointer user_data) { +send_multiple_nullable_types_without_recursion(gboolean* a_nullable_bool, + int64_t* a_nullable_int, + const gchar* a_nullable_string, + gpointer user_data) { g_autoptr(CoreTestsPigeonTestAllNullableTypesWithoutRecursion) types = core_tests_pigeon_test_all_nullable_types_without_recursion_new( a_nullable_bool, a_nullable_int, nullptr, nullptr, nullptr, 0, @@ -256,36 +232,31 @@ send_multiple_nullable_types_without_recursion( } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableIntResponse* -echo_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t* a_nullable_int, gpointer user_data) { +echo_nullable_int(int64_t* a_nullable_int, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_int_response_new( a_nullable_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableDoubleResponse* -echo_nullable_double(CoreTestsPigeonTestHostIntegrationCoreApi* api, - double* a_nullable_double, gpointer user_data) { +echo_nullable_double(double* a_nullable_double, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_double_response_new( a_nullable_double); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableBoolResponse* -echo_nullable_bool(CoreTestsPigeonTestHostIntegrationCoreApi* api, - gboolean* a_nullable_bool, gpointer user_data) { +echo_nullable_bool(gboolean* a_nullable_bool, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_bool_response_new( a_nullable_bool); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableStringResponse* -echo_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* a_nullable_string, gpointer user_data) { +echo_nullable_string(const gchar* a_nullable_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_string_response_new( a_nullable_string); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableUint8ListResponse* -echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const uint8_t* a_nullable_uint8_list, +echo_nullable_uint8_list(const uint8_t* a_nullable_uint8_list, size_t a_nullable_uint8_list_length, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_uint8_list_response_new( @@ -293,255 +264,247 @@ echo_nullable_uint8_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableObjectResponse* -echo_nullable_object(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_object, gpointer user_data) { +echo_nullable_object(FlValue* a_nullable_object, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_object_response_new( a_nullable_object); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableListResponse* -echo_nullable_list(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_list, gpointer user_data) { +echo_nullable_list(FlValue* a_nullable_list, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_list_response_new( a_nullable_list); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableMapResponse* -echo_nullable_map(CoreTestsPigeonTestHostIntegrationCoreApi* api, - FlValue* a_nullable_map, gpointer user_data) { +echo_nullable_map(FlValue* a_nullable_map, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_map_response_new( a_nullable_map); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNullableEnumResponse* -echo_nullable_enum(CoreTestsPigeonTestHostIntegrationCoreApi* api, - CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data) { +echo_nullable_enum(CoreTestsPigeonTestAnEnum* an_enum, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_nullable_enum_response_new( an_enum); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoOptionalNullableIntResponse* -echo_optional_nullable_int(CoreTestsPigeonTestHostIntegrationCoreApi* api, - int64_t* a_nullable_int, gpointer user_data) { +echo_optional_nullable_int(int64_t* a_nullable_int, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_optional_nullable_int_response_new( a_nullable_int); } static CoreTestsPigeonTestHostIntegrationCoreApiEchoNamedNullableStringResponse* -echo_named_nullable_string(CoreTestsPigeonTestHostIntegrationCoreApi* api, - const gchar* a_nullable_string, gpointer user_data) { +echo_named_nullable_string(const gchar* a_nullable_string, gpointer user_data) { return core_tests_pigeon_test_host_integration_core_api_echo_named_nullable_string_response_new( a_nullable_string); } static void noop_async( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_noop_async( - api, response_handle); + response_handle); } static void echo_async_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + int64_t an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_int( - api, response_handle, an_int); + response_handle, an_int); } static void echo_async_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, + double a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_double( - api, response_handle, a_double); + response_handle, a_double); } static void echo_async_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, + gboolean a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_bool( - api, response_handle, a_bool); + response_handle, a_bool); } static void echo_async_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_string( - api, response_handle, a_string); + response_handle, a_string); } static void echo_async_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, - size_t a_uint8_list_length, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_uint8_list( - api, response_handle, a_uint8_list, a_uint8_list_length); + response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, + FlValue* an_object, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_object( - api, response_handle, an_object); + response_handle, an_object); } static void echo_async_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, + FlValue* a_list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_list( - api, response_handle, a_list); + response_handle, a_list); } static void echo_async_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_map( - api, response_handle, a_map); + response_handle, a_map); } static void echo_async_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_enum( - api, response_handle, an_enum); + response_handle, an_enum); } static void throw_async_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error( - api, response_handle, "code", "message", details); + response_handle, "code", "message", details); } static void throw_async_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_error_from_void( - api, response_handle, "code", "message", details); + response_handle, "code", "message", details); } static void throw_async_flutter_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { g_autoptr(FlValue) details = fl_value_new_string("details"); core_tests_pigeon_test_host_integration_core_api_respond_error_throw_async_flutter_error( - api, response_handle, "code", "message", details); + response_handle, "code", "message", details); } static void echo_async_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_all_types( - api, response_handle, everything); + response_handle, everything); } static void echo_async_nullable_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllNullableTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types( - api, response_handle, everything); + response_handle, everything); } static void echo_async_nullable_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_all_nullable_types_without_recursion( - api, response_handle, everything); + response_handle, everything); } static void echo_async_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, + int64_t* an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_int( - api, response_handle, an_int); + response_handle, an_int); } static void echo_async_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, + double* a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_double( - api, response_handle, a_double); + response_handle, a_double); } static void echo_async_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, + gboolean* a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_bool( - api, response_handle, a_bool); + response_handle, a_bool); } static void echo_async_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_string( - api, response_handle, a_string); + response_handle, a_string); } static void echo_async_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_uint8_list, - size_t a_uint8_list_length, + const uint8_t* a_uint8_list, size_t a_uint8_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_uint8_list( - api, response_handle, a_uint8_list, a_uint8_list_length); + response_handle, a_uint8_list, a_uint8_list_length); } static void echo_async_nullable_object( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* an_object, + FlValue* an_object, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_object( - api, response_handle, an_object); + response_handle, an_object); } static void echo_async_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, + FlValue* a_list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_list( - api, response_handle, a_list); + response_handle, a_list); } static void echo_async_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_map( - api, response_handle, a_map); + response_handle, a_map); } static void echo_async_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum* an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { core_tests_pigeon_test_host_integration_core_api_respond_echo_async_nullable_enum( - api, response_handle, an_enum); + response_handle, an_enum); } static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { @@ -554,14 +517,13 @@ static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_noop( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_noop_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_noop_response_get_error_message( @@ -572,11 +534,11 @@ static void noop_cb(GObject* object, GAsyncResult* result, gpointer user_data) { } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_noop( - data->self->host_core_api, data->response_handle); + data->response_handle); } static void call_flutter_noop( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -598,14 +560,13 @@ static void throw_error_cb(GObject* object, GAsyncResult* result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_error_message( @@ -616,13 +577,13 @@ static void throw_error_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_throw_error_response_get_return_value( response)); } static void call_flutter_throw_error( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -645,14 +606,13 @@ static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_throw_error_from_void( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_throw_error_from_void_response_get_error_message( @@ -663,11 +623,11 @@ static void throw_error_from_void_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_throw_error_from_void( - data->self->host_core_api, data->response_handle); + data->response_handle); } static void call_flutter_throw_error_from_void( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -689,14 +649,13 @@ static void echo_all_types_cb(GObject* object, GAsyncResult* result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_types( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_error_message( @@ -707,13 +666,13 @@ static void echo_all_types_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_types( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_types_response_get_return_value( response)); } static void call_flutter_echo_all_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { @@ -737,14 +696,13 @@ static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_error_message( @@ -755,13 +713,13 @@ static void echo_all_nullable_types_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_response_get_return_value( response)); } static void call_flutter_echo_all_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllNullableTypes* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { @@ -786,14 +744,13 @@ static void send_multiple_nullable_types_cb(GObject* object, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_error_message( @@ -804,14 +761,14 @@ static void send_multiple_nullable_types_cb(GObject* object, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_response_get_return_value( response)); } static void call_flutter_send_multiple_nullable_types( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -836,14 +793,13 @@ static void echo_all_nullable_types_without_recursion_cb(GObject* object, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_all_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_error_message( @@ -854,13 +810,13 @@ static void echo_all_nullable_types_without_recursion_cb(GObject* object, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_all_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_all_nullable_types_without_recursion_response_get_return_value( response)); } static void call_flutter_echo_all_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAllNullableTypesWithoutRecursion* everything, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { @@ -885,14 +841,13 @@ static void send_multiple_nullable_types_without_recursion_cb( result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_send_multiple_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_error_message( @@ -903,14 +858,14 @@ static void send_multiple_nullable_types_without_recursion_cb( } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_send_multiple_nullable_types_without_recursion( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_send_multiple_nullable_types_without_recursion_response_get_return_value( response)); } static void call_flutter_send_multiple_nullable_types_without_recursion( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_nullable_bool, - int64_t* a_nullable_int, const gchar* a_nullable_string, + gboolean* a_nullable_bool, int64_t* a_nullable_int, + const gchar* a_nullable_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -934,14 +889,13 @@ static void echo_bool_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_error_message( @@ -952,13 +906,13 @@ static void echo_bool_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_bool_response_get_return_value( response)); } static void call_flutter_echo_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean a_bool, + gboolean a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -980,14 +934,13 @@ static void echo_int_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_int( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_error_message( @@ -998,13 +951,13 @@ static void echo_int_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_int( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_int_response_get_return_value( response)); } static void call_flutter_echo_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t an_int, + int64_t an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1026,14 +979,13 @@ static void echo_double_cb(GObject* object, GAsyncResult* result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_double( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_error_message( @@ -1044,13 +996,13 @@ static void echo_double_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_double( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_double_response_get_return_value( response)); } static void call_flutter_echo_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double a_double, + double a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1072,14 +1024,13 @@ static void echo_string_cb(GObject* object, GAsyncResult* result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_string( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_error_message( @@ -1090,13 +1041,13 @@ static void echo_string_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_string( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_string_response_get_return_value( response)); } static void call_flutter_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1118,14 +1069,13 @@ static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_uint8_list( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_error_message( @@ -1140,13 +1090,11 @@ static void echo_uint8_list_cb(GObject* object, GAsyncResult* result, core_tests_pigeon_test_flutter_integration_core_api_echo_uint8_list_response_get_return_value( response, &return_value_length); core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_uint8_list( - data->self->host_core_api, data->response_handle, return_value, - return_value_length); + data->response_handle, return_value, return_value_length); } static void call_flutter_echo_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, - size_t a_list_length, + const uint8_t* a_list, size_t a_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1168,14 +1116,13 @@ static void echo_list_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_list( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_error_message( @@ -1186,13 +1133,13 @@ static void echo_list_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_list( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_list_response_get_return_value( response)); } static void call_flutter_echo_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, + FlValue* a_list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1214,14 +1161,13 @@ static void echo_map_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_map( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_error_message( @@ -1232,13 +1178,13 @@ static void echo_map_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_map( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_map_response_get_return_value( response)); } static void call_flutter_echo_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1260,14 +1206,13 @@ static void echo_enum_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_enum( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_error_message( @@ -1278,13 +1223,13 @@ static void echo_enum_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_enum( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_enum_response_get_return_value( response)); } static void call_flutter_echo_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { @@ -1308,14 +1253,13 @@ static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_bool( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_error_message( @@ -1326,13 +1270,13 @@ static void echo_nullable_bool_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_bool_response_get_return_value( response)); } static void call_flutter_echo_nullable_bool( - CoreTestsPigeonTestHostIntegrationCoreApi* api, gboolean* a_bool, + gboolean* a_bool, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1354,14 +1298,13 @@ static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_int( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_error_message( @@ -1372,13 +1315,13 @@ static void echo_nullable_int_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_int( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_int_response_get_return_value( response)); } static void call_flutter_echo_nullable_int( - CoreTestsPigeonTestHostIntegrationCoreApi* api, int64_t* an_int, + int64_t* an_int, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1401,14 +1344,13 @@ static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_double( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_error_message( @@ -1419,13 +1361,13 @@ static void echo_nullable_double_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_double( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_double_response_get_return_value( response)); } static void call_flutter_echo_nullable_double( - CoreTestsPigeonTestHostIntegrationCoreApi* api, double* a_double, + double* a_double, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1448,14 +1390,13 @@ static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_string( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_error_message( @@ -1466,13 +1407,13 @@ static void echo_nullable_string_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_string( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_string_response_get_return_value( response)); } static void call_flutter_echo_nullable_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1495,14 +1436,13 @@ static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_uint8_list( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_error_message( @@ -1517,13 +1457,11 @@ static void echo_nullable_uint8_list_cb(GObject* object, GAsyncResult* result, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_uint8_list_response_get_return_value( response, &return_value_length); core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_uint8_list( - data->self->host_core_api, data->response_handle, return_value, - return_value_length); + data->response_handle, return_value, return_value_length); } static void call_flutter_echo_nullable_uint8_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const uint8_t* a_list, - size_t a_list_length, + const uint8_t* a_list, size_t a_list_length, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1546,14 +1484,13 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_list( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_error_message( @@ -1564,13 +1501,13 @@ static void echo_nullable_list_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_list( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_list_response_get_return_value( response)); } static void call_flutter_echo_nullable_list( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_list, + FlValue* a_list, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1592,14 +1529,13 @@ static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_map( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_error_message( @@ -1610,13 +1546,13 @@ static void echo_nullable_map_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_map( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_map_response_get_return_value( response)); } static void call_flutter_echo_nullable_map( - CoreTestsPigeonTestHostIntegrationCoreApi* api, FlValue* a_map, + FlValue* a_map, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1639,14 +1575,13 @@ static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_nullable_enum( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_code( response), core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_error_message( @@ -1657,13 +1592,13 @@ static void echo_nullable_enum_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_echo_nullable_enum( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_integration_core_api_echo_nullable_enum_response_get_return_value( response)); } static void call_flutter_echo_nullable_enum( - CoreTestsPigeonTestHostIntegrationCoreApi* api, + CoreTestsPigeonTestAnEnum* an_enum, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { @@ -1684,14 +1619,13 @@ static void small_api_two_echo_string_cb(GObject* object, GAsyncResult* result, CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( response), core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( @@ -1702,7 +1636,7 @@ static void small_api_two_echo_string_cb(GObject* object, GAsyncResult* result, } core_tests_pigeon_test_host_integration_core_api_respond_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_small_api_echo_string_response_get_return_value( response)); } @@ -1718,14 +1652,13 @@ static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, CORE_TESTS_PIGEON_TEST_FLUTTER_SMALL_API(object), result, &error); if (response == nullptr) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_small_api_echo_string( - data->self->host_core_api, data->response_handle, "Internal Error", - error->message, nullptr); + data->response_handle, "Internal Error", error->message, nullptr); return; } if (core_tests_pigeon_test_flutter_small_api_echo_string_response_is_error( response)) { core_tests_pigeon_test_host_integration_core_api_respond_error_call_flutter_echo_bool( - data->self->host_core_api, data->response_handle, + data->response_handle, core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_code( response), core_tests_pigeon_test_flutter_small_api_echo_string_response_get_error_message( @@ -1743,7 +1676,7 @@ static void small_api_one_echo_string_cb(GObject* object, GAsyncResult* result, } static void call_flutter_small_api_echo_string( - CoreTestsPigeonTestHostIntegrationCoreApi* api, const gchar* a_string, + const gchar* a_string, CoreTestsPigeonTestHostIntegrationCoreApiResponseHandle* response_handle, gpointer user_data) { TestPlugin* self = TEST_PLUGIN(user_data); @@ -1849,18 +1782,16 @@ static CoreTestsPigeonTestHostIntegrationCoreApiVTable host_core_api_vtable = { .call_flutter_echo_nullable_enum = call_flutter_echo_nullable_enum, .call_flutter_small_api_echo_string = call_flutter_small_api_echo_string}; -static void echo(CoreTestsPigeonTestHostSmallApi* api, const gchar* a_string, +static void echo(const gchar* a_string, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_small_api_respond_echo(api, response_handle, - a_string); + core_tests_pigeon_test_host_small_api_respond_echo(response_handle, a_string); } static void void_void( - CoreTestsPigeonTestHostSmallApi* api, CoreTestsPigeonTestHostSmallApiResponseHandle* response_handle, gpointer user_data) { - core_tests_pigeon_test_host_small_api_respond_void_void(api, response_handle); + core_tests_pigeon_test_host_small_api_respond_void_void(response_handle); } static CoreTestsPigeonTestHostSmallApiVTable host_small_api_vtable = { @@ -1871,9 +1802,6 @@ static void test_plugin_dispose(GObject* object) { g_cancellable_cancel(self->cancellable); - g_clear_object(&self->host_core_api); - g_clear_object(&self->host_small_api_one); - g_clear_object(&self->host_small_api_two); g_clear_object(&self->flutter_core_api); g_clear_object(&self->flutter_small_api_one); g_clear_object(&self->flutter_small_api_two); @@ -1893,13 +1821,13 @@ static void test_plugin_init(TestPlugin* self) { static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); - self->host_core_api = core_tests_pigeon_test_host_integration_core_api_new( + core_tests_pigeon_test_host_integration_core_api_set_method_handlers( messenger, nullptr, &host_core_api_vtable, g_object_ref(self), g_object_unref); - self->host_small_api_one = core_tests_pigeon_test_host_small_api_new( + core_tests_pigeon_test_host_small_api_set_method_handlers( messenger, "suffixOne", &host_small_api_vtable, g_object_ref(self), g_object_unref); - self->host_small_api_two = core_tests_pigeon_test_host_small_api_new( + core_tests_pigeon_test_host_small_api_set_method_handlers( messenger, "suffixTwo", &host_small_api_vtable, g_object_ref(self), g_object_unref); self->flutter_core_api = From fd0fd3b2491b6f5bdfc875b5a752dd018747c6dd Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 2 Jul 2024 14:48:37 +1200 Subject: [PATCH 123/127] Fix test --- .../pigeon/test/gobject_generator_test.dart | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/pigeon/test/gobject_generator_test.dart b/packages/pigeon/test/gobject_generator_test.dart index 8201d9459f71..935e9b98c804 100644 --- a/packages/pigeon/test/gobject_generator_test.dart +++ b/packages/pigeon/test/gobject_generator_test.dart @@ -71,10 +71,6 @@ void main() { code, contains( 'G_DECLARE_FINAL_TYPE(TestPackageOutput, test_package_output, TEST_PACKAGE, OUTPUT, GObject)')); - expect( - code, - contains( - 'G_DECLARE_FINAL_TYPE(TestPackageApi, test_package_api, TEST_PACKAGE, API, GObject)')); } { final StringBuffer sink = StringBuffer(); @@ -158,7 +154,7 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* api, TestPackageInput* some_input, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageInput* some_input, gpointer user_data);')); expect( code, contains( @@ -533,27 +529,27 @@ void main() { expect( code, contains( - ' TestPackageApiReturnBoolResponse* (*return_bool)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnBoolResponse* (*return_bool)(gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnIntResponse* (*return_int)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnIntResponse* (*return_int)(gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnStringResponse* (*return_string)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnStringResponse* (*return_string)(gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnListResponse* (*return_list)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnListResponse* (*return_list)(gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnMapResponse* (*return_map)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnMapResponse* (*return_map)(gpointer user_data);')); expect( code, contains( - ' TestPackageApiReturnDataClassResponse* (*return_data_class)(TestPackageApi* api, gpointer user_data);')); + ' TestPackageApiReturnDataClassResponse* (*return_data_class)(gpointer user_data);')); } }); @@ -659,7 +655,7 @@ void main() { expect( code, contains( - ' TestPackageApiDoSomethingResponse* (*do_something)(TestPackageApi* api, gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); + ' TestPackageApiDoSomethingResponse* (*do_something)(gboolean a_bool, int64_t an_int, const gchar* a_string, FlValue* a_list, FlValue* a_map, TestPackageParameterObject* an_object, TestPackageObject* a_generic_object, gpointer user_data);')); } { final StringBuffer sink = StringBuffer(); @@ -679,7 +675,7 @@ void main() { expect( code, contains( - ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(self, a_bool, an_int, a_string, a_list, a_map, an_object, a_generic_object, self->user_data);')); + ' g_autoptr(TestPackageApiDoSomethingResponse) response = self->vtable->do_something(a_bool, an_int, a_string, a_list, a_map, an_object, a_generic_object, self->user_data);')); } }); From d939e580df5852f532f8e15d69ab0ca4d16a111a Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 2 Jul 2024 14:57:06 +1200 Subject: [PATCH 124/127] Fix snippet --- packages/pigeon/example/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/pigeon/example/README.md b/packages/pigeon/example/README.md index 03088ab46b50..3ea3005ac907 100644 --- a/packages/pigeon/example/README.md +++ b/packages/pigeon/example/README.md @@ -204,8 +204,7 @@ handle_get_host_language(gpointer user_data) { } static PigeonExamplePackageExampleHostApiAddResponse* handle_add( - int64_t a, int64_t b, - gpointer user_data) { + int64_t a, int64_t b, gpointer user_data) { if (a < 0 || b < 0) { g_autoptr(FlValue) details = fl_value_new_string("details"); return pigeon_example_package_example_host_api_add_response_new_error( From 4c474a84ec1de834dadce05d8e1d6cad12f4e703 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 23 Jul 2024 13:42:35 -0400 Subject: [PATCH 125/127] Adopt addDocumentationComments everywhere --- packages/pigeon/lib/gobject_generator.dart | 446 +++++++++++---------- 1 file changed, 242 insertions(+), 204 deletions(-) diff --git a/packages/pigeon/lib/gobject_generator.dart b/packages/pigeon/lib/gobject_generator.dart index eb1880ff965c..bee03804f53b 100644 --- a/packages/pigeon/lib/gobject_generator.dart +++ b/packages/pigeon/lib/gobject_generator.dart @@ -6,12 +6,10 @@ import 'ast.dart'; import 'generator.dart'; import 'generator_tools.dart'; -/// General comment opening token. -const String _commentPrefix = ' *'; - /// Documentation comment spec. const DocumentCommentSpecification _docCommentSpec = - DocumentCommentSpecification(_commentPrefix); + DocumentCommentSpecification('/**', + closeCommentToken: ' */', blockContinuationToken: ' *'); /// Name for codec class. const String _codecBaseName = 'MessageCodec'; @@ -161,20 +159,23 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String enumName = _getClassName(module, anEnum.name); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * $enumName:'); + final List enumValueCommentLines = []; for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; final String itemName = _getEnumValue(dartPackageName, anEnum.name, member.name); - indent.writeln(' * $itemName:'); - addDocumentationComments( - indent, member.documentationComments, _docCommentSpec); + enumValueCommentLines.add('$itemName:'); + enumValueCommentLines.addAll(member.documentationComments); } - indent.writeln(' *'); addDocumentationComments( - indent, anEnum.documentationComments, _docCommentSpec); - indent.writeln(' */'); + indent, + [ + '$enumName:', + ...enumValueCommentLines, + '', + ...anEnum.documentationComments + ], + _docCommentSpec); indent.writeScoped('typedef enum {', '} $enumName;', () { for (int i = 0; i < anEnum.members.length; i++) { final EnumMember member = anEnum.members[i]; @@ -199,12 +200,14 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, classDefinition.name); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * $className:'); - indent.writeln(' *'); addDocumentationComments( - indent, classDefinition.documentationComments, _docCommentSpec); - indent.writeln(' */'); + indent, + [ + '$className:', + '', + ...classDefinition.documentationComments, + ], + _docCommentSpec); indent.newln(); _writeDeclareFinalType(indent, module, classDefinition.name); @@ -219,20 +222,27 @@ class GObjectHeaderGenerator extends StructuredGenerator { constructorArgs.add('size_t ${fieldName}_length'); } } - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_new:'); + final List constructorFieldCommentLines = []; for (final NamedType field in classDefinition.fields) { final String fieldName = _getFieldName(field.name); - indent.writeln(' * $fieldName: field in this object.'); + constructorFieldCommentLines.add('$fieldName: field in this object.'); if (_isNumericListType(field.type)) { - indent.writeln(' * ${fieldName}_length: length of @$fieldName.'); + constructorFieldCommentLines + .add('${fieldName}_length: length of @$fieldName.'); } } - indent.writeln(' *'); - indent.writeln(' * Creates a new #${classDefinition.name} object.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a new #$className'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_new:', + ...constructorFieldCommentLines, + '', + 'Creates a new #${classDefinition.name} object.', + '', + 'Returns: a new #$className', + ], + _docCommentSpec); + indent.writeln( "$className* ${methodPrefix}_new(${constructorArgs.join(', ')});"); @@ -241,24 +251,22 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String returnType = _getType(module, field.type); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_get_$fieldName'); - indent.writeln(' * @object: a #$className.'); - if (_isNumericListType(field.type)) { - indent - .writeln(' * @length: location to write the length of this value.'); - } - indent.writeln(' *'); - if (field.documentationComments.isNotEmpty) { - addDocumentationComments( - indent, field.documentationComments, _docCommentSpec); - } else { - indent.writeln( - ' * Gets the value of the ${field.name} field of @object.'); - } - indent.writeln(' *'); - indent.writeln(' * Returns: the field value.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_get_$fieldName', + '@object: a #$className.', + if (_isNumericListType(field.type)) + '@length: location to write the length of this value.', + '', + if (field.documentationComments.isNotEmpty) + ...field.documentationComments + else + 'Gets the value of the ${field.name} field of @object.', + '', + 'Returns: the field value.', + ], + _docCommentSpec); final List getterArgs = [ '$className* object', if (_isNumericListType(field.type)) 'size_t* length' @@ -293,27 +301,31 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String methodPrefix = _getMethodPrefix(module, api.name); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * $className:'); - indent.writeln(' *'); addDocumentationComments( - indent, api.documentationComments, _docCommentSpec); - indent.writeln(' */'); + indent, + [ + '$className:', + '', + ...api.documentationComments, + ], + _docCommentSpec); indent.newln(); _writeDeclareFinalType(indent, module, api.name); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_new:'); - indent.writeln(' * @messenger: an #FlBinaryMessenger.'); - indent.writeln( - ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); - indent.writeln(' *'); - indent.writeln(' * Creates a new object to access the ${api.name} API.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a new #$className'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_new:', + '@messenger: an #FlBinaryMessenger.', + '@suffix: (allow-none): a suffix to add to the API or %NULL for none.', + '', + 'Creates a new object to access the ${api.name} API.', + '', + 'Returns: a new #$className', + ], + _docCommentSpec); indent.writeln( '$className* ${methodPrefix}_new(FlBinaryMessenger* messenger, const gchar* suffix);'); @@ -336,27 +348,29 @@ class GObjectHeaderGenerator extends StructuredGenerator { 'gpointer user_data' ]); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_$methodName:'); - indent.writeln(' * @api: a #$className.'); + final List methodParameterCommentLines = []; for (final Parameter param in method.parameters) { final String paramName = _snakeCaseFromCamelCase(param.name); - indent.writeln( - ' * @$paramName: ${param.type.isNullable ? '(allow-none): ' : ''}parameter for this method.'); + methodParameterCommentLines.add( + '@$paramName: ${param.type.isNullable ? '(allow-none): ' : ''}parameter for this method.'); if (_isNumericListType(param.type)) { - indent.writeln(' * @${paramName}_length: length of $paramName.'); + methodParameterCommentLines + .add('@${paramName}_length: length of $paramName.'); } } - indent - .writeln(' * @cancellable: (allow-none): a #GCancellable or %NULL.'); - indent.writeln( - ' * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when the call is complete or %NULL to ignore the response.'); - indent - .writeln(' * @user_data: (closure): user data to pass to @callback.'); - indent.writeln(' *'); addDocumentationComments( - indent, method.documentationComments, _docCommentSpec); - indent.writeln(' */'); + indent, + [ + '${methodPrefix}_$methodName:', + '@api: a #$className.', + ...methodParameterCommentLines, + '@cancellable: (allow-none): a #GCancellable or %NULL.', + '@callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when the call is complete or %NULL to ignore the response.', + '@user_data: (closure): user data to pass to @callback.', + '', + ...method.documentationComments + ], + _docCommentSpec); indent.writeln( "void ${methodPrefix}_$methodName(${asyncArgs.join(', ')});"); @@ -366,17 +380,19 @@ class GObjectHeaderGenerator extends StructuredGenerator { 'GError** error' ]; indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_${methodName}_finish:'); - indent.writeln(' * @api: a #$className.'); - indent.writeln(' * @result: a #GAsyncResult.'); - indent.writeln( - ' * @error: (allow-none): #GError location to store the error occurring, or %NULL to ignore.'); - indent.writeln(' *'); - indent.writeln(' * Completes a ${methodPrefix}_$methodName() call.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a #$responseClassName or %NULL on error.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_${methodName}_finish:', + '@api: a #$className.', + '@result: a #GAsyncResult.', + '@error: (allow-none): #GError location to store the error occurring, or %NULL to ignore.', + '', + 'Completes a ${methodPrefix}_$methodName() call.', + '', + 'Returns: a #$responseClassName or %NULL on error.', + ], + _docCommentSpec); indent.writeln( "$responseClassName* ${methodPrefix}_${methodName}_finish(${finishArgs.join(', ')});"); } @@ -395,72 +411,83 @@ class GObjectHeaderGenerator extends StructuredGenerator { _writeDeclareFinalType(indent, module, responseName); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_is_error:'); - indent.writeln(' * @response: a #$responseClassName.'); - indent.writeln(' *'); - indent.writeln( - ' * Checks if a response to ${api.name}.${method.name} is an error.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a %TRUE if this response is an error.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_is_error:', + '@response: a #$responseClassName.', + '', + 'Checks if a response to ${api.name}.${method.name} is an error.', + '', + 'Returns: a %TRUE if this response is an error.', + ], + _docCommentSpec); indent.writeln( 'gboolean ${responseMethodPrefix}_is_error($responseClassName* response);'); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_get_error_code:'); - indent.writeln(' * @response: a #$responseClassName.'); - indent.writeln(' *'); - indent.writeln(' * Get the error code for this response.'); - indent.writeln(' *'); - indent.writeln(' * Returns: an error code or %NULL if not an error.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_get_error_code:', + '@response: a #$responseClassName.', + '', + 'Get the error code for this response.', + '', + 'Returns: an error code or %NULL if not an error.', + ], + _docCommentSpec); indent.writeln( 'const gchar* ${responseMethodPrefix}_get_error_code($responseClassName* response);'); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_get_error_message:'); - indent.writeln(' * @response: a #$responseClassName.'); - indent.writeln(' *'); - indent.writeln(' * Get the error message for this response.'); - indent.writeln(' *'); - indent.writeln(' * Returns: an error message.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_get_error_message:', + '@response: a #$responseClassName.', + '', + 'Get the error message for this response.', + '', + 'Returns: an error message.', + ], + _docCommentSpec); indent.writeln( 'const gchar* ${responseMethodPrefix}_get_error_message($responseClassName* response);'); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_get_error_details:'); - indent.writeln(' * @response: a #$responseClassName.'); - indent.writeln(' *'); - indent.writeln(' * Get the error details for this response.'); - indent.writeln(' *'); - indent.writeln(' * Returns: (allow-none): an error details or %NULL.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_get_error_details:', + '@response: a #$responseClassName.', + '', + 'Get the error details for this response.', + '', + 'Returns: (allow-none): an error details or %NULL.', + ], + _docCommentSpec); indent.writeln( 'FlValue* ${responseMethodPrefix}_get_error_details($responseClassName* response);'); if (!method.returnType.isVoid) { indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_get_return_value:'); - indent.writeln(' * @response: a #$responseClassName.'); - if (_isNumericListType(method.returnType)) { - indent.writeln( - ' * @return_value_length: (allow-none): location to write length of the return value or %NULL to ignore.'); - } - indent.writeln(' *'); - indent.writeln(' * Get the return value for this response.'); - indent.writeln(' *'); - if (method.returnType.isNullable) { - indent.writeln(' * Returns: (allow-none): a return value or %NULL.'); - } else { - indent.writeln(' * Returns: a return value.'); - } - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_get_return_value:', + '@response: a #$responseClassName.', + if (_isNumericListType(method.returnType)) + '@return_value_length: (allow-none): location to write length of the return value or %NULL to ignore.', + '', + 'Get the return value for this response.', + '', + if (method.returnType.isNullable) + 'Returns: (allow-none): a return value or %NULL.' + else + 'Returns: a return value.', + ], + _docCommentSpec); final String returnType = _isNullablePrimitiveType(method.returnType) ? '$primitiveType*' : primitiveType; @@ -497,33 +524,35 @@ class GObjectHeaderGenerator extends StructuredGenerator { _writeApiVTable(indent, module, api); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_set_method_handlers:'); - indent.writeln(' *'); - indent.writeln(' * @messenger: an #FlBinaryMessenger.'); - indent.writeln( - ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); - indent.writeln(' * @vtable: implementations of the methods in this API.'); - indent.writeln( - ' * @user_data: (closure): user data to pass to the functions in @vtable.'); - indent.writeln( - ' * @user_data_free_func: (allow-none): a function which gets called to free @user_data, or %NULL.'); - indent.writeln(' *'); - indent.writeln(' * Connects the method handlers in the ${api.name} API.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_set_method_handlers:', + '', + '@messenger: an #FlBinaryMessenger.', + '@suffix: (allow-none): a suffix to add to the API or %NULL for none.', + '@vtable: implementations of the methods in this API.', + '@user_data: (closure): user data to pass to the functions in @vtable.', + '@user_data_free_func: (allow-none): a function which gets called to free @user_data, or %NULL.', + '', + 'Connects the method handlers in the ${api.name} API.', + ], + _docCommentSpec); indent.writeln( 'void ${methodPrefix}_set_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix, const $vtableName* vtable, gpointer user_data, GDestroyNotify user_data_free_func);'); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_clear_method_handlers:'); - indent.writeln(' *'); - indent.writeln(' * @messenger: an #FlBinaryMessenger.'); - indent.writeln( - ' * @suffix: (allow-none): a suffix to add to the API or %NULL for none.'); - indent.writeln(' *'); - indent.writeln(' * Clears the method handlers in the ${api.name} API.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_clear_method_handlers:', + '', + '@messenger: an #FlBinaryMessenger.', + '@suffix: (allow-none): a suffix to add to the API or %NULL for none.', + '', + 'Clears the method handlers in the ${api.name} API.', + ], + _docCommentSpec); indent.writeln( 'void ${methodPrefix}_clear_method_handlers(FlBinaryMessenger* messenger, const gchar* suffix);'); @@ -549,28 +578,33 @@ class GObjectHeaderGenerator extends StructuredGenerator { if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_new:'); - indent.writeln(' *'); - indent.writeln(' * Creates a new response to ${api.name}.${method.name}.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a new #$responseClassName'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_new:', + '', + 'Creates a new response to ${api.name}.${method.name}.', + '', + 'Returns: a new #$responseClassName', + ], + _docCommentSpec); indent.writeln( '$responseClassName* ${responseMethodPrefix}_new(${constructorArgs.join(', ')});'); indent.newln(); - indent.writeln('/**'); - indent.writeln(' * ${responseMethodPrefix}_new_error:'); - indent.writeln(' * @code: error code.'); - indent.writeln(' * @message: error message.'); - indent.writeln(' * @details: (allow-none): error details or %NULL.'); - indent.writeln(' *'); - indent.writeln( - ' * Creates a new error response to ${api.name}.${method.name}.'); - indent.writeln(' *'); - indent.writeln(' * Returns: a new #$responseClassName'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${responseMethodPrefix}_new_error:', + '@code: error code.', + '@message: error message.', + '@details: (allow-none): error details or %NULL.', + '', + 'Creates a new error response to ${api.name}.${method.name}.', + '', + 'Returns: a new #$responseClassName', + ], + _docCommentSpec); indent.writeln( '$responseClassName* ${responseMethodPrefix}_new_error(const gchar* code, const gchar* message, FlValue* details);'); } @@ -580,12 +614,14 @@ class GObjectHeaderGenerator extends StructuredGenerator { final String className = _getClassName(module, api.name); final String vtableName = _getVTableName(module, api.name); - indent.writeln('/**'); - indent.writeln(' * $vtableName:'); - indent.writeln(' *'); - indent.writeln( - ' * Table of functions exposed by ${api.name} to be implemented by the API provider.'); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '$vtableName:', + '', + 'Table of functions exposed by ${api.name} to be implemented by the API provider.', + ], + _docCommentSpec); indent.writeScoped('typedef struct {', '} $vtableName;', () { for (final Method method in api.methods) { final String methodName = _getMethodName(method.name); @@ -626,20 +662,19 @@ class GObjectHeaderGenerator extends StructuredGenerator { if (returnType != 'void') '$returnType return_value', if (_isNumericListType(method.returnType)) 'size_t return_value_length' ]; - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_respond_$methodName:'); - indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); - if (returnType != 'void') { - indent.writeln( - ' * @return_value: location to write the value returned by this method.'); - } - if (_isNumericListType(method.returnType)) { - indent.writeln( - ' * @return_value_length: (allow-none): location to write length of @return_value or %NULL to ignore.'); - } - indent.writeln(' *'); - indent.writeln(' * Responds to ${api.name}.${method.name}. '); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_respond_$methodName:', + '@response_handle: a #${className}ResponseHandle.', + if (returnType != 'void') + '@return_value: location to write the value returned by this method.', + if (_isNumericListType(method.returnType)) + '@return_value_length: (allow-none): location to write length of @return_value or %NULL to ignore.', + '', + 'Responds to ${api.name}.${method.name}. ', + ], + _docCommentSpec); indent.writeln( "void ${methodPrefix}_respond_$methodName(${respondArgs.join(', ')});"); @@ -650,15 +685,18 @@ class GObjectHeaderGenerator extends StructuredGenerator { 'const gchar* message', 'FlValue* details' ]; - indent.writeln('/**'); - indent.writeln(' * ${methodPrefix}_respond_error_$methodName:'); - indent.writeln(' * @response_handle: a #${className}ResponseHandle.'); - indent.writeln(' * @code: error code.'); - indent.writeln(' * @message: error message.'); - indent.writeln(' * @details: (allow-none): error details or %NULL.'); - indent.writeln(' *'); - indent.writeln(' * Responds with an error to ${api.name}.${method.name}. '); - indent.writeln(' */'); + addDocumentationComments( + indent, + [ + '${methodPrefix}_respond_error_$methodName:', + '@response_handle: a #${className}ResponseHandle.', + '@code: error code.', + '@message: error message.', + '@details: (allow-none): error details or %NULL.', + '', + 'Responds with an error to ${api.name}.${method.name}. ', + ], + _docCommentSpec); indent.writeln( "void ${methodPrefix}_respond_error_$methodName(${respondErrorArgs.join(', ')});"); } From 4c539b5a24c61d05f916d3cb20e2f5fb5eded304 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 23 Jul 2024 13:49:09 -0400 Subject: [PATCH 126/127] Clear handlers in test plugin --- .../platform_tests/test_plugin/linux/test_plugin.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc index 010bd97bdc22..98d0dce95935 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/test_plugin.cc @@ -16,6 +16,8 @@ struct _TestPlugin { GObject parent_instance; + FlBinaryMessenger* messenger; + CoreTestsPigeonTestFlutterIntegrationCoreApi* flutter_core_api; CoreTestsPigeonTestFlutterSmallApi* flutter_small_api_one; @@ -1802,6 +1804,13 @@ static void test_plugin_dispose(GObject* object) { g_cancellable_cancel(self->cancellable); + core_tests_pigeon_test_host_integration_core_api_clear_method_handlers( + self->messenger, nullptr); + core_tests_pigeon_test_host_small_api_clear_method_handlers(self->messenger, + "suffixOne"); + core_tests_pigeon_test_host_small_api_clear_method_handlers(self->messenger, + "suffixTwo"); + g_clear_object(&self->flutter_core_api); g_clear_object(&self->flutter_small_api_one); g_clear_object(&self->flutter_small_api_two); @@ -1821,6 +1830,7 @@ static void test_plugin_init(TestPlugin* self) { static TestPlugin* test_plugin_new(FlBinaryMessenger* messenger) { TestPlugin* self = TEST_PLUGIN(g_object_new(test_plugin_get_type(), nullptr)); + self->messenger = messenger; core_tests_pigeon_test_host_integration_core_api_set_method_handlers( messenger, nullptr, &host_core_api_vtable, g_object_ref(self), g_object_unref); From 7458f0639059bbb48c5db537938bffa87a136b9c Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 23 Jul 2024 15:16:03 -0400 Subject: [PATCH 127/127] Use the right version --- packages/pigeon/CHANGELOG.md | 2 +- packages/pigeon/lib/generator_tools.dart | 2 +- packages/pigeon/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index ca4cbda0bcf5..f501b5cd23f9 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,4 +1,4 @@ -## 20.1.0 +## 21.1.0 * Adds GObject (Linux) support. diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart index 45b81874758c..8771001ca6a9 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -13,7 +13,7 @@ import 'ast.dart'; /// The current version of pigeon. /// /// This must match the version in pubspec.yaml. -const String pigeonVersion = '20.2.0'; +const String pigeonVersion = '21.1.0'; /// Prefix for all local variables in methods. /// diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index f1263fd57d66..31832931d45a 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. repository: https://github.com/flutter/packages/tree/main/packages/pigeon issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22 -version: 20.2.0 # This must match the version in lib/generator_tools.dart +version: 21.1.0 # This must match the version in lib/generator_tools.dart environment: sdk: ^3.2.0