From 47e1ee72a6182bc3d5c13c0bac588066fdc6fffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Wed, 17 Jan 2024 13:05:12 +0100 Subject: [PATCH] Update lints and ffigen packages (#1476) --- common/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- ffigen/pubspec.yaml | 2 +- flutter/realm_flutter/example/pubspec.yaml | 2 +- flutter/realm_flutter/tests/pubspec.yaml | 2 +- generator/pubspec.yaml | 2 +- lib/src/native/realm_bindings.dart | 522 ++++++++++++++------- pubspec.yaml | 2 +- 8 files changed, 349 insertions(+), 187 deletions(-) diff --git a/common/pubspec.yaml b/common/pubspec.yaml index 177b16cd1..8d95d535c 100644 --- a/common/pubspec.yaml +++ b/common/pubspec.yaml @@ -19,4 +19,4 @@ dependencies: sane_uuid: ^1.0.0-alpha.4 dev_dependencies: - lints: ^2.0.0 + lints: ^3.0.0 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ea3493ac9..5a42f7004 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -11,4 +11,4 @@ dependencies: path: ../ dev_dependencies: - lints: ^2.0.0 + lints: ^3.0.0 diff --git a/ffigen/pubspec.yaml b/ffigen/pubspec.yaml index ff75bcd9a..5881a0998 100644 --- a/ffigen/pubspec.yaml +++ b/ffigen/pubspec.yaml @@ -8,4 +8,4 @@ environment: sdk: ^3.1.0 dev_dependencies: - ffigen: ^9.0.1 \ No newline at end of file + ffigen: ^11.0.0 \ No newline at end of file diff --git a/flutter/realm_flutter/example/pubspec.yaml b/flutter/realm_flutter/example/pubspec.yaml index 5fd74583e..b5bb72b82 100644 --- a/flutter/realm_flutter/example/pubspec.yaml +++ b/flutter/realm_flutter/example/pubspec.yaml @@ -28,7 +28,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^3.0.1 flutter: uses-material-design: true diff --git a/flutter/realm_flutter/tests/pubspec.yaml b/flutter/realm_flutter/tests/pubspec.yaml index 01eb62b33..8b65b5392 100644 --- a/flutter/realm_flutter/tests/pubspec.yaml +++ b/flutter/realm_flutter/tests/pubspec.yaml @@ -25,7 +25,7 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^3.0.1 build_runner: ^2.1.2 test: any timezone: ^0.9.0 diff --git a/generator/pubspec.yaml b/generator/pubspec.yaml index ae806a7a5..86ba36b2f 100644 --- a/generator/pubspec.yaml +++ b/generator/pubspec.yaml @@ -27,6 +27,6 @@ dependencies: dev_dependencies: build_test: ^2.1.4 - lints: ^2.0.0 + lints: ^3.0.0 test: ^1.14.3 path: ^1.0.0 diff --git a/lib/src/native/realm_bindings.dart b/lib/src/native/realm_bindings.dart index 446ea5bd6..a0e40afef 100644 --- a/lib/src/native/realm_bindings.dart +++ b/lib/src/native/realm_bindings.dart @@ -11219,6 +11219,7 @@ class _SymbolAddresses { /// A port is used to send or receive inter-isolate messages typedef Dart_Port = ffi.Int64; +typedef DartDart_Port = int; final class UnnamedUnion1 extends ffi.Union { @ffi.Int64() @@ -11302,26 +11303,38 @@ typedef realm_app_user_apikey_t = realm_app_user_apikey; /// The pointer is alive only for the duration of the callback, /// if you wish to use it further make a copy with realm_clone(). /// @param error Pointer to an error object if the operation failed, otherwise null if it completed successfully. -typedef realm_app_user_completion_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer userdata, - ffi.Pointer user, - ffi.Pointer error)>>; +typedef realm_app_user_completion_func_t + = ffi.Pointer>; +typedef realm_app_user_completion_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + ffi.Pointer user, + ffi.Pointer error); +typedef Dartrealm_app_user_completion_func_tFunction = void Function( + ffi.Pointer userdata, + ffi.Pointer user, + ffi.Pointer error); /// Generic completion callback for asynchronous Realm App operations. /// /// @param error Pointer to an error object if the operation failed, otherwise null if it completed successfully. -typedef realm_app_void_completion_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - ffi.Pointer error)>>; -typedef realm_async_begin_write_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; -typedef realm_async_commit_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, ffi.Bool error, - ffi.Pointer desc)>>; +typedef realm_app_void_completion_func_t + = ffi.Pointer>; +typedef realm_app_void_completion_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Pointer error); +typedef Dartrealm_app_void_completion_func_tFunction = void Function( + ffi.Pointer userdata, ffi.Pointer error); +typedef realm_async_begin_write_func_t + = ffi.Pointer>; +typedef realm_async_begin_write_func_tFunction = ffi.Void Function( + ffi.Pointer userdata); +typedef Dartrealm_async_begin_write_func_tFunction = void Function( + ffi.Pointer userdata); +typedef realm_async_commit_func_t + = ffi.Pointer>; +typedef realm_async_commit_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Bool error, ffi.Pointer desc); +typedef Dartrealm_async_commit_func_tFunction = void Function( + ffi.Pointer userdata, bool error, ffi.Pointer desc); final class realm_async_error extends ffi.Opaque {} @@ -11340,15 +11353,21 @@ final class realm_async_open_task extends ffi.Opaque {} /// the object and must release it when used. /// @param error Null, if the operation complete successfully. typedef realm_async_open_task_completion_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer userdata, - ffi.Pointer realm, - ffi.Pointer error)>>; + ffi.NativeFunction>; +typedef realm_async_open_task_completion_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + ffi.Pointer realm, + ffi.Pointer error); +typedef Dartrealm_async_open_task_completion_func_tFunction = void Function( + ffi.Pointer userdata, + ffi.Pointer realm, + ffi.Pointer error); typedef realm_async_open_task_init_subscription_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer realm, ffi.Pointer userdata)>>; + ffi.NativeFunction>; +typedef realm_async_open_task_init_subscription_func_tFunction = ffi.Void + Function(ffi.Pointer realm, ffi.Pointer userdata); +typedef Dartrealm_async_open_task_init_subscription_func_tFunction = void + Function(ffi.Pointer realm, ffi.Pointer userdata); final class realm_async_open_task_progress_notification_token extends ffi.Opaque {} @@ -11409,6 +11428,7 @@ final class realm_class_info extends ffi.Struct { typedef realm_class_info_t = realm_class_info; typedef realm_class_key_t = ffi.Uint32; +typedef Dartrealm_class_key_t = int; final class realm_collection_changes extends ffi.Opaque {} @@ -11450,10 +11470,12 @@ typedef realm_config_t = realm_config; final class realm_dart_userdata_async extends ffi.Opaque {} typedef realm_dart_userdata_async_t = ffi.Pointer; -typedef realm_data_initialization_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer userdata, ffi.Pointer realm)>>; +typedef realm_data_initialization_func_t + = ffi.Pointer>; +typedef realm_data_initialization_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, ffi.Pointer realm); +typedef Dartrealm_data_initialization_func_tFunction = bool Function( + ffi.Pointer userdata, ffi.Pointer realm); final class realm_decimal128 extends ffi.Struct { @ffi.Array.multi([2]) @@ -11651,6 +11673,7 @@ final class realm_error extends ffi.Struct { } typedef realm_error_categories = ffi.UnsignedInt; +typedef Dartrealm_error_categories = int; typedef realm_error_t = realm_error; final class realm_flx_sync_mutable_subscription_set extends ffi.Opaque {} @@ -11676,8 +11699,12 @@ abstract class realm_flx_sync_subscription_set_state { typedef realm_flx_sync_subscription_set_t = realm_flx_sync_subscription_set; typedef realm_flx_sync_subscription_t = realm_flx_sync_subscription; -typedef realm_free_userdata_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; +typedef realm_free_userdata_func_t + = ffi.Pointer>; +typedef realm_free_userdata_func_tFunction = ffi.Void Function( + ffi.Pointer userdata); +typedef Dartrealm_free_userdata_func_tFunction = void Function( + ffi.Pointer userdata); final class realm_http_header extends ffi.Struct { external ffi.Pointer name; @@ -11715,12 +11742,16 @@ final class realm_http_request extends ffi.Struct { /// /// @param request The request to send. /// @param request_context Internal state pointer of Core, needed by realm_http_transport_complete_request(). -typedef realm_http_request_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer userdata, - realm_http_request_t request, - ffi.Pointer request_context)>>; +typedef realm_http_request_func_t + = ffi.Pointer>; +typedef realm_http_request_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + realm_http_request_t request, + ffi.Pointer request_context); +typedef Dartrealm_http_request_func_tFunction = void Function( + ffi.Pointer userdata, + realm_http_request_t request, + ffi.Pointer request_context); abstract class realm_http_request_method { static const int RLM_HTTP_REQUEST_METHOD_GET = 0; @@ -11783,10 +11814,14 @@ typedef realm_link_t = realm_link; final class realm_list extends ffi.Opaque {} typedef realm_list_t = realm_list; -typedef realm_log_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, ffi.Int32 level, - ffi.Pointer message)>>; +typedef realm_log_func_t + = ffi.Pointer>; +typedef realm_log_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + ffi.Int32 level, + ffi.Pointer message); +typedef Dartrealm_log_func_tFunction = void Function( + ffi.Pointer userdata, int level, ffi.Pointer message); abstract class realm_log_level { static const int RLM_LOG_LEVEL_ALL = 0; @@ -11800,17 +11835,28 @@ abstract class realm_log_level { static const int RLM_LOG_LEVEL_OFF = 8; } -typedef realm_migration_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer userdata, - ffi.Pointer old_realm, - ffi.Pointer new_realm, - ffi.Pointer schema)>>; -typedef realm_mongodb_callback_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, realm_string_t bson, - ffi.Pointer app_error)>>; +typedef realm_migration_func_t + = ffi.Pointer>; +typedef realm_migration_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, + ffi.Pointer old_realm, + ffi.Pointer new_realm, + ffi.Pointer schema); +typedef Dartrealm_migration_func_tFunction = bool Function( + ffi.Pointer userdata, + ffi.Pointer old_realm, + ffi.Pointer new_realm, + ffi.Pointer schema); +typedef realm_mongodb_callback_t + = ffi.Pointer>; +typedef realm_mongodb_callback_tFunction = ffi.Void Function( + ffi.Pointer userdata, + realm_string_t bson, + ffi.Pointer app_error); +typedef Dartrealm_mongodb_callback_tFunction = void Function( + ffi.Pointer userdata, + realm_string_t bson, + ffi.Pointer app_error); final class realm_mongodb_collection extends ffi.Opaque {} @@ -11859,37 +11905,61 @@ final class realm_object_id extends ffi.Struct { typedef realm_object_id_t = realm_object_id; typedef realm_object_key_t = ffi.Int64; +typedef Dartrealm_object_key_t = int; typedef realm_object_t = realm_object; -typedef realm_on_collection_change_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>; -typedef realm_on_dictionary_change_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>; -typedef realm_on_object_change_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>; +typedef realm_on_collection_change_func_t = ffi + .Pointer>; +typedef realm_on_collection_change_func_tFunction = ffi.Void Function( + ffi.Pointer, ffi.Pointer); +typedef Dartrealm_on_collection_change_func_tFunction = void Function( + ffi.Pointer, ffi.Pointer); +typedef realm_on_dictionary_change_func_t = ffi + .Pointer>; +typedef realm_on_dictionary_change_func_tFunction = ffi.Void Function( + ffi.Pointer, ffi.Pointer); +typedef Dartrealm_on_dictionary_change_func_tFunction = void Function( + ffi.Pointer, ffi.Pointer); +typedef realm_on_object_change_func_t + = ffi.Pointer>; +typedef realm_on_object_change_func_tFunction = ffi.Void Function( + ffi.Pointer, ffi.Pointer); +typedef Dartrealm_on_object_change_func_tFunction = void Function( + ffi.Pointer, ffi.Pointer); typedef realm_on_object_store_error_callback_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)>>; + ffi.NativeFunction>; +typedef realm_on_object_store_error_callback_tFunction = ffi.Bool Function( + ffi.Pointer, ffi.Pointer); +typedef Dartrealm_on_object_store_error_callback_tFunction = bool Function( + ffi.Pointer, ffi.Pointer); typedef realm_on_object_store_thread_callback_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; -typedef realm_on_realm_change_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; -typedef realm_on_realm_refresh_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; + ffi.NativeFunction>; +typedef realm_on_object_store_thread_callback_tFunction = ffi.Void Function( + ffi.Pointer userdata); +typedef Dartrealm_on_object_store_thread_callback_tFunction = void Function( + ffi.Pointer userdata); +typedef realm_on_realm_change_func_t + = ffi.Pointer>; +typedef realm_on_realm_change_func_tFunction = ffi.Void Function( + ffi.Pointer userdata); +typedef Dartrealm_on_realm_change_func_tFunction = void Function( + ffi.Pointer userdata); +typedef realm_on_realm_refresh_func_t + = ffi.Pointer>; +typedef realm_on_realm_refresh_func_tFunction = ffi.Void Function( + ffi.Pointer userdata); +typedef Dartrealm_on_realm_refresh_func_tFunction = void Function( + ffi.Pointer userdata); /// Callback for realm schema changed notifications. /// /// @param new_schema The new schema. This object is released after the callback returns. /// Preserve it with realm_clone() if you wish to keep it around for longer. -typedef realm_on_schema_change_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - ffi.Pointer new_schema)>>; +typedef realm_on_schema_change_func_t + = ffi.Pointer>; +typedef realm_on_schema_change_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Pointer new_schema); +typedef Dartrealm_on_schema_change_func_tFunction = void Function( + ffi.Pointer userdata, ffi.Pointer new_schema); abstract class realm_property_flags { static const int RLM_PROPERTY_NORMAL = 0; @@ -11923,6 +11993,7 @@ final class realm_property_info extends ffi.Struct { typedef realm_property_info_t = realm_property_info; typedef realm_property_key_t = ffi.Int64; +typedef Dartrealm_property_key_t = int; abstract class realm_property_type { static const int RLM_PROPERTY_TYPE_INT = 0; @@ -11962,42 +12033,72 @@ typedef realm_refresh_callback_token_t = realm_refresh_callback_token; final class realm_results extends ffi.Opaque {} typedef realm_results_t = realm_results; -typedef realm_return_apikey_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>; -typedef realm_return_apikey_list_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer)>>; -typedef realm_return_string_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; +typedef realm_return_apikey_func_t + = ffi.Pointer>; +typedef realm_return_apikey_func_tFunction = ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer); +typedef Dartrealm_return_apikey_func_tFunction = void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer); +typedef realm_return_apikey_list_func_t + = ffi.Pointer>; +typedef realm_return_apikey_list_func_tFunction = ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Pointer); +typedef Dartrealm_return_apikey_list_func_tFunction = void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer); +typedef realm_return_string_func_t + = ffi.Pointer>; +typedef realm_return_string_func_tFunction = ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer); +typedef Dartrealm_return_string_func_tFunction = void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer); final class realm_scheduler extends ffi.Opaque {} typedef realm_scheduler_can_deliver_notifications_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; + ffi + .NativeFunction>; +typedef realm_scheduler_can_deliver_notifications_func_tFunction = ffi.Bool + Function(ffi.Pointer userdata); +typedef Dartrealm_scheduler_can_deliver_notifications_func_tFunction = bool + Function(ffi.Pointer userdata); typedef realm_scheduler_default_factory_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer userdata)>>; -typedef realm_scheduler_is_on_thread_func_t = ffi.Pointer< - ffi.NativeFunction userdata)>>; -typedef realm_scheduler_is_same_as_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer scheduler_userdata_1, - ffi.Pointer scheduler_userdata_2)>>; -typedef realm_scheduler_notify_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - ffi.Pointer work_queue)>>; + ffi.NativeFunction>; +typedef realm_scheduler_default_factory_func_tFunction + = ffi.Pointer Function(ffi.Pointer userdata); +typedef realm_scheduler_is_on_thread_func_t = ffi + .Pointer>; +typedef realm_scheduler_is_on_thread_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata); +typedef Dartrealm_scheduler_is_on_thread_func_tFunction = bool Function( + ffi.Pointer userdata); +typedef realm_scheduler_is_same_as_func_t = ffi + .Pointer>; +typedef realm_scheduler_is_same_as_func_tFunction = ffi.Bool Function( + ffi.Pointer scheduler_userdata_1, + ffi.Pointer scheduler_userdata_2); +typedef Dartrealm_scheduler_is_same_as_func_tFunction = bool Function( + ffi.Pointer scheduler_userdata_1, + ffi.Pointer scheduler_userdata_2); +typedef realm_scheduler_notify_func_t + = ffi.Pointer>; +typedef realm_scheduler_notify_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Pointer work_queue); +typedef Dartrealm_scheduler_notify_func_tFunction = void Function( + ffi.Pointer userdata, ffi.Pointer work_queue); typedef realm_scheduler_t = realm_scheduler; final class realm_schema extends ffi.Opaque {} @@ -12032,10 +12133,14 @@ abstract class realm_schema_validation_mode { final class realm_set extends ffi.Opaque {} typedef realm_set_t = realm_set; -typedef realm_should_compact_on_launch_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer userdata, - ffi.Uint64 total_bytes, ffi.Uint64 used_bytes)>>; +typedef realm_should_compact_on_launch_func_t = ffi + .Pointer>; +typedef realm_should_compact_on_launch_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, + ffi.Uint64 total_bytes, + ffi.Uint64 used_bytes); +typedef Dartrealm_should_compact_on_launch_func_tFunction = bool Function( + ffi.Pointer userdata, int total_bytes, int used_bytes); /// Represents a view over a UTF-8 string buffer. The buffer is unowned by this struct. /// @@ -12065,17 +12170,24 @@ final class realm_string extends ffi.Struct { /// - non-empty /// When the data member is non-NULL, and the size member is greater than 0. typedef realm_string_t = realm_string; -typedef realm_sync_after_client_reset_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer userdata, - ffi.Pointer before_realm, - ffi.Pointer after_realm, - ffi.Bool did_recover)>>; -typedef realm_sync_before_client_reset_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer userdata, - ffi.Pointer before_realm)>>; +typedef realm_sync_after_client_reset_func_t = ffi + .Pointer>; +typedef realm_sync_after_client_reset_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, + ffi.Pointer before_realm, + ffi.Pointer after_realm, + ffi.Bool did_recover); +typedef Dartrealm_sync_after_client_reset_func_tFunction = bool Function( + ffi.Pointer userdata, + ffi.Pointer before_realm, + ffi.Pointer after_realm, + bool did_recover); +typedef realm_sync_before_client_reset_func_t = ffi + .Pointer>; +typedef realm_sync_before_client_reset_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, ffi.Pointer before_realm); +typedef Dartrealm_sync_before_client_reset_func_tFunction = bool Function( + ffi.Pointer userdata, ffi.Pointer before_realm); final class realm_sync_client_config extends ffi.Opaque {} @@ -12103,9 +12215,11 @@ abstract class realm_sync_connection_state { } typedef realm_sync_connection_state_changed_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, ffi.Int32 old_state, - ffi.Int32 new_state)>>; + ffi.NativeFunction>; +typedef realm_sync_connection_state_changed_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Int32 old_state, ffi.Int32 new_state); +typedef Dartrealm_sync_connection_state_changed_func_tFunction = void Function( + ffi.Pointer userdata, int old_state, int new_state); final class realm_sync_error extends ffi.Struct { external realm_error_t status; @@ -12163,10 +12277,16 @@ final class realm_sync_error_compensating_write_info extends ffi.Struct { typedef realm_sync_error_compensating_write_info_t = realm_sync_error_compensating_write_info; -typedef realm_sync_error_handler_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, realm_sync_error_t)>>; +typedef realm_sync_error_handler_func_t + = ffi.Pointer>; +typedef realm_sync_error_handler_func_tFunction = ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + realm_sync_error_t); +typedef Dartrealm_sync_error_handler_func_tFunction = void Function( + ffi.Pointer, + ffi.Pointer, + realm_sync_error_t); typedef realm_sync_error_t = realm_sync_error; final class realm_sync_error_user_info extends ffi.Struct { @@ -12177,18 +12297,25 @@ final class realm_sync_error_user_info extends ffi.Struct { typedef realm_sync_error_user_info_t = realm_sync_error_user_info; typedef realm_sync_on_subscription_state_changed_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, ffi.Int32 state)>>; + ffi.NativeFunction>; +typedef realm_sync_on_subscription_state_changed_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Int32 state); +typedef Dartrealm_sync_on_subscription_state_changed_tFunction = void Function( + ffi.Pointer userdata, int state); abstract class realm_sync_progress_direction { static const int RLM_SYNC_PROGRESS_DIRECTION_UPLOAD = 0; static const int RLM_SYNC_PROGRESS_DIRECTION_DOWNLOAD = 1; } -typedef realm_sync_progress_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - ffi.Uint64 transferred_bytes, ffi.Uint64 total_bytes)>>; +typedef realm_sync_progress_func_t + = ffi.Pointer>; +typedef realm_sync_progress_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + ffi.Uint64 transferred_bytes, + ffi.Uint64 total_bytes); +typedef Dartrealm_sync_progress_func_tFunction = void Function( + ffi.Pointer userdata, int transferred_bytes, int total_bytes); final class realm_sync_session extends ffi.Opaque {} @@ -12236,58 +12363,91 @@ abstract class realm_sync_socket_callback_result { static const int RLM_ERR_SYNC_SOCKET_INVALID_ARGUMENT = 3000; } -typedef realm_sync_socket_connect_func_t = ffi.Pointer< - ffi.NativeFunction< - realm_sync_socket_websocket_t Function( - ffi.Pointer userdata, - realm_websocket_endpoint_t endpoint, - ffi.Pointer websocket_observer)>>; -typedef realm_sync_socket_create_timer_func_t = ffi.Pointer< - ffi.NativeFunction< - realm_sync_socket_timer_t Function( - ffi.Pointer userdata, - ffi.Uint64 delay_ms, - ffi.Pointer timer_callback)>>; +typedef realm_sync_socket_connect_func_t + = ffi.Pointer>; +typedef realm_sync_socket_connect_func_tFunction + = realm_sync_socket_websocket_t Function( + ffi.Pointer userdata, + realm_websocket_endpoint_t endpoint, + ffi.Pointer websocket_observer); +typedef realm_sync_socket_create_timer_func_t = ffi + .Pointer>; +typedef realm_sync_socket_create_timer_func_tFunction + = realm_sync_socket_timer_t Function( + ffi.Pointer userdata, + ffi.Uint64 delay_ms, + ffi.Pointer timer_callback); +typedef Dartrealm_sync_socket_create_timer_func_tFunction + = realm_sync_socket_timer_t Function( + ffi.Pointer userdata, + int delay_ms, + ffi.Pointer timer_callback); typedef realm_sync_socket_post_callback_t = realm_sync_socket_callback; -typedef realm_sync_socket_post_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - ffi.Pointer post_callback)>>; +typedef realm_sync_socket_post_func_t + = ffi.Pointer>; +typedef realm_sync_socket_post_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, + ffi.Pointer post_callback); +typedef Dartrealm_sync_socket_post_func_tFunction = void Function( + ffi.Pointer userdata, + ffi.Pointer post_callback); typedef realm_sync_socket_t = realm_sync_socket; typedef realm_sync_socket_timer_callback_t = realm_sync_socket_callback; typedef realm_sync_socket_timer_canceled_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - realm_sync_socket_timer_t timer_userdata)>>; -typedef realm_sync_socket_timer_free_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - realm_sync_socket_timer_t timer_userdata)>>; + ffi.NativeFunction>; +typedef realm_sync_socket_timer_canceled_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, realm_sync_socket_timer_t timer_userdata); +typedef Dartrealm_sync_socket_timer_canceled_func_tFunction = void Function( + ffi.Pointer userdata, realm_sync_socket_timer_t timer_userdata); +typedef realm_sync_socket_timer_free_func_t = ffi + .Pointer>; +typedef realm_sync_socket_timer_free_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, realm_sync_socket_timer_t timer_userdata); +typedef Dartrealm_sync_socket_timer_free_func_tFunction = void Function( + ffi.Pointer userdata, realm_sync_socket_timer_t timer_userdata); typedef realm_sync_socket_timer_t = ffi.Pointer; typedef realm_sync_socket_websocket_async_write_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer userdata, - realm_sync_socket_websocket_t websocket, - ffi.Pointer data, - ffi.Size size, - ffi.Pointer write_callback)>>; + ffi.NativeFunction>; +typedef realm_sync_socket_websocket_async_write_func_tFunction + = ffi.Void Function( + ffi.Pointer userdata, + realm_sync_socket_websocket_t websocket, + ffi.Pointer data, + ffi.Size size, + ffi.Pointer write_callback); +typedef Dartrealm_sync_socket_websocket_async_write_func_tFunction + = void Function( + ffi.Pointer userdata, + realm_sync_socket_websocket_t websocket, + ffi.Pointer data, + int size, + ffi.Pointer write_callback); typedef realm_sync_socket_websocket_free_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer userdata, - realm_sync_socket_websocket_t websocket)>>; + ffi.NativeFunction>; +typedef realm_sync_socket_websocket_free_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, realm_sync_socket_websocket_t websocket); +typedef Dartrealm_sync_socket_websocket_free_func_tFunction = void Function( + ffi.Pointer userdata, realm_sync_socket_websocket_t websocket); typedef realm_sync_socket_websocket_t = ffi.Pointer; typedef realm_sync_socket_write_callback_t = realm_sync_socket_callback; -typedef realm_sync_ssl_verify_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer userdata, - ffi.Pointer server_address, - ffi.Short server_port, - ffi.Pointer pem_data, - ffi.Size pem_size, - ffi.Int preverify_ok, - ffi.Int depth)>>; +typedef realm_sync_ssl_verify_func_t + = ffi.Pointer>; +typedef realm_sync_ssl_verify_func_tFunction = ffi.Bool Function( + ffi.Pointer userdata, + ffi.Pointer server_address, + ffi.Short server_port, + ffi.Pointer pem_data, + ffi.Size pem_size, + ffi.Int preverify_ok, + ffi.Int depth); +typedef Dartrealm_sync_ssl_verify_func_tFunction = bool Function( + ffi.Pointer userdata, + ffi.Pointer server_address, + int server_port, + ffi.Pointer pem_data, + int pem_size, + int preverify_ok, + int depth); /// Callback function invoked by the sync session once it has uploaded or download /// all available changesets. See @a realm_sync_session_wait_for_upload and @@ -12296,10 +12456,12 @@ typedef realm_sync_ssl_verify_func_t = ffi.Pointer< /// This callback is invoked on the sync client's worker thread. /// /// @param error Null, if the operation completed successfully. -typedef realm_sync_wait_for_completion_func_t = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer userdata, ffi.Pointer error)>>; +typedef realm_sync_wait_for_completion_func_t = ffi + .Pointer>; +typedef realm_sync_wait_for_completion_func_tFunction = ffi.Void Function( + ffi.Pointer userdata, ffi.Pointer error); +typedef Dartrealm_sync_wait_for_completion_func_tFunction = void Function( + ffi.Pointer userdata, ffi.Pointer error); typedef realm_t = shared_realm; final class realm_thread_safe_reference extends ffi.Opaque {} diff --git a/pubspec.yaml b/pubspec.yaml index 7ef10105b..3e34e8a71 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: dev_dependencies: build_cli: ^2.2.2 json_serializable: ^6.3.1 - lints: ^2.0.0 + lints: ^3.0.0 test: ^1.14.3 timezone: ^0.9.0